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

Email Flow based on Conversation

Hi All,

 

I've built a simple flow to fill in data in an online Excel spreadsheet when an email comes in to a shared email inbox.  What I would like to do is only add to the data table in Excel if the conversation is new, i.e. if the e-mail recieved is a reply then I would not like it to fill in data.

 

I would also like to fill in another column when the first e-mail in the conversation is responded to and yet another column when the conversation is marked complete, but that may be another topic.

 

Any ideas on which conditions I should use?

 

Thanks in advance all.

Dhinesh

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: Email Flow based on Conversation

Hi @DAsogan,

 

In general, the Subject line of Reply mail will be prefixed with a "RE:" or "Re:".

Perhaps you could check whether the subject of the received message starts with "Re:"/"RE:", if not, it is the new conversation. Then configure the corresponding action in the If no branch.

Formula reference:

 

@or(startsWith(triggerBody()?['Subject'], 'Re:'), startsWith(triggerBody()?['Subject'], 'RE:'))

Image reference:

7.PNG

Unfortunately, there is no suitable way to monitor whether the first e-mail in the conversation has responded currently. Flow does not currently support such a feature.

As for monitoring whether the conversation is marked as completed, you could use When an email is flagged as the trigger for Flow.

Please take a try.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Frequent Visitor

Re: Email Flow based on Conversation

Thanks Barry, that's a great suggestion!

 

I'll probably have to update it with regional language variations since I'm expecting e-mails from personnel that don't have English set on their local computer (e.g. German uses "AW:", etc.), but that is easy enough to add from the look of the formula.

 

Any idea where I could start with looking through the existing Subject column so the entry can be updated?

 

I'll have a play and post back if I find something.

 

Cheers,

Dhinesh

Highlighted
Community Support
Community Support

Re: Email Flow based on Conversation

Hi @DAsogan,

 

You could use Get rows action to get all the rows, then put the value of the Subject column into an array variable and see if the array contains the specified value.

A similar Thread hopes to give you some hints:

https://powerusers.microsoft.com/t5/Connecting-To-Data/Check-if-value-in-excel-exist/m-p/174915#M375...

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Users online (7,053)