Skip to content
Developers

HTTP, webhooks and code

Connect any API, expose flows as endpoints and write your own logic in JavaScript or TypeScript.

HTTP and GraphQL components

If an app has no component in flooows, or you need an operation the component does not offer, use the HTTP component. You set the method (GET, POST, PUT, PATCH, DELETE), URL, headers, parameters and body, and you can insert data from previous steps into any of them. For example, a POST to your ERP API with the body {"customer": "{{find_customer.id}}", "amount": {{trigger.total}}}.

For GraphQL APIs there is a dedicated component where you write the query and its variables. The response is available as the step output, like any other.

Store API keys in a connection instead of typing them into a header: they stay encrypted and do not appear in the flow.

Incoming webhooks

The Webhook trigger generates a unique URL. Any system that sends a request to that URL starts a run, and the body, headers and query parameters become available as {{trigger.body...}}, {{trigger.headers...}} and similar. It is the fastest way to connect in-house systems, because the flow starts instantly, without waiting for a poll.

  • Check a shared secret in a header with a condition at the start to reject unauthorized requests.
  • Respond quickly and defer heavy work if the sender has a short timeout.
  • Use the event identifier to avoid processing the same delivery twice.

Flows as APIs: synchronous response

With a webhook response step, the flow returns a result to the caller: status code, headers and body. This turns a flow into an API endpoint. Example: your website calls the webhook with a postcode, and the flow checks stock in the POS and returns the nearest store with availability. Keep these flows short so they respond quickly.

Code steps

When the logic does not fit in a condition, use a JavaScript or TypeScript code step. You define inputs, assign references to them such as {{trigger.items}}, and the code returns a value that becomes the step output. You can use npm packages, for example to format dates or validate a bank account number.

  • Keep each code step small, with a single responsibility.
  • Return objects with clear names so the data selector is easy to use.
  • Throw an explicit error when data is invalid, so the run shows as failed and the alert fires.

Common errors

  • Malformed JSON bodies caused by quotes in inserted data; build complex JSON in a code step.
  • Forgetting the Content-Type header on POST requests.
  • API keys typed directly into the flow instead of stored in a connection.
  • Synchronous response flows that include delays or approvals.

Your first floow, running today.

Work out the price of your plan in a minute and request your sign-up, or book a demo and we will help your team design its first flows.

✓ No credit card✓ Human support✓ Data hosted in Spain