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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
Answered

1

(1) ShareShare
ReportReport
Posted on by 2

I am trying to build a flow to automate adding data from an email to excel. The email format is as follows:

 

EXTERNAL EMAIL– Use caution with any links or file attachments.

 

Exercise caution: This email originated from an external source. Please do not click links or open attachments unless you trust the sender and know the content is safe.

 

 

Study - 1234-567

(Information-Import)

 

Error Message: The record contains a component (serial) number for protocol <1234-567> already used in an order.

 

File Material Number: 88888888

File Pack Type: 0001

File Plant: 1234

File Storage Location: 1234

File Shipping Point: 1234

File Inventory Batch: XZ12345

File Expiry Date: 2024-12-31

File Country: NA

File Do Not Ship: 2024-11-08

File Serial Number: 3395104

File Barcode: 175080597

File Sequence: 3395104

 

 

Study - 1234-567

(Information–Import)

 

Error Message: The record contains a component (serial) number for protocol <1234-567> already used in an order.

 

File Material Number: 567890

File Pack Type: 0001

File Plant: 5678

File Storage Location: 5678

File Shipping Point: 5678

File Inventory Batch: XZ12345

File Expiry Date: 2024-12-31

File Country: NA

File Do Not Ship: 2024-11-08

File Serial Number: 3395105

File Barcode: 1099254324

File Sequence: 3395105

 

Every email contains multiple records like this with the same error message. I am trying to read the file serial number, barcode, sequence etc for each record and add it into a row in excel. I tried implementing the following flow but can't seem to extract just the numbers I want-

Screenshot 2024-06-17 100059.png

 

 

I used compose to convert the entire body of email to string and compose1 to split the content by "Error Message: "

Please Help 😞 !!

 

 

Categories:
I have the same question (0)
  • Verified answer
    v-yetonggu-msft Profile Picture
    Microsoft Employee on at

    Hi @thawani ,

    Please check this test:

    Email Body:

    vyetonggumsft_4-1718675201775.png

    Flow Preview:

    vyetonggumsft_0-1718674930707.png

    Flow Configuration:

    vyetonggumsft_5-1718675530239.png

    skip(split(outputs('Html_to_text')?['body'],'already used in an order.'),1)

    vyetonggumsft_2-1718675090738.png

    trim(split(split(items('Apply_to_each'),'File Material Number:')[1],'File Pack Type:')[0])
    trim(split(split(items('Apply_to_each'),'File Pack Type:')[1],'File Plant:')[0])
    trim(split(split(items('Apply_to_each'),'File Plant:')[1],'File Storage Location:')[0])

    Excel Table:

    vyetonggumsft_3-1718675139833.png

    Best Regards,

    Sunshine Gu

     

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 791

#2
Valantis Profile Picture

Valantis 582

#3
Haque Profile Picture

Haque 529

Last 30 days Overall leaderboard