cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Akarim
New Member

Attach single file into 'Send an email (V2)

Hi all,

 

I am relatively new to Power Automate so bear with me.

I have created a form that gets the user response details and then sends an automated email via 'Send an email (V2)' which works perfectly.

I now want to add an action whereby a pdf document is attached to the automated email before its sent.

 

From online documentation i understand that i have to add an action before the 'Send an email (V2)' that to 'Get file content using path'.

This new action would need the 'site Address' & 'File Path' for the Sharepoint location where the document is stored.

I then have to reference this in the 'Send an email (V2)' in the 'Attachment Name-1' and 'Attachment Content -' sections.

 

I believe that I have followed these steps but the flow runs for over 15 mins before failing with an error 502.

 

Has anyone encountered this error message before or better yet know of a simpler way to attach the single document?

 

Thanks in advance.

 

Regards,

AKarim

 

1 ACCEPTED SOLUTION

Accepted Solutions
AbdulWahab
Helper V
Helper V

Hi Akarim,

 

Before trying to get the file from SharePoint. I think first try to connect SharePoint with a simple connector. As per the details, it is something that leads to a bad gateway.

 

Let me know if I can provide you with more details.

 

Thanks
Regards,

Abdul Wahab
Power Platform/Customer Engagement Developer/Lead/Solution Architecture/Project Manager
Direct/WhatsApp:+923323281237
E-mail: abdulwahabubit@outlook.com
Skype: abdul.wahabubit
Linkedin: https://www.linkedin.com/in/abdul-wahab-a5b8b011a

 

 

View solution in original post

2 REPLIES 2
AbdulWahab
Helper V
Helper V

Hi Akarim,

 

Before trying to get the file from SharePoint. I think first try to connect SharePoint with a simple connector. As per the details, it is something that leads to a bad gateway.

 

Let me know if I can provide you with more details.

 

Thanks
Regards,

Abdul Wahab
Power Platform/Customer Engagement Developer/Lead/Solution Architecture/Project Manager
Direct/WhatsApp:+923323281237
E-mail: abdulwahabubit@outlook.com
Skype: abdul.wahabubit
Linkedin: https://www.linkedin.com/in/abdul-wahab-a5b8b011a

 

 

Hi Abdul Wahab,

 

Thanks for the quick response.

I have now figured it out.

Initially I was trying to select the Folder and Attachment array using 'Initialize variable' action.

This turned out to be too much.

 

Finally I saw another guide to use the action named 'Get file content using path' and the entered the Sharepoint site address and file path including the file extension. I then referred to this in the 'Send an email (V2)' action.

 

This turned out to be very simple and all is working fine now.

 

Regards,

AKarim

 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (3,057)