Skip to content

Pass data between blocks ​

Variables carry information from one block to another: user messages, HTTP responses, instructions, LLM answers, tools, or tool results.

Pass variables between blocks
100 %
Pass variables between blocksBlocks can access global variables. An output produced by block A can be used by block B after A runs. Global variables. Block A. Block A outputs. Block BGlobal variablesGlobal variablesBlock ABlock ABlock A outputsBlock A outputsBlock BBlock B

Scopes ​

ScopeLifetimeExamples
SYSTEMProvided by the platform for every executionuserMessage, datetime, customParams
USERTied to the signed-in useruserData.email, locale, timezone
CONVERSATIONRetained across several messagesconversationHistory, collected information
REQUESTLimited to the current pathdocuments.body, chatCompletion-1.content

Use REQUEST by default. Reserve CONVERSATION for information that must survive across turns.

Global variables ​

VariablePurpose
userMessageUser request
datetime, datetime.date, datetime.hour, datetime.minuteCurrent date and time
customParamsParameters supplied by a web integration
llmAppId, organizationId, workflowIdContext identifiers
workflowExecutionId, queryExecutionIdExecution identifiers
conversationHistoryConversation history
userDataUser object
userData.email, userData.name, userData.givenName, userData.familyName, userData.userIdCommon user attributes
userData.organizationId, userData.attributes, userData.iamProfilesOrganization, attributes, and IAM profiles
locale, timezoneLanguage and time zone

userData information (name, email, profiles, and attributes) comes from your organization’s user administration. userData.attributes contains the attributes defined for the signed-in person; the list is empty when none is defined. For an anonymous user, userData.email is anonymous and the other information, attributes included, is not filled in.

Block outputs ​

By default, an output reference uses this format:

txt
{{blockIdentifier.variableName}}

For example, {{http-1.body}} is the response body produced by http-1.

If http-1 receives the alias documents, the reference becomes {{documents.body}}. Aliases improve readability but must remain unique.

To use all of a block’s outputs at once, reference the block without an output name: {{http-1}} is the complete object produced by http-1. This reference is also offered by input assistance.

BlockMain outputs
Simple messagemessage
HTTP requestbody, metadata
Data SourcesllmConnectorId, dataSourceIds, index, embeddingModel, dimensions
VariablesDirectly named variables
ConditionhasMatch, matchedIndex, nextStep
LLM instructionraw, metadata, messages, instruction, tools, model, maxTokens
LLM requestcontent, genericToolCalls, metadata
MCP - List toolstools, toolServerRouting, metadata
MCP - Call toolsmetadata, toolCallResults

For other blocks offered by your organization, select their outputs from the input suggestions. Reference names depend on the block and its alias.

Create a variable ​

The Variables block creates one or more directly named values. Click Add a variable for each one:

ScopeNameValue
RequestuserEmail{{userData.email}}

The value is then available as {{userEmail}}. A value can span several lines, for example to store guidelines reused in several instructions.

Avoid spaces, accents, special characters, and duplicate names.

Write a reference ​

In compatible fields, type {{ and choose a suggestion. Suggestions include workflow variables; check that the producing block will run before the block using its output on the route being tested.

NeedReference
User message{{userMessage}}
Current date{{datetime.date}}
HTTP body{{http-1.body}}
Selected source identifiers{{dataSources-1.dataSourceIds}}
Prepared instruction{{generatePrompt-1.instruction}}
LLM answer{{chatCompletion-1.content}}
Tool calls{{chatCompletion-1.genericToolCalls}}
MCP tools{{listTools-1.tools}}
MCP routing{{listTools-1.toolServerRouting}}

A reference can be embedded in text:

txt
Hello {{userData.givenName}}, your request is: {{userMessage}}

Or in JSON:

json
{
  "query": "{{userMessage}}",
  "email": "{{userData.email}}"
}

Integration parameters with customParams ​

customParams carries runtime values even when they are unknown during configuration:

txt
{{customParams.mcpAuthorization}}
{{customParams.mcpAccessToken}}
{{customParams.source}}

These parameters depend on the integration in use. Test that it sends the expected values.

Debug a variable ​

Temporarily add a Simple message:

txt
{{codeblock documents.body}}

To force a display language:

txt
{{codeblock documents.body "json"}}

Remove this block before publication if it might reveal a secret or personal data.