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

Is it possible to find a specific text in an email?

Hello,

I have a working flow that checks the body of an email and extract the data from it here's and example:
Login Name:
Submitted By:
Tracking Number:
Categories

Feedback:

All was working until the people decided to send out an email with the following format

Login Name:
Submitted By:
Hotel ID:
Categories

Feedback:

Now what happened is the ones with "Hotel ID" always fails.
My question is is it possible for me to search the body of the email first if it contains either "Tracking Number", or "Hotel ID"? This way I can do condition that if this email contains Tracking Number do this, if no do the the one for the Hotel ID.

 

1 ACCEPTED SOLUTION

Accepted Solutions
PrasadAthalye
Super User
Super User

You can implement condition like below to check if word 'Tracking Number' exist in the body of the email...

 

indexOf(triggerOutputs()?['body/Body'], 'Tracking Number' )

 

PrasadAthalye_0-1633372451082.png

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

View solution in original post

2 REPLIES 2
PrasadAthalye
Super User
Super User

You can implement condition like below to check if word 'Tracking Number' exist in the body of the email...

 

indexOf(triggerOutputs()?['body/Body'], 'Tracking Number' )

 

PrasadAthalye_0-1633372451082.png

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

The concept worked for me! But rather than doing a code I just used a condition. Thank you so much!

tr0jance_0-1633426746846.png

 

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (2,912)