Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
pthapa
Post Patron
Post Patron

How to send excel attachment to Share Point when email is received using power automate?

Hello all,
When an email is received with attachement (excel), I want to send it to share point folder location and replace the existing one using power automate.
I have been struggling to get this work. It keeps dumping the images from the body of the email and I don't understand how to get the attachment.

Can you please help?

Here is my flow: 
Appreciate your time.
pthapa

pthapa_0-1718746452795.png

 

3 REPLIES 3
pthapa
Post Patron
Post Patron

The flow is working however there is an issue with the attachments received in the folder.

When I received the attachement in the SharePoint folder, it also sends those from email body such as company logo and image of the file as well in image format. Not sure how to eliminate those image files not coming into the folder.

Does anyone have any insight to this?

Appreciate your feedback.

Thanks,

pthapa

pthapa
Post Patron
Post Patron

Hi @v-yohua-msft ,
Thanks for your valuable response. I followed the steps you have mentioned but when I run the test, getting error. Not sure where the issue is.

pthapa_0-1718816697355.pngpthapa_1-1718816749735.png

Still not working for me!
Thanks,

pthapa

v-yohua-msft
Community Support
Community Support

Hi, @pthapa 

Start by making sure the flow starts with the appropriate trigger, such as "When a new email arrives" in Outlook. This will be the starting point of the process.

Filter attachments, in a trigger, you can specify a flow that triggers only emails that contain attachments. This helps to filter out emails without attachments from the start.

Use the Get Attachments action for Outlook 365. This action allows you to specify the email from which you want to extract attachments.

Add a condition to check if the attachment is an Excel file. You can do this by checking the file extension of each attachment. If the condition is true, proceed to the next step.

Use the Create File action in SharePoint. Specify the SharePoint site address and folder path. For file names, use the dynamic content in the attachment name, and for file content, use the attachment content.

To replace an existing file, make sure that the file name in SharePoint exactly matches the attachment name. SharePoint automatically handles versioning, and if the names match, the existing file is replaced with a new one

 

How to Get Your Question Answered Quickly

Best Regards

Yongkang Hua

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.