cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jbravo
Frequent Visitor

Extracting specific email attachment and adding it to a sharepoint list

Greetings! I've only recently discovered this great forum. I've been having issue with one of my flows.

 

The flow summary is:

1. When new email arrive

   - has attachment, include attachments

2. Create item (sharepoint)

   - it then turns into this:

image.png

 

 

My problem that it adds all the attachments, like Signature .img and when I only need the user added attachment (.pdf, .docx)

 

Once it creates the items (5+) on sharepoint, it triggers an approval process for all the attachments. As shown below:

image.png

 

Is there a way to only add a specific attachment?

 

 

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions

 

Hi @jbravo ,

 

Basically, the file carries the extension, and Attachment Name obtained in Flow also has an extension.

So we recommend using ends with to determine the file type and filter the attachments, which is practical.

 

In addition, it seems that you want to store the email attachment to the attachment of the item, please refer to the following configuration:

116.PNG

If you want all the attachments to be stored in an item, please refer to this configuration:

115.PNG

 

Best Regards,

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

View solution in original post

4 REPLIES 4
ScottShearer
Super User
Super User

@jbravo 

You could use a condition to check the file extension - only take action on the file types which are of interest to you.  I am referencing Attachment Name in the condition.

NoImage.jpg

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

Thank you for the prompt response!

 

The conditional does not trigger item creation in the SP list. This is the error:

image.png

@ScottShearer 

 

Curious, will this add the PDF/Docx to the SP list? or just the Name of the document?

I've tried renaming the doc.pdf , doc.docx in order to ensure that the extension is there. However, I do no think the average user will append it..

Does the conditonal only look at the name of the attachment or the entire file object?

 

@jbravo 

Is your goal to create a list item and add the attachment to the list item or do you want to create a document in a library?  Let me know and I'll create a solution for you.

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

 

Hi @jbravo ,

 

Basically, the file carries the extension, and Attachment Name obtained in Flow also has an extension.

So we recommend using ends with to determine the file type and filter the attachments, which is practical.

 

In addition, it seems that you want to store the email attachment to the attachment of the item, please refer to the following configuration:

116.PNG

If you want all the attachments to be stored in an item, please refer to this configuration:

115.PNG

 

Best Regards,

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

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.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (4,769)