Azure logic app: SendGrid- Send email (v4)- Attach array variable for multiple files is not working

%3CLINGO-SUB%20id%3D%22lingo-sub-1845200%22%20slang%3D%22en-US%22%3EAzure%20logic%20app%3A%20SendGrid-%20Send%20email%20(v4)-%20Attach%20array%20variable%20for%20multiple%20files%20is%20not%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1845200%22%20slang%3D%22en-US%22%3E%3CP%3EI%20was%20attached%20an%20array%20variable%20with%20multiple%20blob%20file%20names%20and%20content%20to%3C%2FP%3E%3CP%3E1)%20Send%20Grid%20-Send%20email(v4)%20-%20Is%20not%20working%3C%2FP%3E%3CP%3E2)%20Office%20365%20-%20Send%20an%20email(v2)%20is%20working%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20find%20attached%20the%20error%20screenshot%26nbsp%3B%20and%20help%20me%20to%20resolve%3C%2FP%3E%3C%2FLINGO-BODY%3E
Regular Visitor

I was attached an array variable with multiple blob file names and content to

1) Send Grid -Send email(v4) - Is not working

2) Office 365 - Send an email(v2) is working

 

Please find attached the error screenshot  and help me to resolve

1 Reply
I have just been through this learning curve myself.
The SendGrid API ( https://sendgrid.com/docs/api-reference/ ) states that you need to provide key name 'content' in the array object. This is different to O365 which accepts 'ContentBytes'.
This is why you are seeing the error returned 'Parameter \"Content\" should be provided' with SendGrid.

Just change the 'Append to array variable' step with the following value selected from the Dynamic content list -

{
"content": FileContent,
"filename": List of Files DisplayName
}

Note - The File Content value needs to be Base64, so in Logic App go to Expression > Base64 then go back to Dynamic content and select File Content with brackets -

base64(body('Get_blob_content'))

Hope this helps.