cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Alastairs
Level: Powered On

Getting first line of email as a variable

I am setting up a system of logging new tickets for our team.

 

These will be sent in via email.

 

The subject has a unique bit of text at the start for my flow to pick it up and then customer name, date and time all taken from the spreadsheet

 

The first 2 lines of the email are reserved for the following, both taken from the spreadsheet;

Date

Time

I am looking to take the first line which will only be a date in the format dd/mm/yyyy.

I have got as far as converting the body from html to txt but I am stuck with how to select this date.get date help.png

Thanks for advance for your help

3 REPLIES 3
Super User
Super User

Re: Getting first line of email as a variable

@Alastairs 

Hi there.  I wonder if you left it in HTML, if you'd be able to Split() the body on something like <p> and grab the first two elements of the resultant array.

 

Let me 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.

Dual Super User
Dual Super User

Re: Getting first line of email as a variable

Hi @Alastairs 

 

Just to add to @edgonzales suggestion, you can actually split the body of the email on enter keys. You need to initialize a variable of type string and hit an enter and save it. Next, in a compose action, use the expression first(split('mailbody',variables('enter'))) and this should get you the first line of the body of the email. You can check out the hack that I have posted here: https://powerusers.microsoft.com/t5/Power-Automate-Community-Blog/10-MS-Flow-hacks-troubleshoots-wor... 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Alastairs
Level: Powered On

Re: Getting first line of email as a variable

Sorry for the lateness of replying and thank you for looking into it.

 

Hopefully I'll get some free time tomorrow afternoon to dig into this properly.

Helpful resources

Announcements
firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

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!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

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