Automations

Templates in Automations

Compose templates inside the automation graph or reuse templates from the library.

Automations can send templates in two main ways:

  • Build the message directly in the graph with Compose Template
  • Reuse an existing library template when you want one source of truth

Both approaches end with a template value being wired into a template action such as Send Template, Send Template to DMs, Reply to Interaction, Follow Up, or Edit Interaction Response.

Send Template can also edit an existing user-made template message: wire the message into Edit Message instead of (or as well as) a channel. Assistance system messages — ticket close requests, package reviews, and other bot-generated UI — cannot be edited this way.

Compose Template

Compose Template lets you build a full Assistance template directly inside the automation.

Its output can be wired into:

  • Send Template
  • Send Template to DMs
  • Reply to Interaction
  • Follow Up
  • Edit Interaction Response

The template you build there can be either a Traditional Template or a Components V2 template.

This is useful when the message is tightly coupled to the automation and you do not expect to reuse it elsewhere.

Send a template as a command response

For a Command Executed automation, wire its Interaction output to Reply to Interaction and wire a template into that action. The reply fills the command's original deferred response and returns a Response handle. Use that handle to fetch, edit, delete, or send a related follow-up response.

Interaction responses use the same template pipeline as regular sends: variable resolution, an optional Dictionary, traditional embeds and rows, Components V2 blocks, and continuation snapshots all work. In particular, a template's buttons and select menus keep their normal routes after Discord receives the response.

Every interaction response is a template. To send plain text or a single embed, build one with Make Template and wire it into the action's Template input.

The Ephemeral reply option on the trigger controls the original response's visibility. Discord fixes that choice when the command is deferred, so an edit cannot make it public or private later. Follow-ups can choose their own visibility when they are sent.

A command interaction token and every Response handle derived from it expire after 15 minutes. Keep response edits and follow-ups in the same, timely automation run rather than passing the handle to a future run.

Prefix commands do not lose support just because the automation has a command trigger. They run normally until the path needs an interaction-only response; then Assistance tells the caller to use the slash command for that response.

Building templates in the graph

You can also assemble templates node-by-node without opening the compose dialog. This is useful when options or buttons should come from other parts of the graph.

Buttons

  • Make Button — wire an Action, optional label, color, emoji, and expiry
  • Make Action Row — group up to five buttons
  • Build Regular Template or V2 Action RowBuild V2 Template

Select menus

  • Make Select Option — wire an Action and Label
  • Make Select Menu — wire one or more Select Options. Exports Regular Row and V2 Row for the template builders.
Action → Make Select Option ─┐
Label  ──────────────────────┼─ Make Select Menu → Build Regular / V2 Template
Action → Make Select Option ─┘

Extracting and breaking templates

  • Extract Template — reads the stored template off a user-made template message, plus whether it is Components V2
  • Break Regular Template — splits a traditional template into content, embeds, and action rows (the inverse of Build Regular Template)
  • Break V2 Template — splits a Components V2 template into its blocks (the inverse of Build V2 Template)
Fetch Message → Extract Template → Break Regular Template → content / embeds / rows

System messages Assistance sent that were not user-made templates (close requests, package reviews, and similar) cannot be extracted or edited.

Reusing library templates

If the same message should be shared across multiple automations, commands, or ticket flows, keep it in the library and feed that template into the automation instead.

Choose this when:

  • The message should be editable in one place
  • Multiple systems should send the same content
  • Non-automation editors on your team also need to update it

Compose vs reuse

Use Compose Template when:

  • The template is specific to one automation
  • You want the full logic and message design to live in one graph
  • You are iterating quickly and want fewer moving parts

Use a library template when:

  • The same message is used in several places
  • You want one edit to update every sender
  • The template deserves its own lifecycle outside the automation

Variables inside automation templates

Automation templates support the same built-in variable scopes as other templates, including:

  • ${guild.*}
  • ${triggeredBy.*}
  • ${ticket.*}
  • ${random.*}

They can also use automation-supplied custom variables:

${metadata.headline}
${metadata.details}

Those come from the automation's Dictionary node. See Custom Variables for the full pattern.

Common pattern

One of the most useful flows looks like this:

  1. Start with a trigger
  2. Build a dictionary of custom values
  3. Compose a template that references both built-in variables and ${metadata.*}
  4. Send the template to a channel or DM

This gives you flexible message generation without having to hard-code the final text into a single literal node.

How is this guide?

On this page