cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KayBains
Helper I
Helper I

Move Email After being Read to Specific Folders Based on Email Address

I would like to create a flow which will look at each from email address after it has been read (approx. four hundred emails daily) and move it to the appropriate folder:

E.g.

email from say joe.bloggs@a1.com

Email after read to be moved to a1 folder

 

email from say joe.bloggs@a2.com

Email after read to be moved to a2 folder

 

where a1 and a2 are clients

 

There are literally about 200 clients,  so firstly need to extract the filename  from the email address and then  move  the email into the folder with the corresoponding filename

 

Would like to create this flow  with the minimum of branching

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-duann-msft
Community Support
Community Support

Hi @KayBains 

 

Thank you for posting.

 

According to your description, you would like to categorize received emails based on their domain name. If any misunderstanding, please kindly let me know.

 

Considering you only want to move read emails, thus, we can’t use ‘when a new email arrives’ as trigger. Meanwhile, we have 25 limitation for ‘get emails’. It means we can only get 25 email items at most while run ‘get emails’ action.

 

So from my recommendation, we need to start flow using recurrence type flow. It will move 25 emails every time until no read emails in inbox.

Flow overview:

v-duann-msft_0-1621569516588.png

 

Flow in detail(Only check emails received within today):

received:@{formatDateTime(utcNow(),'yyyy-MM-dd')}

v-duann-msft_1-1621569516594.png

 

The 2 compose actions are used to extract domain name from sender address:

last(split(items('Apply_to_each')?['from'],'@'))

first(split(outputs('Compose'),'.com'))

v-duann-msft_2-1621569516600.png

 

After testing, I’m able to move emails accordingly. You may encounter flow failed issue because no all received emails can match the condition. That’s normal, just check if emails moved to specific folder successfully.

v-duann-msft_3-1621569516603.png

 

Hope the content above may help you.

 

Best regards,

Anna

View solution in original post

1 REPLY 1
v-duann-msft
Community Support
Community Support

Hi @KayBains 

 

Thank you for posting.

 

According to your description, you would like to categorize received emails based on their domain name. If any misunderstanding, please kindly let me know.

 

Considering you only want to move read emails, thus, we can’t use ‘when a new email arrives’ as trigger. Meanwhile, we have 25 limitation for ‘get emails’. It means we can only get 25 email items at most while run ‘get emails’ action.

 

So from my recommendation, we need to start flow using recurrence type flow. It will move 25 emails every time until no read emails in inbox.

Flow overview:

v-duann-msft_0-1621569516588.png

 

Flow in detail(Only check emails received within today):

received:@{formatDateTime(utcNow(),'yyyy-MM-dd')}

v-duann-msft_1-1621569516594.png

 

The 2 compose actions are used to extract domain name from sender address:

last(split(items('Apply_to_each')?['from'],'@'))

first(split(outputs('Compose'),'.com'))

v-duann-msft_2-1621569516600.png

 

After testing, I’m able to move emails accordingly. You may encounter flow failed issue because no all received emails can match the condition. That’s normal, just check if emails moved to specific folder successfully.

v-duann-msft_3-1621569516603.png

 

Hope the content above may help you.

 

Best regards,

Anna

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (1,972)