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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Move an incoming email...
Power Automate
Answered

Move an incoming email into another folder if the subject contains a string

(0) ShareShare
ReportReport
Posted on by

Hello,

just want to move an incoming email into another folder based on a string contained in the subject.

Here the flow:

 

Schermata 2017-02-11 alle 15.48.09.png

 

The problem is that I cannot figure out how to retrieve the message id, which is requested to move the email into another folder.

Moreover, If I select "Message ID" field from the list and save the flow, next time I open it it shows "Attachment ID" (as yoiu can see looking at the image above).....

Here the output of the flow executuon:

 

Schermata 2017-02-11 alle 15.53.15.png

Categories:
I have the same question (0)
  • v-micsh-msft Profile Picture
    Microsoft Employee on at

    Hi @kinobijei,

     

    For the Message ID, please try to search the Message ID under the Dynamic Content field, it would then have the Message ID shown out.

    And yes, I could confirm that after running the Flow, edit it again the Flow would show Attachment ID in the Message id field.

    But the Flow would work as expected, regardless whether there are attachments.

    16.PNG17.PNG

    Would you please take a try to search the Message ID, replace the Attachment ID and then save the flow to check again?

    By the way, for the scenario here, would it be available to take use of the Outlook rules?

    Check to see if this would help:

    Manage email messages by using rules

    Regards

  • kinobijei Profile Picture
    on at

    Hello @v-micsh-msft,

    Thank you for the answer.

    I've applied what you suggested and it's now working.

    Also, as you suggested, for sure I could achieve the same objective using outlook rules.

     

    Actually I just wanted to try the flows, to understand how they work.

    For instance, would it be possibile to parameterize the string onto which I'm comparing the object of the email?

     

    E.g.

    Is it possible to modify the condition in this way?

     

    Object contains {variable}

    in order to match the {variable} against a list of possible values.

     

    Then in the "move email" step, specify the folder using the variable.

     

    Move to folder --> {variable}

  • v-micsh-msft Profile Picture
    Microsoft Employee on at

    Hi @kinobijei,

     

    variables are currently not supported under Microsoft Flow.

    Please consider submit this as an flow idea:

    https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

    Regards

  • kinobijei Profile Picture
    on at

    Hello, since variables have been finally introduced, I managed to define the mentioned flow, which object is to move an incoming mail from "Arrival" to a specified folder based on a string contained in the subject.

     

    Now I've a problem into last step --> move email into existing folder

    Despite the fact It is verified that the defined variable ('NumeroCommessa') contains the name of the folder, the flow returns that the specified folder does not exist.

     

    I can ensure that the folder does exist!

    Maybe do I need to use another identifier to specify the folder?

     

    I attach the result of the flow.

     

    Can you help me?

     

    Schermata 2018-07-15 alle 11.13.09.png

     

    I also attach the piece of flow in which I pass the variable to identify the name of the folder

     

    Schermata 2018-07-15 alle 11.27.22.png

  • Verified answer
    kinobijei Profile Picture
    on at

    UPDATE

    I've solved the problem by specifing the absolute path from the Inbox.

    Now the flow works correctly.

     

    Schermata 2018-07-15 alle 15.40.08.png

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 550

#2
Valantis Profile Picture

Valantis 390

#3
11manish Profile Picture

11manish 348

Last 30 days Overall leaderboard