cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SjoerdH
Frequent Visitor

If a folder exists with substring(foldername,0,5)==substring(subject,0,5) move that email to said folder

I am trying to automate moving incoming emails to an unspecified folder.

If a folder exists in the inbox that has its first five characters correspond with the incoming email subject's first five character, then the email should be moved to that folder.

 

Is this even possible at this moment with PA?

2 ACCEPTED SOLUTIONS

Accepted Solutions
annajhaveri
Community Champion
Community Champion

@SjoerdH so to start with you will need to fetch the list of folder from mailbox in the flow.  You need to use graph api to do this, this blog has the instructions on how to use graph api to get list of folders from mailbox https://sharepains.com/2020/07/01/use-mail-folders-in-microsoft-graph-using-power-automate/ This requires use of http connector which is a premium connector.

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

View solution in original post

annajhaveri
Community Champion
Community Champion

@SjoerdH in that case you can create Custom Connector in Power automate to use graph api, one custom connector can be create under M365 license. Here are instructions to create custom connectors that use Graph API https://docs.microsoft.com/en-us/graph/tutorials/power-automate. You will need to follow mix of instructions from both articles one is https://sharepains.com/2020/07/01/use-mail-folders-in-microsoft-graph-using-power-automate/ and other is https://docs.microsoft.com/en-us/graph/tutorials/power-automate 

 

if you feel stuck or lost let me know.

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

View solution in original post

6 REPLIES 6
annajhaveri
Community Champion
Community Champion

@SjoerdH are you trying to move email from one folder to another folder in the same mailbox?

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

Not really...

 

1. I want to look at the first five characters of an incoming email's subject

2. I want to compare those five characters to existing Outlook folderNames.

3. If a match is found, I want the incoming email to be moved to that folder

 

It needs to be generic, so I don't need to filter for every folder seperately

@annajhaveri I guess you could state that the incoming email goed to INBOX folder first.

Then it should be moved to the folder that has a name corresponding to the email message's subject. 

annajhaveri
Community Champion
Community Champion

@SjoerdH so to start with you will need to fetch the list of folder from mailbox in the flow.  You need to use graph api to do this, this blog has the instructions on how to use graph api to get list of folders from mailbox https://sharepains.com/2020/07/01/use-mail-folders-in-microsoft-graph-using-power-automate/ This requires use of http connector which is a premium connector.

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.
SjoerdH
Frequent Visitor

@annajhaveri 
This sounds like the solution, thanks.

I don't have acces to premium connectors unfortunately...

annajhaveri
Community Champion
Community Champion

@SjoerdH in that case you can create Custom Connector in Power automate to use graph api, one custom connector can be create under M365 license. Here are instructions to create custom connectors that use Graph API https://docs.microsoft.com/en-us/graph/tutorials/power-automate. You will need to follow mix of instructions from both articles one is https://sharepains.com/2020/07/01/use-mail-folders-in-microsoft-graph-using-power-automate/ and other is https://docs.microsoft.com/en-us/graph/tutorials/power-automate 

 

if you feel stuck or lost let me know.

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (2,749)