Custom Variables
Use the Dictionary node and ${metadata.*} placeholders inside automation templates and body builders.
Automation dictionaries power custom variables. They let you prepare values inside the graph, then reference those values later in templates or request bodies.
Syntax
Dictionary entries resolve as ${metadata.key}:
${metadata.headline}
${metadata.ticketUrl}Use this when the built-in variable scopes are not enough and you want to prepare a few custom values before rendering the final output.
Building a dictionary
In the editor, the Dictionary node lets you declare keys such as
headline, details, or ticketUrl.
Each key becomes a text input socket. Wire values into those sockets, then pass the dictionary into a node that accepts a Variables or Dictionary input.
Typical flow:
- Add a Dictionary node
- Declare the keys you need
- Wire text or transformed values into those key sockets
- Connect the dictionary to the destination node
- Reference the values as
${metadata.key}
Where metadata works
Automation metadata is most useful in:
Send TemplateSend Template to DMs- JSON body templates
- Text body templates
- Form body builders
Anywhere a node resolves variables against the automation run's context,
${metadata.*} can participate alongside built-in variables like
${triggeredBy.username} or ${guild.slug}.
Rules and limits
- Keys must start with a letter
- The rest of the key can use letters, numbers, or underscores
- A single send can carry up to 8 metadata entries
- Metadata values are treated as strings when inserted into templates
Good keys:
headline
ticketUrl
reviewer_nameInvalid keys:
1headline
ticket-url
reviewer nameExample
Suppose an automation needs to send:
## New application received
Staff review needed within 24 hours.
Submitted by cooluser.One way to build that is:
- Put
"New application received"intometadata.headline - Put
"Staff review needed within 24 hours."intometadata.details - Use
${triggeredBy.username}for the submitter
Then your template might look like:
## ${metadata.headline}
${metadata.details}
Submitted by ${triggeredBy.username}.Tips
- Keep keys stable once you start using them in several places
- Use short, descriptive names rather than generic keys like
value1 - Prefer metadata for run-specific values, not long reusable message bodies
- If a template is shared in many places, pair metadata with a reusable library template instead of composing everything inline
Related docs
Automations
Overview, demo flow, and publishing model.
The graph
How data wires feed template actions.
Templates in Automations
Feed custom variables into Compose Template or library templates.
Variables
Built-in variable scopes like guild, triggeredBy, ticket, and random.
Components V2
Use variables inside text blocks, media URLs, and buttons.
How is this guide?