Skip to main content
Combining your Gumloop flows with webhook triggers allows you to build APIs visually with no code!

Webhooks

All Gumloop flows can be triggered via your own external app using webhooks.
Webhook button location in pipeline builder
To see the code necessary to trigger your flow, navigate to your flow and click the ‘Webhooks’ button on the top left side of the pipeline builder.
Webhooks configuration modal

Authorization

When making requests to trigger your Gumloop flows, you can authenticate using one of two methods:
  • API Key in URL
  • Authorization Header
The default method is to include your API key as a query parameter in the URL. This method is simpler and works well for most integrations:
curl -X POST \
  https://api.gumloop.com/api/v1/start_pipeline?user_id=xxxxxxxxxxxxxx&saved_item_id=xxxxxxxxxxxxxx&api_key=xxxxxxxxxxxx \
  -H "Content-Type: application/json" \
  -d '{}'
All examples below use the Authorization header method, but you can substitute the API key method in any of them.

Inputs

Most useful flows require some input from the user. There are two main approaches to handle inputs in your Gumloop flows:

Outputs

When you run a Gumloop pipeline remotely, the POST request to https://api.gumloop.com/api/v1/start_pipeline will return a run_id and a URL that links to the flow run. Here is an example of the response:
{
  "run_id": B7uiXDngvzFvUWxHRKQFAD,
  "saved_item_id": q3dasHQBidkNeXvAZo6Dby,
  "url": https://www.gumloop.com/pipeline?run_id=B7uiXDngvzFvUWxHRKQFAD&flow_id=q3dasHQBidkNeXvAZo6Dby
}
You can use run_id to poll a separate endpoint to get information about the ongoing run like the status, logs, and outputs when it is completed.

Polling for Run Status

In order to poll, make a GET request to https://api.gumloop.com/api/v1/get_pl_run with run_id as a query parameter. Here is an example of a GET request with cURL, Python, and JavaScript and their outputs:
curl 'https://api.gumloop.com/api/v1/get_pl_run?run_id=B7uiXDngvzFvUWxHRKQFAD&user_id=your_user_id' \
  -H 'Authorization: Bearer xxxxxxxxxxxxx'

Response Structure

{
    "created_ts": "2023-11-19T18:06:31.102786+00:00",
    "finished_ts": null,
    "log": [
        "\u001b[34m__system__: __STARTING__:Read files from GitHub\u001b[0m"
    ],
    "outputs": {},
    "run_id": "B7uiXDngvzFvUWxHRKQFAD",
    "state": "RUNNING",
    "user_id": "your_user_id"
}
The key attributes here are log, state, and outputs.
Contains a running log of each node and the activities within it.
One of “STARTED”, “RUNNING”, “TERMINATED”, “FAILED” or “DONE”.
A JSON object with key-value pair where the key is the output name and the value is the output value. This will only be populated when your pipeline reaches a “DONE” state and you have named output nodes in your pipeline.