Skip to main content

Fetch Product Details Using Pluck and Join in Workflows

Use the Pluck and Join helpers in Kyrios workflows to extract product details from order data and format them into a single value for actions like Google Sheets logging.

Updated over 3 months ago

Who This Is For / When to Use

This article is for users who:

  • Capture orders using forms, funnels, or checkout pages.

  • Need to extract multiple product values (for example, product titles) from an order.

  • Want to store or send those values as a single formatted string to another system, such as Google Sheets.

What “Pluck” and “Join” Do

Pluck

Extracts a single field from each object in an array.

Example:
From order.line_items, extract all product titles.

{{ pluck order.line_items "title" }}

Output:

["Product A", "Product B", "Product C"]

Join

Combines multiple values into one string using a separator.

Example:

{{ join (pluck order.line_items "title") ", " }}

Output:

Product A, Product B, Product C

Step-by-Step: Log Ordered Products to Google Sheets

Step 1: Create or Open a Workflow

  1. Go to Automations > Workflows.

  2. Click Create Workflow or open an existing one.

  3. In the builder, click Add New Trigger.

Step 2: Configure the Order Trigger

  1. Choose Order Form Submission as the trigger.

  2. (Optional) Add filters to limit which orders should enter the workflow (for example, by funnel or website).

  3. Save the trigger.

Step 3: Add a Google Sheets Action

  1. Click the + icon below the trigger.

  2. Select Google Sheets.

  3. Choose Create Spreadsheet Row as the action.

Step 4: Configure the Google Sheets Action

  1. Select the connected Google account.

  2. Choose the Drive, Spreadsheet, and Worksheet.

  3. Click Refresh Headers to load column names.

Step 5: Map Product Data Using Pluck and Join

In the column where you want product details (for example, Products or CompanyID), enter:

{{ join (pluck order.line_items "title") ", " }}

This ensures:

  • All product titles are extracted from the order.

  • The titles are combined into one readable string.

Step 6: Save, Test, and Publish

  1. Click Save Action.

  2. Use Test Workflow to submit a test order.

  3. Confirm a new row appears in Google Sheets with formatted product names.

  4. Publish the workflow.

Example Result in Google Sheets

Name

Email

Products

Alice

Product A, Product B

Bob

Single Item

Common Issues and Fixes

Products Column Is Empty

  • Confirm the trigger is Order Form Submission.

  • Ensure the order actually contains line_items.

Output Shows Brackets Instead of Text

  • You used pluck without join.

  • Use join(pluck(...), ", ") to format correctly.

Wrong Separator

  • Replace ", " with any separator:

    • "; "

    • " | "

    • " / "

Frequently Asked Questions

Can I pluck fields other than product titles?
Yes. You can pluck any available field inside order.line_items, such as price or quantity.

What happens if there is only one product?
The output is still a valid string with a single value.

Can I use this output in other actions?
Yes. The formatted result can be used in any workflow action, including webhooks, CRM updates, or notifications.

Did this answer your question?