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 : bqfCKwkp84aP/YJHHw9iD4
Power Automate - Building Flows
Answered

Save email attachments with specific words in name

Like (0) ShareShare
ReportReport
Posted on 13 Jan 2020 10:52:23 by 109

I'm really new to Power Automate... as in I didn't know it existed before Friday!

 

I'm trying to create a flow which will save any Risk Assessments we send or receive by email to a folder. I don't care where they're saved (hard drive, SharePoint, OneDrive etc), but all I can currently do is save every single attachment. I don't understand how to just look for something with 'Risk' AND 'Assessment' in the attachment name. 

 

Help!! 😊

I have the same question (0)
  • manuelstgomes Profile Picture
    6,625 on 13 Jan 2020 at 11:30:41
    Re: Save email attachments with specific words in name

    HI @Magikmissy 

     

    First of all welcome to Power Automate! Glad that you're here automating stuff. 🙂

     

    Please check if this is what you need. 

    Screenshot_2020-01-13_at_11_25_37.jpg

     

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

    Cheers
    Manuel

  • Magikmissy Profile Picture
    109 on 13 Jan 2020 at 11:53:29
    Re: Save email attachments with specific words in name

    Thank you @manuelstgomes  Is this right?scrn.jpg

  • v-alzhan-msft Profile Picture
    on 14 Jan 2020 at 05:58:12
    Re: Save email attachments with specific words in name

    Hi @Magikmissy ,

     

    Your flow is correct and you could achieve your requirement with the flow.

     

    Best regards,

    Alice       

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

  • Magikmissy Profile Picture
    109 on 14 Jan 2020 at 08:55:27
    Re: Save email attachments with specific words in name

     

    Hi @v-alzhan-msft and @manuelstgomes , 

     

    Thanks for your helkp but it's just not working. It shows that the runs were successful, but no attachments are saving onto my OneDrive. 

     

    scrn.jpg

     

  • manuelstgomes Profile Picture
    6,625 on 14 Jan 2020 at 09:34:00
    Re: Save email attachments with specific words in name

    Hi @Magikmissy 

     

    Can you please click one of the runs and check the "For Each". We need to check how many attachments are there (runs were made) to ensure that we get the attachments correctly. 

     

    LIke @v-alzhan-msft  mentioned your flow is correct, so we need to understand where is the detail that is missing.

     

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

    Cheers
    Manuel

     

  • Magikmissy Profile Picture
    109 on 14 Jan 2020 at 09:40:50
    Re: Save email attachments with specific words in name

    Thanks @manuelstgomes. I couldn't find anything that said "For Each" but I found this... does that help...? (Sorry to be a pain!)

     

    scrn.jpg 

  • manuelstgomes Profile Picture
    6,625 on 14 Jan 2020 at 09:45:13
    Re: Save email attachments with specific words in name

    Hi @Magikmissy 

     

    It does help thanks.

     

    This means that, even if you have attachments, none is named like you want them to. You can check that in the "Body" JSON file in your screenshot and scroll down to check the attachment names. I'm sure that the names won't be  'Risk' AND 'Assessment' so they fail the IF and don't get saved.

     

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

    Cheers
    Manuel

  • Magikmissy Profile Picture
    109 on 14 Jan 2020 at 09:51:23
    Re: Save email attachments with specific words in name

    Sorry - I'm probably being really thick here...! Is this the bit you mean? I just want it to save things where what it's called contains both 'Risk' and 'Assessment'. 

    scrn.jpg

  • manuelstgomes Profile Picture
    6,625 on 14 Jan 2020 at 10:06:10
    Re: Save email attachments with specific words in name

    Hi @Magikmissy 

     

    No worries. I probably didn't explain it correctly. 

     

    Check the run history and, in the "Body" before the IF statement finds in the huge text there the file attachment name. You'll see that the names of the files that you find there won't be called as you want them.

    scrn.jpg

     

    If you want, copy the full text and paste it here or send me as a DM if you don't want to make stuff public and I'll try to help you find the information.

     

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

    Cheers
    Manuel

     

     

  • manuelstgomes Profile Picture
    6,625 on 14 Jan 2020 at 10:35:24
    Re: Save email attachments with specific words in name

    HI @Magikmissy 

     

    Thanks for sending me the information. You do have a file called "Risk Assessment.docx," so the file should be saved.

     

    But I just noticed something in your original post. You're using a SharePoint path in the "Create File" action. If you want to save it into OneDrive, you should have a path like "/Documents/path1/path2" and not a SharePoint URL.

    scrn.jpg

     

    If you want to save it to SharePoint, you need to use the SharePoint action instead. 

     

    Can you please try to pick the folder and rerun the Flow so that we're sure that it's saving in OneDrive?

     

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

    Cheers
    Manuel

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 788 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 452 Moderator

#3
developerAJ Profile Picture

developerAJ 302

Last 30 days Overall leaderboard