web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Save specific attachment from outlook

(0) ShareShare
ReportReport
Posted on by 76

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? 

I have the same question (0)
  • Verified answer
    AlanPs1 Profile Picture
    2,471 on at
    Re: Save specific attachment from outlook

    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-sharepoint/

    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

  • ScottShearer Profile Picture
    25,240 Most Valuable Professional on at
    Re: Save specific attachment from outlook

    @navaidm :

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

     

    Scott

  • navaidm Profile Picture
    76 on at
    Re: Save specific attachment from outlook

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


  • navaidm Profile Picture
    76 on at
    Re: Save specific attachment from outlook

    @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

  • navaidm Profile Picture
    76 on at
    Re: Save specific attachment from outlook

    @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.

  • navaidm Profile Picture
    76 on at
    Re: Save specific attachment from outlook

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

  • AlanPs1 Profile Picture
    2,471 on at
    Re: Save specific attachment from outlook

    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

  • navaidm Profile Picture
    76 on at
    Re: Save specific attachment from outlook

    @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.

  • navaidm Profile Picture
    76 on at
    Re: Save specific attachment from outlook

    @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 🙂

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 722 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 461 Moderator

#3
developerAJ Profile Picture

developerAJ 283

Last 30 days Overall leaderboard