Getting Started
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.
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.
Authorization
When making requests to trigger your Gumloop flows, you can authenticate using one of two methods:
API Key in URL
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:
Authorization Header
Alternatively, you can use the Authorization header with a Bearer token. This method is preferred when you want to keep credentials out of URLs:
You can switch between these methods in the webhook modal by checking or unchecking the “Use Authorization Header” option.
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:
Recommended Method: Webhook Input Node with JSON Parsing
This is the recommended approach for handling inputs. Use a Webhook Input node to capture the entire request body as a string, then parse it using a JSON Reader node. This method provides maximum flexibility and makes it easy to handle complex, nested data structures.
With this approach, you can send any JSON structure directly in your request body:
The Webhook Inputs node will capture this entire JSON payload as a string, which you can then parse using a JSON Reader node to extract individual fields or work with the entire data structure.
Alternative Method: Named Input Nodes
While the webhook inputs node with JSON parsing is recommended, there is an alternative method for receiving data that uses named Input nodes. All the following options require you to set up Input nodes in your flow where the ‘Input name’ values represent the name of that input field. These input names are used to map the information you send via the webhook to the appropriate nodes.
Once you have set up your named Input nodes, you can choose from any of the following options to send data to your flow:
Option 1: Direct Field Mapping
Just like with the Webhook Input node, you can pass inputs by name directly in the body of the request. This approach is concise and straightforward:
Option 2: Using the pipeline_inputs
Array
Alternatively, you can send inputs using the pipeline_inputs
field in the request body. The pipeline_inputs
field should contain an array of objects, where each object has an input_name
that matches your Input node’s name and a value
containing the data you want to pass to that Input node.
Option 3: GET Request (For Services Without POST Support)
Flows can also be triggered using a GET request when your external service doesn’t support POST requests. In this case, all body fields are passed in the URL query parameters.
Inputs are passed as an array of objects with the pipeline_inputs
query parameter as a URL-encoded string.
The value of pipeline_inputs
is a URL-encoded string equivalent to the following JSON body:
Important limitation: Because inputs are passed in the URL, they are subject to URL length limitations. Maximum URL length limits vary by browser, but are typically around 2000 characters. If your inputs are longer than this, you must use the POST request method.
Option 4: Header-Based Inputs (Not Recommended)
When using any of the above methods to trigger a flow, any provided headers will also be passed along as inputs to the flow. If you have an Input node with the same name as a header, it will be provided the header value as input.
This method is not recommended for regular use, but can be useful in specific integration scenarios:
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:
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.
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:
Request with cURL
Request with Python
Request with JavaScript
Output
The key attributes here are log
, state
, and outputs
.
log
: Contains a running log of each node and the activities within it.
state
: One of “STARTED”, “RUNNING”, “TERMINATED”, “FAILED” or “DONE”.
outputs
: 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.