How to extract Shopify note_attributes[] values into Google Sheets columns without “Invalid array” error?

:bullseye: What is your goal?

I’m building a Make scenario to import paid Shopify orders into a Google Sheet for a wine delivery service.

Scenario structure:

Shopify - Watch orders
→ Shopify - Get an order
→ Shopify - Make a REST API call
→ Google Sheets - Search Rows
→ Router
→ Google Sheets - Add a Row
→ Google Sheets - Update a Row

The Shopify REST API module correctly returns body → order → note_attributes.

I need to extract specific note_attributes values and map them into separate Google Sheets columns, for example:

delivery_town
accommodation_name
full_delivery_address
customer_whatsapp
delivery_notes

The goal is to write each value into its own Google Sheets column in the Add a Row module.

:thinking: What is the problem & what have you tried?

The Shopify REST API output contains the correct data.

Example note_attributes output:

  1. name: wineholiday_order_type / value: delivery
  2. name: delivery_town / value: Isola d’Asti
  3. name: delivery_area / value: AREA_A
  4. name: delivery_window / value: AM1 — 10:00–11:30
  5. name: delivery_window_full / value: AM1 — 10:00–11:30
  6. name: accommodation_name / value: Villa Test Mail 3
  7. name: full_delivery_address / value: Via test 3, isola d’asti
  8. name: full_address / value: Via test 3, isola d’asti
  9. name: delivery_date / value: 2026-06-14
  10. name: customer_whatsapp / value: +393356029467
  11. name: delivery_notes / value: test3

Some fields like delivery_area, delivery_date and delivery_window seemed to work with this type of formula:

get(map(3.body.order.note_attributes; “value”; “name”; “delivery_area”); 1)

But when I try the same approach for delivery_town or delivery_notes, the Google Sheets Add a Row module fails.

I tried:

get(map(3.body.order.note_attributes; “value”; “name”; “delivery_town”); 1)

and also:

ifempty(get(map(3.body.order.note_attributes; “value”; “name”; “delivery_town”); 1); “”)

The scenario still fails with an Invalid array error.

What is the correct and stable Make formula to extract one specific value from Shopify note_attributes by matching the name field?

Should I use map(), get(), first(), select(), or another function?
Or should I transform note_attributes before the Google Sheets Add a Row module?

:clipboard: Error messages or input/output bundles

Error from Google Sheets - Add a Row:

Failed to map ‘values.delivery_town’:
Function ‘get’ finished with error!
Function ‘map’ finished with error!
Invalid array.

After changing delivery_town, the same type of error appeared on another field:

Failed to map ‘values.delivery_notes’:
Function ‘get’ finished with error!
Function ‘map’ finished with error!
Invalid array.

The Shopify REST API module output definitely includes note_attributes and the values are visible in the execution history.

:camera_with_flash: Screenshots (scenario flow, module settings, errors)

Hey Pistamiglio_Omar :waving_hand:

You may try this expression in native Make format like this:

{{get(map(ifempty(3.body.order.note_attributes; emptyarray); "value"; "name"; "delivery_area"); 1; "")}}

The important part is ifempty(…; emptyarray) so map() always receives an array, and get(…; 1; “”) so it returns a blank value instead of throwing Invalid array when that note attribute is missing. Reuse the same pattern for delivery_date, delivery_window, etc.

Let us know how it goes :thinking:

-John

John’s solution covers the fix. Use ifempty(…;emptyarray) guard to fix the Invalid array error.

Here is some reasoning as to why it is failing inconsistently: one possible reason is likely that some note_attributes values contain special characters (the apostrophe in “Isola d’Asti” or the em dash in delivery_window values). This can cause map() to choke in some Google Sheets columns even when the data looks good in the execution log.

Some extra things to stabilize this:

-Wrap the final output in toString() to make sure the value is always passed as a string, not just an ambiguous type

-If some specific fields ares still failing, run the scenario in the Dev Tool mode and check for the exact bundle value. Sometimes what can look like a string in the log is really just an unexpected type.

Full pattern that tends to be the most stable:

{{toString(get(map(ifempty(3.body.order.note_attributes; emptyarray); “value”; “name”; “delivery_town”); 1; “”))}}

Thank you, this confirms the issue.

Using ifempty(...; emptyarray) fixed the Invalid array problem.

The stable pattern I am now using is:

get(map(ifempty(3.body.order.note_attributes; emptyarray); "value"; "name"; "delivery_town"); 1; "")

For some fields I may also wrap the result in toString() as suggested.

This solved the Shopify note_attributes → Google Sheets mapping issue.