Skip to main content

Concatenate

Concatenates two arrays into a single array by appending the second array to the first array.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.

Inputs

  • First Array - The first array to concatenate.
  • Second Array - The second array to append to the first array.

Outputs

  • Array - The concatenated array result containing all elements from both input arrays.

How It Works

The Concatenate node combines two arrays into one by appending all elements from the second array to the end of the first array. When executed, the node:

  1. Receives two arrays through the First Array and Second Array inputs
  2. Validates that both inputs are valid arrays (not null)
  3. Appends all elements from the second array to the first array
  4. Handles thread-safe operations when working with Global or Flow scope variables
  5. Returns the combined array containing elements from both inputs

Requirements

  • Both input arrays must be valid (not null)
  • Arrays can be empty, but cannot be null

Error Handling

The node will return specific errors in the following cases:

  • First array is null: "First array cannot be null"
  • Second array is null: "Second array cannot be null"

Usage Examples

Example 1: Combine Customer Lists

Merge customer lists from different sources:

  1. Set First Array to {{msg.existingCustomers}} containing ["John", "Mary", "David"]
  2. Set Second Array to {{msg.newCustomers}} containing ["Sarah", "Mike"]
  3. Result: ["John", "Mary", "David", "Sarah", "Mike"]

Example 2: Aggregate Data from Multiple Pages

Combine scraped data from multiple pages:

  1. Set First Array to {{flow.allProducts}} (previously scraped products)
  2. Set Second Array to {{msg.currentPageProducts}} (products from current page)
  3. Store result back to {{flow.allProducts}} for continuous accumulation
  4. Repeat for each page to build complete product list

Example 3: Merge Search Results

Combine search results from multiple sources:

  1. Set First Array to {{msg.searchResultsAPI1}} containing search results from first API
  2. Set Second Array to {{msg.searchResultsAPI2}} containing search results from second API
  3. Result contains all search results from both APIs
  4. Use for comprehensive data aggregation

Example 4: Build Sequential Data Pipeline

Create a data processing pipeline by concatenating processed batches:

  1. Process first batch of records, store in {{msg.batch1}}
  2. Process second batch of records, store in {{msg.batch2}}
  3. Use Concatenate to combine: First Array = {{msg.batch1}}, Second Array = {{msg.batch2}}
  4. Continue concatenating additional batches to build complete dataset

Tips for Effective Use

  • The order matters: elements from the first array appear first, followed by elements from the second array
  • Both arrays can contain any data type: strings, numbers, objects, or mixed types
  • Empty arrays are valid inputs and will not cause errors
  • The original arrays are not modified; a new array is created
  • For multiple concatenations, chain multiple Concatenate nodes or use loops
  • When working with large arrays, consider memory usage and performance
  • Use with loops to accumulate data from multiple iterations
  • Combine with Array.GetLength to validate result size

Common Use Cases

  • Merging data from multiple API calls or database queries
  • Accumulating scraped data across multiple pages
  • Combining filtered results from different sources
  • Building comprehensive datasets from incremental processing
  • Aggregating batch processing results
  • Merging configuration or reference data from multiple sources
  • Creating consolidated reports from different data sources
  • Combining user inputs from different form sections