API Trigger Actions

Actions for parsing incoming webhook requests and returning a response.

Example: Handle Webhook and Notify

Handle Webhook

Receive webhook, parse body, send notification

Event

API Trigger

body
headers
method

Object

Get

object
body
path
event
output

Telegram Bot

Send Message

chatId
{{vault.ADMIN_CHAT}}
text
output

ActionDescriptionOutput
Parse BodyParse the JSON request bodyParsed object
Parse HeadersExtract HTTP headersHeaders object
Parse QueryExtract URL query parametersQuery object
Get MethodGet HTTP method (GET/POST/etc.)Method string
Get PathGet the request pathPath string
RespondSend the HTTP response and stop the flow—

Respond

Respond returns the HTTP response to the caller and stops the flow — nothing after it runs. Put any side effects (notifications, logging) before it.

InputDescription
statusHTTP status code (default 200)
bodyResponse body — text or JSON. Optional
headersResponse headers as a JSON object

The caller's request blocks until Respond is reached, up to 25 seconds, then gets a 504 with a history_uuid.

Responses without a body

Per RFC 9110, some status codes must not carry a response body. When you pick one of these as a static status, the editor hides the body field, and the response is sent with no body and no Content-Type header:

Status rangeBody
1xx (Continue, Switching Protocols, …)never
204 No Contentnever
304 Not Modifiednever
any other (200, 404, 500, …)optional — leave empty for an empty body

If the status is set dynamically (sourced from an earlier step), the body field stays available; at runtime a body is still dropped for 1xx/204/304 or when it is empty. Content-Type defaults to text/plain; charset=utf-8 when a body is present and you don't set one.

Example

When a webhook hits one of your routes like:

POST https://<subdomain>.api.fainflow.com/webhook?source=github
Authorization: Bearer fkey_…
Content-Type: application/json

{"event": "push", "repo": "my-app"}

The actions produce:

  • Parse Body → {"event": "push", "repo": "my-app"}
  • Parse Headers → {"content-type": "application/json"}
  • Parse Query → {"source": "github"}
  • Get Method → POST
  • Get Path → /webhook
  • Respond → returns e.g. 200 {"ok": true} to the caller