# Concatenation Node

### Overview

The Concatenation Node creates strings by combining text templates with variables from your flow. This node is particularly useful for formatting output messages, creating dynamic content, or combining multiple data sources into a single text output. It supports flexible variable insertion with customizable array formatting and robust error handling for missing variables.

**Usage cost:** 0 credit

### Configuration

#### Settings

**Template Configuration**

* **Template**\* (text area): The text template where you can insert variables
  * Use the variable insertion interface to add variables from previous nodes
  * Supports multi-line templates for complex formatting
  * Variables are inserted visually and automatically formatted
  * Example: `"Title: {inserted_title_variable}, Body: {inserted_content_variable}"`

**Array Formatting**

* **Array Separator** (text): Custom separator for array variables
  * Used when an inserted variable resolves to an array/list
  * Common examples: `", "` (comma space), `" | "` (pipe), `"\n"` (new line)
  * Leave empty to use default array formatting

**Error Handling**

* **Handle Missing Variables**\* (dropdown): Strategy for missing or null variables
  * **Error**: Stop execution and throw an error if variable not found
  * **Empty**: Replace missing variables with empty string
  * **Skip**: Keep original variable reference in output for missing variables

### Output Ports

* `result` (string): The concatenated string result
  * All inserted variables are replaced with their actual values
  * Arrays are formatted using the specified separator
  * Missing variables are handled according to the selected strategy

### Common Issues

* **Variable availability** - Ensure selected variables come from nodes that execute before this concatenation node
* **Unexpected array formatting** - Verify array separator settings when working with list variables
* **Template structure** - Check that your template creates the intended output format
* **Missing variable handling** - Review error handling strategy if execution stops unexpectedly


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.waterflai.ai/studio/studio-builders/flow-components-nodes/concatenation-node.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
