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

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Extracting multiple it...
Power Automate
Answered

Extracting multiple items of data from an email

(0) ShareShare
ReportReport
Posted on by 10

I am new to this, and I am looking to pull data from a system generated email using Power Automate.  The email format is always the same, but the amount of 'Errors' can vary.  As per below:-

 

Date  6/10/23 Time 13.25  Input File /usr/tract/tmp/slorderin_ABH001_660303893_ET3327624.in

File Type TRACT - TRACT_EDI

EDI Format :

 

Our Customer ABH001  61HS04 Demo Customer ABH001  Jones, Miss Joe

Order No. 660303893                               

ERROR 90797  McV Jaffa Cake Snack Pack  20x4pack      1.00

ERROR **** Above product is discontinued - removed from order! ***

 

Our Customer ABH001  61HS04 Demo Customer ABH001  Jones, Miss Joe

Order No. 660303893                               

ERROR  8420  Diet Seven Up 7UP Cans  24x330ml      1.00

ERROR **** Above product is discontinued - removed from order! ***

 

Our Customer ABH001  61HS04 Demo Customer ABH001  Jones, Miss Joe

Order No. 660303893                              

ERROR  9351  Tango Diet Orange Cans  24x330ml      1.00

ERROR **** Above product is discontinued - removed from order! ***

 

Copy of full input file follows.....

 

-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

 

We receive roughly 50 of these emails from our main system daily.  I would like to pull the data from each error and save into an excel spreadsheet, that just adds a new line with every occurrence of these emails.

 

The customer and order number is the same for all errors in an email, which I can pull.

 

If anyone could help it would be greatly appreciated.

 

Cheers


Andrew

 

Categories:
I have the same question (0)
  • Verified answer
    SudeepGhatakNZ Profile Picture
    14,394 Most Valuable Professional on at

    @AndrewGibbo ,

    Firstly, separate each data section into individual lines.

    You can achieve this by splitting the data as shown below.

    SudeepGhatakNZ_0-1696908953444.png

    SudeepGhatakNZ_1-1696908992707.png

     

    Once you have separated the number of rows, you can then extract the values using the technique I have explained in this blog.

     Extracting key values from an Email - Powering your Apps (sudeepghatak.com)

     

    Hope that helps!

     

  • AndrewGibbo Profile Picture
    10 on at

    Hi Sudeep, thank you for the reply.

    I'm assuming that the flow starts with the email arriving, then I am converting the email 'html to text' to start is it?

     

    How do I deal with multiple occurrences of the data lines:-

    Our Customer, Order Number, Error on Product Code, Error Reason.

     

    Many thanks

     

    Andrew

     

     

     

     

  • Verified answer
    SudeepGhatakNZ Profile Picture
    14,394 Most Valuable Professional on at
  • AndrewGibbo Profile Picture
    10 on at

    Many thanks for your help Sudeep, this worked a treat 👍👍

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 239 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 177 Super User 2026 Season 1

#3
Kalathiya Profile Picture

Kalathiya 97 Super User 2026 Season 1

Last 30 days Overall leaderboard