Google Sheets: Add a row - Add multiple rows from elements in an array

Hi all,

I have a bunch of text in a google doc which is separated by empty lines like this:

Action Car & Truck Accessories (704.6 miles)
13313 - 100 Street Grande Prairie, Alberta, T8V 4H4 Canada
(587) 357-9956

Action Car & Truck Accessories (932.9 miles)
201 - 19315 96 Ave Surrey, British Columbia, V4N 4C4 Canada
(604) 513-1143

Action Car & Truck Accessories (937.7 miles)
17415 - 103 Ave Edmonton, Alberta, T5S 1J4 Canada
(587) 357-9956

And so on…
I would like to analyze that data so that I can take the company name, province, city, address and have it put into a google sheet, one row per location (I have 50 locations)

I am currently using the openai; transform text to structured data then to an array aggregator to the google sheet. I have tried using iterators, both, and neither.

The issue I am facing is that it only prints one line, not all the other locations.


This is what I’m working with.

I am new to make and would be extremely grateful to find a solution with your guys’ help. Thank you very much!

Please download the output of the Chatgpt module and paste it here thank you!

Thank you so much for taking the time to help me out. Here is the pasted output bundle from the chatgpt module:

[
{
“Company_Name”: [
“Action Car & Truck Accessories”,
“Action Car & Truck Accessories”,
“Action Car & Truck Accessories”,
“Action Car and Truck Accessories – Edmonton South”,
“Expertec Van Systems Inc.”,
“Expertec Van Systems Inc.”,
“Action Car & Truck Accessories”,
“Expertec Van Systems Inc.”,
“Action Car & Truck Accessories”,
“Toys For Trucks - Alberta”,
“Expertec Van Systems Inc.”,
“Action Car & Truck Accessories”,
“The Truck Outfitters - Regina”,
“Action Car & Truck Accessories”,
“Action Car & Truck Accessories”,
“Action Car & Truck Accessories”,
“Equipment World”,
“Equipment World Inc. - Sault Ste. Marie”,
“Action Car & Truck Accessories”,
“Equipment World Inc.”,
“Action Car & Truck Accessories”,
“Action Car & Truck Accessories”,
“Action Car & Truck Accessories”,
“Action Car & Truck Accessories”,
“Action Car & Truck Accessories”,
“Action Car & Truck Accessories”,
“MKW Commercial Vehicle Outfitters”,
“Action Car & Truck Accessories”,
“Action Car & Truck Accessories”,
“Action Car & Truck Accessories”,
“Action Car & Truck Accessories”,
“Action Car & Truck Accessories”,
“Action Car & Truck Accessories”,
“Action Car & Truck Accessories”,
“Action Car & Truck Accessories”,
“Action Car & Truck Accessories”,
“Farmbro Inc.”,
“Action Car & Truck Accessories”,
“Transform Van & Truck”,
“Action Car & Truck Accessories”,
“Action Car & Truck Accessories”,
“Action Car & Truck Accessories”,
“Action Car & Truck Accessories”,
“Action Car & Truck Accessories”,
“Action Car & Truck Accessories”,
“Van Pro Inc. Ottawa”,
“Action Car & Truck Accessories”,
“Mobiltech Power Systems”,
“Van Pro Inc.”,
“Gaevan Amenagement”,
“Action Car and Truck Accessories – Federicton”,
“Action Car & Truck Accessories”,
“Action Car & Truck Accessories”,
“Action Car & Truck Accessories”,
“Action Car & Truck Accessories”,
“Action Car & Truck Accessories”,
“Action Car & Truck Accessories”,
“Action Car & Truck Accessories”,
“Action Car & Truck Accessories”,
“Action Car & Truck Accessories”
],
“Province”: [
“Alberta”,
“British Columbia”,
“Alberta”,
“Alberta”,
“Alberta”,
“British Columbia”,
“British Columbia”,
“Alberta”,
“British Columbia”,
“Alberta”,
“Alberta”,
“Saskatchewan”,
“Saskatchewan”,
“Saskatchewan”,
“British Columbia”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Ontario”,
“Quebec”,
“Quebec”,
“Quebec”,
“New Brunswick”,
“New Brunswick”,
“New Brunswick”,
“New Brunswick”,
“New Brunswick”,
“Prince Edward Island”,
“Newfoundland and Labrador”,
“Nova Scotia”,
“Newfoundland and Labrador”,
“Newfoundland and Labrador”
],
“City”: [
“Grande Prairie”,
“Surrey”,
“Edmonton”,
“Edmonton”,
“Abbotsford”,
“Kelowna”,
“Victoria”,
“Calgary”,
“Calgary”,
“Calgary”,
“Edmonton”,
“Regina”,
“Regina”,
“Saskatoon”,
“Thunder Bay”,
“Sault Ste. Marie”,
“Timmins”,
“Sudbury”,
“Sudbury”,
“Collingwood”,
“New Lowell”,
“Windsor”,
“Orillia”,
“Barrie”,
“Haliburton”,
“Waterloo”,
“Guelph”,
“London”,
“Kitchener”,
“Aurora”,
“Gormley”,
“Lindsay”,
“Mississauga”,
“Mississauga”,
“Scarborough”,
“Oakville”,
“Peterborough”,
“Whitby”,
“Hamilton”,
“Cobourg”,
“Ottawa”,
“Belleville”,
“Ottawa”,
“Kingston”,
“Blainville”,
“Dorval”,
“Quebec”,
“Fredericton”,
“Moncton”,
“St. John”,
“Charlottetown”,
“Corner Brook”,
“Dartmouth”,
“Grand Falls-Windsor”,
“Gander”,
“Clarenville”,
“St. Johns”
],
“Address”: [
“13313 - 100 Street Grande Prairie, Alberta, T8V 4H4 Canada”,
“201 - 19315 96 Ave Surrey, British Columbia, V4N 4C4 Canada”,
“17415 - 103 Ave Edmonton, Alberta, T5S 1J4 Canada”,
“5415 Calgary Trail NW Edmonton, Alberta, T6H 4J9 Canada”,
“4528 55 Ave NW Edmonton, Alberta, T6B 3S2 Canada”,
“101-30923 Wheel Ave Abbotsford, British Columbia, V2T 6G7 Canada”,
“1541 Keehn Road Kelowna, British Columbia, V1X 5T5 Canada”,
“707 Barlow Tr SE Bay A Calgary, Alberta, T2E 8C2 Canada”,
“5011A - 11th Street S.E. Calgary, Alberta, T2H 1M7 Canada”,
“6235B 86 Ave SE Calgary, Alberta, T2C 2S4 Canada”,
“805 51st E Street Saskatoon, Saskatchewan, S7K 0X7 Canada”,
“1200 McIntyre Street Regina, Saskatchewan, S4R 2M6 Canada”,
“707D McDonald St Regina, Saskatchewan, S4N 5M2 Canada”,
“1588 King Edward Street Winnipeg, Manitoba, R3H 0R5 Canada”,
“988 Alloy Dr. Thunder Bay, Ontario, P7B 6A5 Canada”,
“235 Drive In Road Sault Ste. Marie, Ontario, P6B 5X5 Canada”,
“855 Algonquin Blvd E Timmins, Ontario, P4N 7H9 Canada”,
“1130 Lorne St. Sudbury, Ontario, P3C 4S9 Canada”,
“400 Falconbridge Road Sudbury, Ontario, P3A 4S4 Canada”,
“80 High St, Unit 2 Collingwood, Ontario, L9Y 4V6 Canada”,
“1 Greengage Rd New Lowell, Ontario, L0M 1N0 Canada”,
“4225 Concession Rd 7 - Unit B, RR#1 Windsor, Ontario, N9A 6J3 Canada”,
“4 Progress Drive Orillia, Ontario, L3V 6H1 Canada”,
“303 Dunlop Street Barrie, Ontario, L4N 1C1 Canada”,
“140 Industrial Park Rd Haliburton, Ontario, K0M 1S0 Canada”,
“715 McMurray Road Waterloo, Ontario, N2V 1Y2 Canada”,
“955 Woodlawn Road W (Hwy #7) Guelph, Ontario, N1K 1C7 Canada”,
“4397 Wellington Rd South London, Ontario, N6E 2Z8 Canada”,
“47 Bleams Road Kitchener, Ontario, N2C 2G1 Canada”,
“2 Allaura Blvd, Units 5 & 6 Aurora, Ontario, L4G 3S5 Canada”,
“120 Ram Forest Road - Unit 2 Gormley, Ontario, L0H 1G0 Canada”,
“10 Willowdale Court Lindsay, Ontario, K9V 4R4 Canada”,
“1630 Matheson Blvd E - Unit #4 Mississauga, Ontario, L4W 1Y4 Canada”,
“4200 Sladeview Crescent Mississauga, Ontario, L5L 5Z2 Canada”,
“1498 Midland Avenue Scarborough, Ontario, M1P 3B9 Canada”,
“1313 Speers Road Oakville, Ontario, L6L 2X5 Canada”,
“16 Lansdowne Street West Peterborough, Ontario, K9J 1Y1 Canada”,
“920 Champlain Court Whitby, Ontario, L1N 6K9 Canada”,
“244 Lake Avenue N Hamilton, Ontario, L8E 3A2 Canada”,
“900 Division Street, Unit 100 Cobourg, Ontario, K9A 5V2 Canada”,
“1380 Cyrville Road Ottawa, Ontario, K1B 3L9 Canada”,
“6759-A Hwy #62 North Belleville, Ontario, K8N 4Z5 Canada”,
“1899 Merivale Road Ottawa, Ontario, K2G 1E7 Canada”,
“1365 Midland Avenue, Unit 90 Kingston, Ontario, K7P 2W5 Canada”,
“900 boul. Michel-Bohec Suite 106 Blainville, Quebec, J7C 5E2 Canada”,
“1895 - 55th Avenue Dorval, Quebec, H9P 1G9 Canada”,
“580 rue de l’Argon Quebec, Quebec, G2N 2E1 Canada”,
“17 Avonlea Ct Fredericton, New Brunswick, E3C 1N8 Canada”,
“200 Horsman Road Moncton, New Brunswick, E1E 0E8 Canada”,
“59 Commerce Drive St. John, New Brunswick, E2J 0E8 Canada”,
“600 N River Road Charlottetown, Prince Edward Island, C1E 1K1 Canada”,
“51A Maple Valley Road Corner Brook, Newfoundland and Labrador, A2H 6T3 Canada”,
“581 Wright Avenue Dartmouth, Nova Scotia, B3B 0H6 Canada”,
“11 Queensway Grand Falls-Windsor, Newfoundland and Labrador, A2B 1K9 Canada”,
“145 Roe Ave Gander, Newfoundland and Labrador, A1V 1W8 Canada”,
“4 Blackmore Avenue Clarenville, Newfoundland and Labrador, A5A 1B8 Canada”,
“615 Kenmount Road St. Johns, Newfoundland and Labrador, A1B 3P9 Canada”
]
}
]