Skip to main content

Use Variables in Automations

Use variables to insert values from the automation trigger into action fields such as a GitHub issue number, email subject, or chat prompt.

Variables are useful when you want one automation to adapt automatically to the item that triggered it. Instead of hardcoding a ticket number, repository name, or issue title, you can let the automation pull in the correct value each time it runs. This helps you reuse the same automation setup across many tickets and reduces manual copying.

How Variables Work​

Write variables with double curly braces:

{{variable}}

When the automation runs, the value inside the braces is replaced with data from the trigger or the current workflow state.

This is especially useful when one step needs to pass information into the next step. For example, a GitHub trigger can provide the issue number, and the next action can use that value to post a comment back to the same issue.

Available Variables​

GitHub​

When your automation starts with a GitHub issue trigger, these shortcuts are available:

VariableWhat it means
{{github:repo}}The GitHub repository that triggered the automation, in owner/repo format.
{{github:title}}The title of the GitHub issue that triggered the automation.
{{github:body}}The body text of the GitHub issue that triggered the automation.
{{github:issue_number}}The issue number of the GitHub ticket that triggered the automation.

The shortcut for the issue number is the easiest option for both the Comment on GitHub ticket and React to GitHub ticket actions.

Jira​

When your automation starts with a Jira issue trigger, these shortcuts are available:

VariableWhat it means
{{jira:project_key}}The Jira project key that triggered the automation.
{{jira:issue_key}}The Jira issue key that triggered the automation.
{{jira:title}}The Jira issue title.
{{jira:body}}The Jira issue description/body text.
{{jira:issue_event}}The Jira issue event type (created or updated).
{{jira:base_url}}The Jira site URL for the trigger event.

Linear​

When your automation starts with a Linear issue trigger, these shortcuts are available:

VariableWhat it means
{{linear:organization_id}}The Linear organization ID from the trigger event.
{{linear:issue_id}}The Linear issue ID from the trigger event.
{{linear:issue_identifier}}The human-readable Linear issue identifier from the trigger event, such as ENG-123.
{{linear:title}}The title of the Linear issue that triggered the automation.
{{linear:body}}The body/description text of the Linear issue that triggered the automation.

For both the Comment on Linear issue and React to Linear issue actions, use {{linear:organization_id}} and {{linear:issue_id}}. Use {{linear:issue_identifier}} when you want to reference the issue in prompts or messages with the short ID people see in Linear.

Chat​

When your automation creates chats, completed chat steps are available to later steps in the same run:

VariableWhat it means
{{chat_1:message}}The response from the first completed chat step.
{{chat_1:title}}The thread title from the first completed chat step.
{{chat_2:message}}The response from the second completed chat step.
{{chat_2:title}}The thread title from the second completed chat step.

Chat numbers follow completion order during the automation run. A step can only use chat variables from earlier completed chat steps.

Google File Reader​

When your automation reads Google files, completed Read Google file steps are available to later steps in the same run:

VariableWhat it means
{{google_file_1:markdown}}The markdown output from the first completed Google file step.
{{google_file_2:markdown}}The markdown output from the second completed Google file step.

Google file numbers follow completion order during the automation run. A step can only use Google file variables from earlier completed Google file steps.

Markdown Selection​

When your automation selects a section from markdown, completed Markdown selection steps are available to later steps in the same run:

VariableWhat it means
{{markdown_selection_1:markdown}}The markdown output from the first completed markdown selection step.
{{markdown_selection_2:markdown}}The markdown output from the second completed markdown selection step.

Markdown selection numbers follow completion order during the automation run. A step can only use markdown selection variables from earlier completed markdown selection steps.

Search Highlights​

When your automation searches highlights, completed Search Highlights steps are available to later steps in the same run:

VariableWhat it means
{{highlight_search_1:markdown}}The formatted markdown from the first completed Search Highlights step.

Search Highlights numbers follow completion order during the automation run. A step can only use Search Highlights variables from earlier completed Search Highlights steps.

Examples​

Comment on a Github Ticket​

This setup lets your automation comment on the exact GitHub ticket that started the workflow. You do not need to enter a fixed repository or issue number for each automation run. Instead, the action reuses the values from the trigger.

First, create a trigger Github issue created.

Then, add a Comment on GitHub ticket action with this configuration:

FieldValue
Repository{{github:repo}}
Issue number{{github:issue_number}}

Reuse Trigger Data in a Prompt or Message​

Example prompt:

Summarize the issue "{{github:title}}" and suggest next steps.

React to a GitHub Ticket​

This setup adds a reaction to the same GitHub ticket that started the workflow.

First, create a trigger Github issue created.

Then, add a React to GitHub ticket action with this configuration:

FieldValue
OperationAdd reaction
Repository{{github:repo}}
Issue number{{github:issue_number}}
Emoji👀

Reuse Chat Results in Another Step​

Example first chat prompt:

Analyze this Jira issue: {{jira:body}}

Example second chat prompt:

Use this first analysis to write a shorter customer update: {{chat_1:message}}

Example Slack message or ticket comment after the second chat:

{{chat_2:title}}

{{chat_2:message}}

Use a Google File in a Later Chat​

Example chat prompt:

Use the following Google Doc as source material and summarize the key product decisions:

{{google_file_1:markdown}}

Select a Section from a Google File Before Reusing It​

Example markdown selection step:

FieldValue
Markdown{{google_file_1:markdown}}
HeadingProduct decisions

Example later chat prompt:

Summarize only this section:

{{markdown_selection_1:markdown}}

Save a Reusable Memory Highlight and Read It Later​

Example Create Highlight step:

FieldValue
Tagsweekly-update, automation-memory
TitleWeekly update for {{jira:issue_key}}
Text{{chat_1:message}}

Example later Search Highlights step:

FieldValue
Focusweekly update jira
Item limit3

Example later chat prompt:

Use these previous memory highlights as context:

{{highlight_search_1:markdown}}

Post a Comment to a Jira Issue​

This setup comments on the same Jira issue that started the workflow.

First, create a trigger Jira issue created/updated.

Then, add a Post comment to Jira issue action with:

FieldValue
Jira site URL{{jira:base_url}}
Issue key{{jira:issue_key}}

Comment on a Linear Issue​

This setup lets your automation comment on the exact Linear issue that started the workflow. You do not need to enter fixed IDs for each automation run. Instead, the action reuses the values from the trigger.

First, create a trigger Linear issue created.

Then, add a Comment on Linear issue action with this configuration:

FieldValue
Organization ID{{linear:organization_id}}
Issue ID{{linear:issue_id}}

React to a Linear Issue​

This setup lets your automation react to the exact Linear issue that started the workflow.

First, create a trigger Linear issue created.

Then, add a React to Linear issue action with this configuration:

FieldValue
OperationAdd reaction
Organization ID{{linear:organization_id}}
Issue ID{{linear:issue_id}}
Emoji🚀

Tips​

  • Copy the variable name exactly. Variable names are case-sensitive.
  • Keep the {{ and }} braces in place.
  • Use the GitHub shortcuts when available because they are shorter and easier to read.
  • Use Jira shortcuts (like {{jira:issue_key}}) when available because they are shorter and easier to read.
  • Use Linear shortcuts (like {{linear:issue_id}}) when available because they are shorter and easier to read.
  • Use {{linear:issue_identifier}} in prompts and messages when you want the short issue key shown in Linear, such as ENG-123.
  • If a variable does not resolve, check that the trigger actually provides that value.

FAQ​

Q: Which variable should I use for the GitHub ticket number?​

Use {{github:issue_number}}.

Q: Can I use variables in action fields other than the GitHub issue number?​

Yes. Variables can be used in string fields such as prompts, subjects, and messages.

Q: Which variable should I use for the output of the Google file reader?​

Use {{google_file_1:markdown}} for the first completed Google file step. If your automation reads multiple Google files, use {{google_file_2:markdown}}, {{google_file_3:markdown}}, and so on.

Q: Which variables should I use for Linear comments?​

Use {{linear:organization_id}} for organization ID and {{linear:issue_id}} for issue ID.

Q: Which variable should I use for the output of a markdown selection step?​

Use {{markdown_selection_1:markdown}} for the first completed markdown selection step. If your automation runs multiple markdown selection steps, use {{markdown_selection_2:markdown}}, {{markdown_selection_3:markdown}}, and so on.

Q: Which variable should I use for the output of Search Highlights?​

Use {{highlight_search_1:markdown}} for the first completed Search Highlights step. If your automation runs multiple Search Highlights steps, use {{highlight_search_2:markdown}}, {{highlight_search_3:markdown}}, and so on.

Q: Which Linear variable should I use in a prompt when I want the ticket key, like ENG-123?​

Use {{linear:issue_identifier}}.

Q: Which variable should I use for the Jira issue key?​

Use {{jira:issue_key}}.

Q: Why is my variable showing as plain text instead of a value?​

Check that the variable name is correct and that the automation trigger includes that data.