Merge PDF email attachments with Merge PDF API in logic apps
I have a Logic App that monitors incoming emails. Some have multiple PDF attachments that I want to merge and save to Dropbox. I have it working with the Encodian API but I want to switch it over to the Adobe API.
I then use the array as input for the Encodian API. When I try this with the Adobe API, I get an error,
"$content-type": "application/pdf"
This still returns the same error.
Even though the files were already PDF's I thought maybe they still needed to be converted to Base64 so I tried that.

The Append array action generates this result:
[
{
"$content-type":"application/pdf",
"fileContent":"SlZCRVJ..."
},
{
"$content-type":"application/pdf",
"fileContent":"SlZCRVJ..."
}
]
The error again is:
"bad value for parameter 'files'; invalid type".
the full code for the action is:
{
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['adobepdftools']['connectionId']"
}
},
"method": "post",
"body": {
"files": "@variables('FileToMerge')",
"outputFileName": "Temp.pdf"
},
"headers": {
"x-api-key": "PowerAutomate",
"x-region-value": "-ue1"
},
"path": "/operation/v1/combinePDF"
}
}
Why does this have to be so difficult? Where am I going wrong?


