cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sudosaurus
Post Partisan
Post Partisan

Match subject line against existing list item and update with body text

Hello,

 

I have a flow where a user receives an email when their email has been added to a SharePoint list.

In the email their ticket number is confirmed in the email body and the subject line [WFM-2] where 2 = list ID number.

 

Is there a flow action that if the user replies to the email where it would check the subject line and see that [WFM-

already exists and then matches the number against the existing list item and copies the reply response into a text field in the SharePoint list? Rather than having a new ticket created.

 

See my current flow below - which is not working.

 

sudosaurus_0-1602775881545.png

 

sudosaurus_0-1602777782222.png

sudosaurus_1-1602777821306.png

 

2 REPLIES 2
edgonzales
Super User II
Super User II

@sudosaurus 

Hi there.  Short answer: "Yes".  But a couple of questions first:

  • If we want to avoid replies creating new tickets, have you considered filtering out emails where the subject starts with RE:?
  • Assuming we still want the text from the reply once we found the matching SP Item, how do we handle if there is already text in that field?  Append? Replace?

If you are still moving forward...My suggestion - 

  • When the email comes in, parse the subject line into two bits using Split() - and store the WFM and the 2 in two different Compose actions.
  • Use the first part in a Switch action, to check the appropriate list using a List Items action filtering on the second Compose from your subject line.
  • Use Configure Run After to add the line if no match is found.
  • If a matching item is found, store the existing comments in a third compose so that when you grab the body of the email, you can update the text field with the original comments followed by the new text from the email.

I think that should get things started.  Let us know what you think.

-Ed

 

If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

Hi @edgonzales (Ed),

 

That sounds good using Re: in the subject line.

 

I'm still a novice flow creator.

 

Please could I get some visual pointers on how to set that up if possible?

 

Thanks (:

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (2,224)