I made an app that uploads its attachment to Power automate so that I can send it to an email as an attachment, here is the formula am using to get attachment data:
Set(data, JSON(Image3.Image, JSONFormat.IncludeBinaryData)); Collect(rawdata, {contentBytes: Mid(data, Find(",", data)+1, Len(data) - Find(",", data) -1), name:Last(Ducements.Attachments).Name});
and here is how it is sent to the flow:
SendEmailAttV2.Run(JSON(rawdata));
here is the flow am using to process the data nd send it in an email:
Schema:
{ "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "contentBytes": { "type": "string" } }, "required": [ "name", "contentBytes" ] } }
upon receiving the email, i can not open any of the attachment saying that it is corrupted, they all have correct names and types, here is the flow run:
NOTE: i am required that i send the emails from power automate and can not just simply send it from power apps
Hi @GTurkistane ,
@{base64ToBinary(items('Apply_to_each')['ContentBytes'])}
After doing a conversion, we will now append this value to our array along with the filename.
Best Regards,
Sunshine Gu
WarrenBelz
146,660
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,004
Most Valuable Professional