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 the Comment on GitHub ticket action.

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 the Comment on Linear issue action, 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.

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.

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}}

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 variables should I use for Linear comments?​

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

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.