I'm trying to create a flow in which the below should follow:
Email arrives in Inbox eg: ISD-1234 Review of Work
An Item is created on a Sharepoint List
A reply email is received in inbox same subject but now has RE: ISD-1234 Review of Work
I require to update that same Item in Sharepoint with the details from the reply RE: email eg: body of email for responses.
Essentially I require to use Email as a task tracker in sharepoint but I get replies all the times and the flow i have now just duplicates the responses and adds a new item every time a reply is sent.
You can use the "Conversation ID" to determine if this is the same thread or not.
I might suggest also storing the Conversation ID in your list, and when a new email is received, check if the converstaion ID exists or not. If it exists, update that time, otherwise add a new item.
Hello - thank you for the reply! I'm a little bit new to Power Automate - just wondering if you would be able to point me in the right way of the Conversation ID and how this might look in a flow?
Just lost internet...so just quickly typing this on my phone. I'll try in the morning again and give you a better response if this doesn't make sense. But if you an supply some screenshots as well of your flow, that would also be helpful as I may be interpreting this incorrectly.
I am assuming you are using "when a new email arrives" to trigger your flow. If so, then one of the dynamic contents fields (much like you can get TO, FROM, SUBJECT) is Conversation ID. So you can use this field in Create Item, Conditions, etc. So I'm suggesting something like:
1. Trigger --- when email arrives
2. Do a get items with a filter to see if any itesms have the trigger's conversation ID
3. If exist, update the list with your data
4. If doesn't exist, create new item in list with your data
This would be my approach. Now my example here doesn't really do much with the list as I don't know what you are trying to do, so you'll need to update as required:
1. I have a column created in my SharePoint list called ConvoID (type String). I wouldn't have this in a view for end users (if your list is exposed to end users).
2. Starting off exactly as you did, I would trigger when a new email arrives, and then do a "Get Items" action, but I would add in a filter query to see if this "conversation" already exists (in other words, if the conversation doesn't exist, it is a brand new email, not a reply).
3. Then I need to check if anything is returned from this query. If the conversation exists, you would get a value from this get items call, if not, you'll get a blank result. To check this, I am just checking to see if the result has a length greater than zero.
4. Now if the length is greater than 0 (conversation exists) just update the item with whatever needs to be updated. If not, then you will create a new item with the data you require...but the key is that you need to make sure to put the conversation ID in the field you created to capture this.
Hopefully that works for you.
Hi @ccc333ab ,
thanks for providing guidance above. It works almost perfectly but since the trigger is for 'when new email arrives' it exclude ''just reply'' email from shared inboxes
To give you more background - I've created flow to track all emails coming to shared inbox so I can easily report on 'response time' (it's part of our KPIs to respond within 48hrs). So my items are not updated in case WE send a response and the requester doesn't come back anymore.
Any ideas how to achieve that?
@Dinkies - Not the most elegant solution but you could duplicate the flow, and change the FOLDER field in the "When a new email arrives" trigger to SENT ITEMS instead of inbox. This would also allow you to have different logic based upon receiving an email vs. sending an email.
Keep up to date with current events and community announcements in the Power Automate community.
A great place where you can stay up to date with community calls and interact with the speakers.
Check out the latest Community Blog from the community!