Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Suggested answer

Move an email sent in previous step

(1) ShareShare
ReportReport
Posted on by 294
Good Afternoon
 
I have a flow that sends an email from content submitted via a form. I would like to move that email into a specific folder once sent.
 
There is an action Move Email but there's no information available from the action to send the email. 
There's no option in the Send an Email (V2) action to save the email to a specific folder.
 
I can't get back to the classic view when looking at the run and I can't see the message id in the outputs of that action.
 
Is there any way I can get the id of that message to move it? I will need them for an audit later this year and it will be a real help to have all of it ready to go.
 
Thanks,
Christine
  • ronaldwalcott Profile Picture
    3,497 on at
    Move an email sent in previous step
    I believe what was being proposed is that you need a way to uniquely identify the email being sent but at this stage you are unable to use message id.
    Create a unique value and either add it in the body of the email or in the subject.
    Send the email.
    You can now use Get mail to search the sent items within the subject or the body for that unique value and get the message id.
    You can now use the message id to move the email to the folder,
  • Amapola188 Profile Picture
    294 on at
    Move an email sent in previous step
     
    Hi Michael, sorry, I was off sick. - I tried the Get Items based on a view and that pulled the person field through.
     
    It throws up another problem though. I'm filtering by an empty field but it looks like empty fields now no longer come through at all so how can you filter by that?
    Not sure at this stage if that's the bigger problem in the picture!
     
     
  • Amapola188 Profile Picture
    294 on at
    Move an email sent in previous step
    Neither solution suggested by @Michael E. Gernaey worked for me.
     
    outputs('Send_an_email_(V2)')?['body/MessageId'] doesn't return any output
     
    And the Get Emails action either gives me an empty output (with filter) or an error (Error loading inputs)
     
    Unfortunately, Microsoft also must have decided to send empty fields from a form submission through differently so between one flow in the morning and another two hours later, the flow broke in another place as well. (Could no longer filter out empty records on empty(), it now comes through a '0' - that is a string, not a number).
  • Suggested answer
    Michael E. Gernaey Profile Picture
    40,967 Super User 2025 Season 1 on at
    Move an email sent in previous step
     
    So you used to be able to look at 
    outputs('Send_an_email_(V2)')?['body/MessageId']
     
    I am not 100% sure that it works. 

    But what you could do is
    use Get Emails and add a filter that would be like matching your Subject etc and point at the Sent Folder
    Once you have that, you should either get back 0 or 1 Email
    OR
    You can sort them by sent date and get the Top 1 to get the one you just sent.
     
    Now you can use the Move Email to move it.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,631 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,976 Most Valuable Professional

Leaderboard