Skip to main content
All CollectionsAutomationsBuilt-in Tools
Get an element from an array
Get an element from an array
Valeria avatar
Written by Valeria
Updated over a week ago

This tool allows you to retrieve a specific element from a list in a string section based on its position. You can specify which element to extract by providing its position number. The numbering starts from 1.

For example, if you receive an order list [“Hat”, “T-Shirt”, “Shorts”], but only need to send one item to a CRM system, this tool enables you to select the desired element. If you want to retrieve the second item, simply enter position (2), and Albato will return only “T-Shirt” from the list.

If you enter a position number that exceeds the list’s range (e.g., entering 0, -1, or 5 for a list containing three elements), an error message will appear in the automation log when configuring the tool step: “The entered number does not match the number of elements in the array.

Example of Using the "Get an element from an array" tool.

Let's start creating the integration. Click "Create new automation".

Set up an integration to extract information about the first image from a Shopify product.

To automate the process of extracting the first image from a Shopify product and passing that data on, follow these steps:

  1. Add the First Step – Shopify: New Product
    This step will trigger the integration whenever a new product is created in Shopify.

  2. Add the Second Step – "Get an element from an array" Tool

    Configure this tool to extract the first image from the product's image list by setting the position to 1.

  3. Add the Third Step – Airtable (or Another Destination System)
    This step will receive the extracted image URL and store it in Airtable (or any other system you choose).

    Once configured, the integration will automatically extract the first product image information from Shopify and pass it to Airtable for further processing.

Your Automation is Ready!

Everything is set up:

  • Step 1: Shopify - New Product (Trigger)

  • Step 2: "Get an element from an array" Tool - Extracts the first image

  • Step 3: Airtable - Saves the extracted image URL

Now, just launch the automation, and it will start working seamlessly!

Did this answer your question?