Hi i have a flow where attachments from email should send to api in base64 format i'm using apply to each im calling my api in apply to each where in im sending attachment content as base64 string to my api but it is not working i tried to use binary() in expression but attachment content is not showing to keep in binary expresssion so i tried typing binary(attachmentcontent) as value for my api but its not working can anyone provide solution for this i need to send multiple attachments from mail as base64 string to api.Thanks in Advance 🙂.
Solved! Go to Solution.
Hi @v-litu-msft My issue got resolved yesterday anyways thanks for your suggestion and quick response i used byte data type and used attachments content as value in byte data type it works fine.
Hi @Anonymous,
You could use the base64() function convert the Email attachment into base64, if you have multiple attachments, and want to send them all together, you could initialize an array variable, then use the Append to array variable to extract each attachment and store it:
Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-litu-msft thanks for your suggestion i'm sending one by one not all at a time to my api can you show me your expression clearly ? what i should do is i should initialize variable and in apply to each by using set variable in the value section of set variable i'm writing the expression what you said and im using that variable to my api i think the expression is wrong can you show me expression clearly or i should write directly expression in my base64 api value can i see your expression ?.
Hi @Anonymous,
Sorry, there is the completed expression:
base64(body('Get_Attachment_(V2)')?['contentBytes'])
Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi v-litu-msft im facing error when i use the above expresion im attaching scrrenshot for your reference.
Hi @Anonymous,
Could you confirm the content type if it has a value? I test on my side but it works correctly.
Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-litu-msft My issue got resolved yesterday anyways thanks for your suggestion and quick response i used byte data type and used attachments content as value in byte data type it works fine.
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!
User | Count |
---|---|
41 | |
40 | |
37 | |
34 | |
30 |
User | Count |
---|---|
52 | |
38 | |
36 | |
33 | |
24 |