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

Saving PDF attachments only from email

I have a decent flow running to save a number of my monthly invoices to my Sharepoint, format the name of the file with a date stamp and archive the message. I have noticed that this flow currently also saves all attachments and not just the invoice/PDF that I am looking for, since I have set it up in this generic fashion.

 

I am struggling with a 'filter' of some kind to adapt into my current flows. I have found the 'Condition' block and the Dynamic Content 'Attachment Content Type' variable, but have not managed to get this going in the right direction.

 

My current flow, accepting all attachments and doing ok:

Screenshot 2021-07-23 at 09.58.47.png

 

What I am looking to change, unless there is a good advice to have a different approach, is to add a filter at the top of the Create FileScope - 2 to do those steps only for the PDF files found as attachment.

 

In a test flow so as to not mess things up, I have set up the following:

Screenshot 2021-07-23 at 09.59.34.png

 

In the condition it made sense to me to check on the content type and go for PDF, but having used a number of variations on .pdf, PDF, etc. I have yet to get a succesfull hit on it seeing a PDF come into my inbox. I have not been able to find more details on how to use that variable Content Type or what format to feed into it.

 

Any suggestions?

1 ACCEPTED SOLUTION

Accepted Solutions
eric-cheng
Solution Sage
Solution Sage

Hi @RoelofR ,

 

Content type should be application/pdf

 

Screenshot_20210723-183329_Chrome.jpg

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

 

View solution in original post

3 REPLIES 3
eric-cheng
Solution Sage
Solution Sage

Hi @RoelofR ,

 

Content type should be application/pdf

 

Screenshot_20210723-183329_Chrome.jpg

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

 

View solution in original post

RoelofR
New Member

Hi @eric-cheng - thanks for your promps response! That did seem to do the trick, thanks! Is there a list/resource with other types around where I can look at for other use cases?

Hi @RoelofR ,

 

Please refer here for common MIME types.

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

 

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (2,347)