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 / Move Email (V2) dynami...
Power Automate
Unanswered

Move Email (V2) dynamic supplied folder name

(0) ShareShare
ReportReport
Posted on by 28

I'm working on a flow to do some dynamic logic to determine the appropriate folder to file an email in within Outlook.  I'm running into a problem supplying the folder parameter to the Move Email (v2) programmatically. 

 

From looking at the peak code piece after using the selector is the action expecting that folder name to be provided via a GUID rather than a humanly readable path/folder name?  If so, is there any way to determine that programmatically by supplying a human-readable name to lookup the GUID in the flow?

Categories:
I have the same question (0)
  • Verified answer
    fchopo Profile Picture
    8,003 Moderator on at

    Hello @jhardwick 

    I'm not sure I understand your problem, but in any case, I attach an example flow that is working, where I move an email to the drafts folder:

    emails.png

     As you can see, the drafts folder is set in a compose action, so it's a dynamic value in the "Move email" action.

    Hope it helps!
    Ferran

  • jhardwick Profile Picture
    28 on at

    @fchopo you know you reach the point where you've looked at a problem for too long and need to stop and pick it up later, yep.. I was at that point.

     

    My issue was that I was trying to reference a subfolder under Inbox and I had been using the format of Inbox\Subfolder instead of Inbox/Subfolder and I didn't think of trying that until reading your response and looking at things again.

     

    Regards

  • Community Power Platform Member Profile Picture
    on at

    Hi! I just found your thread and it looks like my exact problem. So you made it work using the the suggestion with the "Compose" action and it also worked for sub folders? I am trying to get this working with a shared mailbox. 

  • MichelH Profile Picture
    401 on at

    Keen to know if this works on subfolders a level deeper.

    I need to move mails to:
    Inbox/Subfolder/New
    Inbox/Subfolder/Ongoing
    Inbox/Subfolder/Done

    Where Subfolder would be a variable with one of 8 choices.

    Thanks for any feedback

    Br,
    Michel

  • Community Power Platform Member Profile Picture
    on at

    Hi Michael,

    i ended up using the internal "FolderId"s. You can obtain them in the requests when using the test button in the browser console. Putting them into the "folder" field works. 

  • MichelH Profile Picture
    401 on at

    Thank you Heins,

     

    Not sure that I understand what you mean on how to obtain these folderId's. 

    Am I correct that you copy these kind of keys? I see this using Peek code.

     

    "parameters": {
    "messageId": "@items('Apply_to_each_4')?['id']",
    "folderPath": "Id::AAmKADMwNGU2zwE1LTFhZmEtNDMwMi04MmYwLThkOWYzMDA3ZjAwNgAuAAAAAABPl25eHUXgQqEdUbfVS5B8AQDD2FumZE_RTopraV1GiPOqAAACosOLAAA="
    },
    "authentication": "@parameters('$authentication')"
    },
    "metadata": {
    
    "Id::AAmKADMwNGU2zwE1LTFhZmEtNDMwMi04MmYwLThkOWYzMDA3ZjAwNgAuAAAAAABPl25eHUXgQqEdUbfVS5B8AQDD2FumZE_RTopraV1GiPOqAAABQ_hTAAA=": "New",
    
    "Id::AAmKADMwNGU2zwE1LTFhZmEtNDMwMi04MmYwLThkOWYzMDA3ZjAwNgAuAAAAAABPl25eHUXgQqEdUbfVS5B8AQDD2FumZE_RTopraV1GiPOqAAACosOLAAA=": "Ongoing"

       
    Because to me they seem like:   Mailbox + "_" + MsgID, but not the FolderID. 

     

    The folderpath is equal to the second Id.

     

    Br,

    Michel

  • Community Power Platform Member Profile Picture
    on at

    Correct.

  • MichelH Profile Picture
    401 on at

    But the second ID is generated only when the move is done.

    I don't yet know the new message ID when I want to do the move, from New to Ongoing.

    I'm moving a new message every time.

    I think I'm missing the point?

     

    Br,

    Michel

     

  • A-M Profile Picture
    41 on at

    Hi,

     

    I am in a similar situation where i dynamically setting the path on the action Move email V2 and i have the folder structure on my shared mailbox like ABC/Year/Month(12 options) and i have to move the email to one of the Month folders.

    It just fails saying "The specified folder doesn't exist." but i have the folder created on my share mailbox.

     

    Did you figure out a solution?

  • Community Power Platform Member Profile Picture
    on at

    It's been a while since we did that, but if I recall correctly, the key was to NOT concat the dynamic value in the move action on the fly but predefine a variable (or compose it) and use that instead. 

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard