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 / Email String into Arra...
Power Automate
Unanswered

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

(0) ShareShare
ReportReport
Posted on by 185

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
    185 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

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard