I have a really simple flow created that is triggered when an incoming Power Bi subscription email arrives, that the attachment/preview image is picked up from that email. Then a send new email action is added where the attachment from the incoming email is added and sent designated recipient. After that the original email is deleted to complete the flow.
The issue I am experiencing is at the send email stage. I have the send email setup to use the attachment from the incoming email which is working. But I am getting duplicate emails sent when adding a single attachment to the email.
One file comes with the attachment named correctly and the second email delivers a corrupt attachment. Any ideas why adding one single file would result in two separate emails being sent or result in a corrupt attachment? I have narrowed down the duplicate emails to the attachment, when the flow runs without an attachment only one email is sent.
There is no problem with the attachment file from the subscription email. Before changes were made to the flow, I was receiving one email that contained an uncorrupt attachment and a second email with a corrupt attachment.
Once changes were made to the flow, I am only receiving one email. But that single email now contains a corrupt attachment.
Email from Power BI subscription, with non-corrupt attachment.
Email sent from flow using the attachment from the Power BI subscription where the attachment is corrupt and showing 2 attachment files. When only one attachment is being picked up.
Hi @abreen ,
Can the original files of the attachments be opened normally?
Maybe you could try to check the subscription email you received.
Best Regards,
Charlie Choi
Thank you! That stopped the duplicate emails. Now I am just receiving one email, but the attachment is corrupt in the single email.
Updated flow:
Hi @abreen ,
The Attachments field returned by the Trigger is an array, so flow will automatically add an Apply to each Action.
Maybe you could try as below:
{
"Name":@{outputs('Get_Attachment_(V2)')?['body/name']},
"ContentBytes":@{outputs('Get_Attachment_(V2)')?['body/contentBytes']}
}
Result Screenshot:
Best Regards,
Charlie Choi
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional