Skip to content

Workflows · 1 min read

Array Functions Action

Some triggers and actions return lists of items, called arrays. Examples are the line items in a Shopify order, an inbound webhook payload, or a custom webhook response. The Array Functions action lets you work with those lists and use the result in later steps such as emails, SMS, and If/Else branches.

Add the action

  1. In your workflow, click + and search for Array Functions.
  2. Choose an Action Type.
  3. Pick the array field to work with, for example Shopify > Line Items. Only list fields available in this workflow appear.

Action types

  • Find: returns the first item that matches one or more key-value pairs. Example: check whether an order contains a product with a certain product ID.
  • Filter: returns every item that matches one or more key-value pairs. Example: keep only items from one product group, then send them by custom webhook.
  • Find by Index: returns the item at a position you enter.
  • Line Items: rebuilds the list with your own key names. Use it to reshape data before you send it by webhook, add it to Google Sheets, or show it in an email's shopping cart block.
  • Math: works out a sum, minimum, maximum, or average for a key. Example: a cart subtotal, the number of line items, or the total quantity.
To match on more than one key, click Add another item.

Use the result

After the action runs, its output shows up as custom values in later steps. For example, you can add a found product's name to an email or branch on a cart total.

Did this answer your question?

No, I need help

More in Workflows