Parse Google Sheets Twice, Combine Bundles, and output Text

Overview: I have an internal order form that dumps orders into a Google Sheets. Unfortunately, the form tool I’m using dumps all product information into a single cell. Each is a new line, but all in one cell. Like this


There is potential an order could have more than just 2 items like pictures above.

My Scenario:

I’m first parsing by each new line ([^\n]*\n+).
I’m aggregating the parsing so that I can iterate on it (might be over-kill. Total newbie here)
Then I’m parsing each line to pull out the Title, Price, Size, and Quantity:
^(?<ProdTitle>.*)(?=\s+\()|(?<=Amount: ).*?(?<Price>.*)(?=\s+USD)|(?<=Size: ).*?(?<Size>.*)(?=\,)|(?<=Quantity: ).*?(?<Qty>.*)(?=\))
Which gives me this:

Ideally what happens next is I can compose text in this format:

{
"ProdTitle": "{{59.ProdTitle}}"
"Price": {{59.Price}}
"Size": "{{59.Size}}"
"Quantity": {{59.Qty}}
}

But what I’m getting is, 8 operations, each with 1 peice of the parsed info:

Ideally I can get each line in one set of brackets that will repeat for the same number of products in the cell, so in the above I’d get:

{
"ProdTitle": "SS TEE"
"Price": 50
"Size": "L"
"Quantity": 1
},
{
"ProdTitle": "BUTTON DOWN LS JACKET"
"Price": 175
"Size": "XL"
"Quantity": 1
}

Any help is greatly appreciated!

1 Like

Looks like you want a Text Aggregator (with a comma delimiter) instead of an Array Aggregator.

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.

I removed all the Array Aggregators and Iterators, still can’t figure out how to get each run combined.

New Scenario:

Text Aggregator Issue
Still populating separately.

Am I missing a step before the Text Aggregator that moves the bundles created in the Text Parser into a single bundle?

1 Like

Hi @dsaaron

Based on the screenshot you shared, it seems you’re receiving the output in a single bundle. The four bundles you’re seeing are actually the input bundles.


To display each collection in a new row, you can go to the advanced settings and choose “new row” as the row separator.

Best regards,

Msquare Automation
Gold Partner of Make
@Msquare_Automation