Workflow Array Functions in Sparkforge (Premium Action)

By Sparkforge Support Team ·Last reviewed May 3, 2026

Array Functions are a premium workflow action that lets you operate on lists of data (Shopify line items, webhook payloads, etc.) directly inside Sparkforge. Five function types: Find, Find by Index, Filter, Line Items, and Math. A small fee applies per run.

Array Functions let workflows process lists of data — order line items, webhook responses, custom payloads — without exporting to a third-party tool. They're a premium action and incur a small fee each time they run.

What an Array Function does

Many triggers return arrays: Shopify orders return line items, inbound webhooks may return collections of records, custom webhooks return whatever the source API gives you. Array Functions extract, filter, transform, or calculate against that data inside the workflow.

Setup

  1. Open Automation and create or select a workflow.
  2. Click Add Action and pick Array Function under Premium Actions.
  3. Choose a function type: Find, Filter, Find by Index, Line Items, or Math.
  4. Configure the input array, keys, values, or filter criteria.
  5. Save and run a test.
  6. Reference the output variable in later actions.

Function types

Find

Locates the first object in an array that matches a key/value pair. Example: check whether product id zGhad23wfadfa exists in a Shopify order's line items.

  1. Action type: Find.
  2. Source: Shopify > Line Items.
  3. Pick the Key (e.g., id) and enter the matching Value.

Returns one object — the first match.

Find by Index

Returns one item by array position. Arrays are zero-indexed: (0) Apple, (1) Banana, (2) Cherry — index 2 returns Cherry.

Filter

Returns every object that matches the filter, not just the first. Use it to grab all objects with color = blue, all items in category = home, or all orders for a specific contact via {{user.name}}.

Line Items

Rebuilds an array into a different shape so it fits a target action — a custom webhook, a Google Sheets row, or the Email Builder shopping cart structure. You define the new key/value pairs.

Math

Runs numeric operations across the array:

  • Sum — add all values.
  • Min — smallest value.
  • Max — largest value.
  • Average — mean.
  • Count — total number of values.

Common use: sum line item prices to calculate total order revenue.

Frequently Asked Questions

What kinds of data can Array Functions handle?
Lists of objects or numbers. The data usually comes from Shopify triggers, inbound webhooks, or custom webhook responses.
Are Array Functions a premium feature?
Yes. They're a premium workflow action and incur a small per-run fee each time they execute.
Can Array Functions process nested arrays?
No. Currently only flat (one-dimensional) arrays are supported. Nested data needs custom code.
Can I chain multiple Array Functions in one workflow?
Yes. Chain them to build more complex pipelines — Filter then Math, for example.
How do I debug an Array Function?
Use Test Workflow inside the builder to inspect the function's output and confirm it's returning what you expect.

Was this article helpful?