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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Save email attachments...
Power Automate
Unanswered

Save email attachments with specific words in name

(0) ShareShare
ReportReport
Posted on 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!! 😊

Categories:
I have the same question (0)
  • manuelstgomes Profile Picture
    6,625 on at

    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 at

    Thank you @manuelstgomes  Is this right?scrn.jpg

  • v-alzhan-msft Profile Picture
    on at

    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 at

     

    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 at

    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 at

    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 at

    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 at

    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 at

    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 at

    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard