cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kliu415
Regular Visitor

Building a flow to export email data to sheets in awkward format.

Hi,

 

I'm looking to build a flow where I can export outlook email data to sheets. 

The email is in a weird format, see ex)1

Numbers and models have been replaced.

I need to build a flow where I can grab each field No., Parts No., Description/ Specification Model, Price, Qty, and put them into individual cells. 

If that is not possible, can I build a flow where I can grab the field values"1   123456       xyzDescription/abc123model        USD 123.45      1" and put them into one cell. 

 

NOTE: the part numbers and models in the field values always change.

 

ex)1

--------------------------------------------------------------------------------

No. Parts No.     Description/Specification  Model                  Price    Qty

--------------------------------------------------------------------------------

1   123456       xyzDescription/abc123model        USD 123.45      1

--------------------------------------------------------------------------------

                                                       Total   USD 123.45      1

--------------------------------------------------------------------------------

1 REPLY 1
Rhiassuring
Community Champion
Community Champion

So based on what you've posted, I'm guessing that the -------'s are always the same length?

And the column names are always the same.....?

There will probably be a variable amount of rows...

So I think first, I'd split on the ----'s.


Then, you'll get rid of the first row (won't need the titles since they're always the same), and the last 2 rows (one is empty, and then the second to last will be the total) 

Then I think I'd split each remaining row by the spaces (it looks to be the same amount of spaces each time?), and then I'd compose an array using the field names on the left and the value on the right, pointing to its place in the array. For example, 

 

{
"Parts No.":"outputs('Compose')[1]",

"Description/Spec":"outputs('Compose')[2]"
}

You can use that to add a new row to your Excel table - and then you'll already be in an Apply to Each since you split the row.

 

Let me know what you think. 

 

R

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (6,011)