cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
navaidm
Helper II
Helper II

Save specific attachment from outlook

Hi all. Is there a way to look at part of (or full) filename of attachment for new emails and save only if it matches a certain string? 

1 ACCEPTED SOLUTION

Accepted Solutions
AlanPs1
Resident Rockstar
Resident Rockstar

Hi @navaidm 

Whilst this isn't a direct solution it does cover checking the file name for part of the file name. In this example the file extension.

https://www.alanps1.io/power-platform/flow/flow-excel-formats-only-save-new-email-attachments-to-sha...

In the same way I have targeted file types, you could put a full or part file name and it should do the trick.

 

Please read through and then set about looking for attachments with your desired part name or full name and I am sure you will get success.

 

If you have found my post helpful, please mark thumbs up.

Any other questions, just ask.

Thanks, Alan


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


View solution in original post

9 REPLIES 9
AlanPs1
Resident Rockstar
Resident Rockstar

Hi @navaidm 

Whilst this isn't a direct solution it does cover checking the file name for part of the file name. In this example the file extension.

https://www.alanps1.io/power-platform/flow/flow-excel-formats-only-save-new-email-attachments-to-sha...

In the same way I have targeted file types, you could put a full or part file name and it should do the trick.

 

Please read through and then set about looking for attachments with your desired part name or full name and I am sure you will get success.

 

If you have found my post helpful, please mark thumbs up.

Any other questions, just ask.

Thanks, Alan


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


ScottShearer
Super User
Super User

@navaidm :

Can you provide an example or a rule you would use to make a decision as to whether to save a file?

 

Scott

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

Scott

@ScottShearer  In first read, I think this will definitely solve my problem but let me apply the solution and get back to you. 


@ScottShearer   I created a simple flowjust to test the logic.Ran into tow issues

1)It only looks at Inbox and not subfolders of inbox.

2) Flow runs as "succesful" but condition is always false

image.png

image.png

image.png

@AlanPs1 I replied to scots message but forgot to reply to you. Please look at my post in reponse to scot. I tried your solution but it seems to run into a glitch.

Clarification on first issue. It runs only in dedicated folder . Is there a way to check all folders .

AlanPs1
Resident Rockstar
Resident Rockstar

Hi @navaidm 

The trigger "When an email arrives" only works on inbox, not a subfolder.

I had a similar conversation recently in this post. Messgaes 5 & 6.

I did mention this alternative to Semirxbih:

"What you could do, is trigger when the email arrives in the inbox and use Flow to move the email to a subfolder. This would require disabling the method you use currently to move the email" to the subfolder but this should work as long as email arrives in inbox.

 

So I don't belive there is a way to check all folders with a trigger at the time of writing, just when they arrive in inbox only. Happy to be proven wrong though if you or another can manage to get it working. It would be a great help.

 

If you have found my post helpful, please mark thumbs up.

Any other questions, just ask.

Thanks, Alan


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


@AlanPs1 Tnx for the clarification on folder / subfolder issue. 

Any ideas on issue 2. What is it that I am doing wrong here? Why is the condition always false and no files that meet the criteria are saved.

@AlanPs1  Your solution finally worked. Turns out that condition "contains" is case sensitive. I will do some research to check if unction like "lower" to change attcahment file name to lower case for comparision with given string can be used. May be you can guide me on that 🙂

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (5,842)