Reusable HTTP requests
HTTP request steps call other tools' APIs from a workflow, for example to create a ticket, comment on one, or post to a Slack channel. Save a request once, and any workflow can use it as a step.
Create a reusable HTTP request
- Go to Workflows and open HTTP requests.
- Select New HTTP request.
- Give it a name that says what it does, such as "Slack: Post message to channel" or "Linear: Create issue."
- Set the request:
- Method, such as
POST - URL, such as
https://api.linear.app/graphql - Headers, such as
Content-Type: application/json - Body, if the API needs one
- Method, such as
- Save the request.
Keep credentials out of request bodies and URLsStore API keys and tokens as secrets, and reference them in headers, instead of pasting them into the request.
Use values from the run
Request URLs, headers, and bodies can use Liquid to insert values from the run, such as kickoff inputs or an earlier step's output. For example, a Slack message body:
{
"channel": "#dependency-updates",
"text": "{{ steps.check_versions.output.summary }}"
}Values that change from workflow to workflow, like the channel or the message, can come from the step that uses the request.
Use a request in a workflow
- In the workflow editor, add an HTTP request step.
- Choose the saved request.
- Fill in any values the request expects from this workflow.
The step shows the request's name and the host it calls, such as slack.com, on the canvas.
Edit or delete a request
Changes to a saved request apply to every workflow that uses it. Before editing or deleting one, check which workflows use it.
Use the response
A later step can read the request's response at steps.<step id>.output, for example to use the ID of a ticket the request just created.
Updated about 6 hours ago

