web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Splitting the body of ...
Power Automate
Unanswered

Splitting the body of an eMail

(0) ShareShare
ReportReport
Posted on by 7

I have a WebForm that eMails the results to me,

I need to separate the relevant data out - the solutions I am trying (e.g. https://www.youtube.com/watch?v=7tZ6bRtco3Y) are not working, can somebody please advise.

 

Below is the body once HTML to Text and Split lines has been run.

[
"Caution: This email originated from outside of the organisation. Do not click",
"links or open attachments unless you recognise the sender and know the content",
"is safe. ======== Offline form data ======== 11-Digit Reference Number",
"49900000000 Company Name Bobs Burgers Contact Name (to receive email)",
"Rhys White Email Address (to receive request) rhys@rhys.co.uk"
]

 

Each piece of data comes after the field name - the reference number is a set length but none of the other peices of data have a set format or length.
11-Digit Reference Number

Company Name
Contact Name (to receive email)
Email Address (to receive request)

Categories:
I have the same question (0)
  • VictorIvanidze Profile Picture
    13,073 on at

    Could you show the real HTML body? It seems much easier is to parse HTML text. 

  • martinargimon Profile Picture
    5 on at

    hi victor

    Is there a 'Forum' where i can ask for help with my flows ?, similar to the forum that i sometimes contact for my Excel issues?

    Kinldy let me knwo

    Thanks

    Martin Argimon

  • VictorIvanidze Profile Picture
    13,073 on at

    You are already there. IMHO it's a best place to talk about Power Automate.

  • WhiteR Profile Picture
    7 on at

    Thanks for looking

    This is the HTML as seen in the 'When a new eMail Arrives in a shared mailbox (V2) trigger

    Green highlights the text I need

    {"headers":{"Pragma":"no-cache","Transfer-Encoding":"chunked","Retry-After":"15","Vary":"Accept-Encoding","x-ms-request-id":"88443f08-b34d-437a-9cb4-f7a33dc58b7d;aac6061b-a8de-45d9-b5b3-4aaa8e6868f2;344d8953-7994-4e5b-9bd0-2c8b0b3bf22e","Strict-Transport-Security":"max-age=31536000; includeSubDomains","X-Content-Type-Options":"nosniff","X-Frame-Options":"DENY","Cache-Control":"no-store, no-cache","Location":"https://uk-001.azure-apim.net/apim/office365/shared-office365-24a4dcea-a5ca-400f-ace9-f6f35c6785d6/v2/SharedMailbox/Mail/OnNewEmail?mailboxAddress=prodcom_pdf%40ons.gov.uk%3b&folderId=Inbox&importance=Any&hasAttachments=false&includeAttachments=false&LastPollInformation=eyJMYXN0UmVjZWl2ZWRNYWlsVGltZSI6IjIwMjMtMDEtMzFUMTY6MzE6NTArMDA6MDAiLCJMYXN0Q3JlYXRlZE1haWxUaW1lIjoiMjAyMy0wMS0zMVQxNjozMTo1MCswMDowMCIsIkxhc3RNZXNzYWdlSWQiOiJBQU1rQUdJelpEZ3pZakJtTFdFMFpHWXRORE01TkMwNE9UUmxMV1V3WVRBMU56RTVOREl3TVFCR0FBQUFBQUQtMUJnWExwVkhSYnJKYy1aNjRXMFVCd0JwRnpaSzdTRENTYUQ0dElJc0ZsakhBQUFBQUFFTUFBQnBGelpLN1NEQ1NhRDR0SUlzRmxqSEFBQVprQktMQUFBPSIsIkxhc3RJbnRlcm5ldE1lc3NhZ2VJZCI6bnVsbH0%3d","Set-Cookie":"ARRAffinity=034a92f9ba2fc4ecf4919720c4a64dda736d4b72182be442bf2b2ab6744078db;Path=/;HttpOnly;Secure;Domain=office365-ukw.azconn-ukw-01.p.azurewebsites.net,ARRAffinitySameSite=034a92f9ba2fc4ecf4919720c4a64dda736d4b72182be442bf2b2ab6744078db;Path=/;HttpOnly;SameSite=None;Secure;Domain=office365-ukw.azconn-ukw-01.p.azurewebsites.net","Timing-Allow-Origin":"*","x-ms-apihub-cached-response":"true","x-ms-apihub-obo":"false","Date":"Tue, 31 Jan 2023 16:36:25 GMT","Content-Type":"application/json; charset=utf-8","Expires":"-1","Content-Length":"2905"},"body":{"id":"AAMkAGIzZDgzYjBmLWE0ZGYtNDM5NC04OTRlLWUwYTA1NzE5NDIwMQBGAAAAAAD-1BgXLpVHRbrJc-Z64W0UBwBpFzZK7SDCSaD4tIIsFljHAAAAAAEMAABpFzZK7SDCSaD4tIIsFljHAAAZkBKLAAA=","receivedDateTime":"2023-01-31T16:31:50+00:00","hasAttachments":false,"internetMessageId":"<20230131163148.2B96E1FF077@uk3420.uk3.whitepj.net>","subject":"[ Customer message ] No subject","bodyPreview":"Caution: This email originated from outside of the organisation. Do not click links or open attachments unless you recognise the sender and know the content is safe.\r\n\r\n\r\n======== Offline form data ========\r\n11-Digit Reference Number\r\n 49908492433\r\n\r\nC","importance":"normal","conversationId":"AAQkAGIzZDgzYjBmLWE0ZGYtNDM5NC04OTRlLWUwYTA1NzE5NDIwMQAQAIYQq8cPgzNPg6pZAhqCFVQ=","isRead":false,"isHtml":false,"body":"Caution: This email originated from outside of the organisation. Do not click links or open attachments unless you recognise the sender and know the content is safe.\r\n\r\n\r\n======== Offline form data ========\r\n11-Digit Reference Number\r\n 49911111111\r\n\r\nCompany Name\r\n Bobs Burgers Ltd\r\n\r\nContact Name (to receive email)\r\n Rhys White\r\n\r\nEmail Address (to receive request)\r\n rhys@rhys.co.uk\r\n\r\n\r\n\r\n\r\n","from":"no-reply@uk3.vccmail.8x8.com","toRecipients":"blabla_pdf@XXX.XXX.uk","replyTo":"no-reply@uk3.vccmail.XXX.com","attachments":[]}}

  • VictorIvanidze Profile Picture
    13,073 on at

    Aha - it' s a plain text message.

    Split this text by \r\n\r\n to get the array of strings.

    if you wish to find the value of  the Company Name, iterate the array to find the string that starts with "Company Name" and split it by \r\n. The second element (with index 1) will be "Bobs Burgers Ltd".

  • WhiteR Profile Picture
    7 on at

    Cheers Victor, will look at this in the next few days.


    Very clear it's not HTML - missed that.

  • WhiteR Profile Picture
    7 on at

    Hi

    I've just attempted this and can't work it out ... this isn't my first time with Power Automate or Coding but it is my first time to build something like this in Power Automate - I am not totally familiar with all the functions.

    As much help as can be given would be beneficial.

    Thanks

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard