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 Platform Community / Forums / Power Automate / Email String into Arra...
Power Automate
Answered

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

(0) ShareShare
ReportReport
Posted on by 191

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

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    DexPoint Profile Picture
    191 on at

    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

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 921

#2
Valantis Profile Picture

Valantis 801

#3
Haque Profile Picture

Haque 588

Last 30 days Overall leaderboard