My flow works great to produce my results but says failed overall.
The email I receive contains 3 different file types. I only want the .xls, it errors out with cannot open document, invalid file type.
How can I add a condition before the conversion to only try to take the .xls file?
Thank you for posting.
According to your description, you would like to only save .xls file from received emails. If any misunderstanding, please kindly let me know.
We should add one more ‘get attachments’ action to get attachments details and modify flow as below:
Since we do have two different kinds of excel file whose extension name is ‘.xls’ and ‘.xlsx’. If you use contains ‘.xls’ as condition, flow will filter both types of excel. However, if you want ‘.xls’ only, we should use ‘ends with’ instead.
Once tested, I’m able to get ‘.xls’ file only.
Test email with several attachments:
Only '.xls' created in SPO.
Hope the content above may help you.
Thank you for taking time out and assisting me. I have updated my code.
Can you explain why I am doing it this way though? I added an additional step (Get Attachment v2). It adds and additional 7 seconds.
I would have though just changing my condition to Name / ends with / .xls would be enough?
Thank you, I am trying to understand each step as best as I can and will ask a lot of questions of why.
Thank you for your update.
If we only check 'include attachment' & 'has attachment' in 'When a new email arrives' trigger, it only detects the presence of attachment but doesn't include the content details inside although we can find related parameter in dynamic content area. That's why we can't open created file and need one more 'get attachment' to obtain that content.
Hope that helps.
Keep up to date with current events and community announcements in the Power Automate community.
A great place where you can stay up to date with community calls and interact with the speakers.
Check out the latest Community Blog from the community!