Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Email String into Array or Loop to update a row in excel table

(0) ShareShare
ReportReport
Posted on by 122

GOAL: take email output from a system that generates a sales order and update the row in Excel that is applicable to that order.

 

Example: We receive this email from a system, it will always be "UniqueKey" "PO" "Order Number".  it could be 1 order or be 5 etc.
Ill use the Unique Key and find that row in excel and populate the Order Number in column26

 

Sample data below

SPE2D623F9U6Q-1-F5402G        SPE2D623F9U6Q            0000022508

SPE2D623F9U6Q-2-F5402G        SPE2D623F9U6Q            0000022508

SPE2D623F9U6Q-3-F5402G        SPE2D623F9U6Q            0000022508

 

Here is Inbound email body

DexPoint_1-1702633780034.png

 

 

I will say i had a bit of issues with the HTML format, in the end i chose to not use the HTML to Text convert.

 

I removed the Tabs /t with decodeUriComponent('%09')

I removed the returns /r/n with decodeUriComponent('%0D%0A')

 

I removed the blank spaces at end with filter array.

 

DexPoint_0-1702633733704.png

 

I thought about doing a count of lines (because it will always be different number of lines) then just loop through each line grabbing the Split(First( and find the record then update it with Split(last( of each line, but i thought this might be a lot of work and not be efficient or fast.

 

but i thought maybe it would be easier to somehow format each line and turn into json then do the loop to find each element?  but im struggling after this because its considering each line a string. 

 

Looking for some options on what i can do, would it be best to try and format everything if so how would i do that?

 

Thanks,

Dex

 

 

 

  • Verified answer
    DexPoint Profile Picture
    122 on at
    Re: Email String into Array or Loop to update a row in excel table

    I solved this using a select statement that formatted it into JSON format. there was a nice post that broke it all down. then i put that into a loop and it all worked out.

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492