Skip to main content

Escape Curly Brackets to Pass Them in Workflow Step Inputs

Learn how to escape curly brackets in Torq to correctly pass syntax for systems like JQL or GraphQL, avoiding common JSON or input errors.

Some step inputs require using curly brackets {} (for example, when working with query languages or structured payloads). Since Torq uses curly brackets for data expressions ({{ }}), you must escape them to ensure they are passed as literal characters.

Common use cases

Escaping curly brackets is commonly required when working with:

  • Jira Query Language (JQL): Queries that include {} syntax

  • GraphQL: Queries and mutations that rely on nested curly brackets

If curly brackets are not escaped properly, the step may fail with errors such as Bad JSON or Invalid input.

Escape as static text

Use this format when you want to pass curly brackets as plain text:

{{`{{THIS WILL BE PRINTED INSIDE}}`}}

The first image shows the input configuration, and the second image shows the resulting output.

Escape as a data expression

Use this format when embedding a JSONPath or dynamic value inside escaped curly brackets:

{{`{{{{$.sample_output.api_object.updated}}}}`}}

The first image shows the input configuration, and the second image shows the resulting output.

Did this answer your question?