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 / Retrieve attachments f...
Power Automate
Answered

Retrieve attachments from an email based on information from a forms

(1) ShareShare
ReportReport
Posted on by 5
Hello everyone,
 
I created this post in order to get your help, I want to create a flow allowing me that if a person fills out my forms form, they receive an email asking them to send me attachments. When this person responds to me and sends me attachments, I want these attachments to be automatically saved in a "Registration" folder. When saving these attachments, I want, first of all, the automatic creation of a folder with the first and last name of the person who completed the form.
ex: File/registration/LAVOINE Marc/ and then when we open this file we find all the attachments that he sent.

Here's what I did and it half-works and I don't really understand why it doesn't work :
 
As you can see:
- I retrieve the information that my form has been completed
- I collect the different answers inside this one
- then I send him an email based on the email he entered in the form where I ask for the attachments
- I retrieve the email which will be sent to me in return with the attachments
- I create a variable in order to create the file based on the first and last name on the questions in the form
- I created the sharepoint folder with this variable
- Then I have a first loop which analyzes all the emails received in the mailbox (body/value)
- then in this loop I have another loop which searches for all attachments
- and I ask it to create a file for each attachment in the folder that has just been created
 
 

Currently when I create this flow, I have the folders which are created but the attachments are not saved. and when I remove the whole part with the folder creation, the attachments are saved only in testing and not automatically outside of testing.
 
 
Can someone help me please ?
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,493 Super User 2025 Season 2 on at
    Hi,
     
    So the issue is that you have to separate the response details of the Form Submission, from the receiving the emails.
     
    Think of it like this.
     
    1. At 500PM they submit the form
    2. You send them an email to ask them for attachments, but they don't do it for 2 days.
     
    Your flow isn't going to wait for 2 days, its immediately trying to "find" the email versus when it comes in.
     
    What you need are 2 flows.
     
    Flow one is capturing the form details and sends the email for attachments. You should ask them to specifically respond TO your email versus responding and sending a fresh one.
     
    Then you need a second flow
    It will trigger when you get emails, and you will have to look at things like the subject etc, or have an identifier in the subject name, when you sent to them originally from the other flow.
     
    Each email that comes in the flow will trigger to see if its one of the ones responding to the #1 Flow request email
     
    and then it would take the attachments, create the folder(s) and save them. It could even update a SharePoint list (assuming you decide to track all of this in SharePoint) etc
     
    But thats why it doesn't work, you cannot immediately just check for responses to your email as no way they are going to respond that fast. It will have to be a second flow.
     
    I recommend, that you have a sharepoint list, that Flow 1 populates with data about the person, the email ID etc.
    This way, when flow 2 is triggered, you can compare the email ID and possibly compare some unique ID you place in the subject or body, to match it to the row in SharePoint, that you created in the first place.

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

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard