cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

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
Highlighted
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.

Highlighted

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (7,607)