> ## Documentation Index
> Fetch the complete documentation index at: https://docs.navisops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Build custom integrations with webhooks

> Use inbound webhooks to trigger Navis Ops workflows from any external service, and outbound HTTP requests to push data to any URL from within a workflow.

Webhooks let Navis Ops talk to the rest of your tool stack without a dedicated integration. Any external service that can send an HTTP POST request — Stripe, GitHub, your own backend, a serverless function — can trigger a Navis Ops workflow. Workflows can also make HTTP requests to external URLs, letting you push data out to any API or service as part of an automation.

## Inbound webhooks: trigger workflows from external services

An inbound webhook gives you a unique URL that, when called, starts a Navis Ops workflow and passes along whatever data was in the request body.

### Set up a webhook trigger

<Steps>
  <Step title="Create a new workflow">
    Go to **Workflows** and click **New workflow**.
  </Step>

  <Step title="Choose the webhook trigger">
    Select **Webhook** as the trigger type. Navis Ops generates a unique endpoint URL for this workflow — it looks like:

    ```text theme={null}
    https://<your-supabase-project>.supabase.co/functions/v1/webhook-trigger/<workflow-id>
    ```

    Copy this URL. You'll paste it into the external service that will call it.
  </Step>

  <Step title="Access payload data in your workflow">
    The request body is available as trigger variables throughout the workflow. Use the variable picker to reference fields from the payload. For example, if the incoming JSON has a `customer_email` field, you can reference it as `{{trigger.customer_email}}` in any node that follows.
  </Step>

  <Step title="Build the rest of the workflow">
    Add nodes after the trigger to act on the payload data — create tasks, send notifications, update records, or make outbound HTTP requests.
  </Step>

  <Step title="Activate and test">
    Activate the workflow and send a test request to the endpoint (see [testing webhooks](#testing-webhooks)).
  </Step>
</Steps>

### Secure your webhook

By default, your endpoint is publicly accessible to anyone with the URL. To verify that requests are coming from a trusted source, use the webhook secret.

<Steps>
  <Step title="Copy your webhook secret">
    In the webhook trigger settings panel, find the **Webhook secret** field. Navis Ops generates a secret automatically. Copy it.
  </Step>

  <Step title="Configure the sending service">
    In the external service (Stripe, GitHub, your own service), configure it to include the secret in a header with every request:

    ```text theme={null}
    x-webhook-secret: <your-webhook-secret>
    ```

    The header name is always `x-webhook-secret`.
  </Step>

  <Step title="Navis Ops validates every request">
    When a request arrives, Navis Ops checks the `x-webhook-secret` header. If the value doesn't match, the request is rejected and the workflow does not run.
  </Step>
</Steps>

<Warning>
  Treat your webhook secret like a password. Do not share it in public repositories, client-side code, or chat messages. If the secret is exposed, regenerate it from the workflow trigger settings.
</Warning>

## Outbound webhooks: make HTTP requests from a workflow

Workflows can send data to any external URL using the **HTTP Request** node. This is how you push data out — call an external API, trigger a service, or forward data to your own backend — as part of an automation.

<Steps>
  <Step title="Add an HTTP Request node">
    In a workflow, click **+** and select **HTTP Request** from the node list.
  </Step>

  <Step title="Configure the request">
    In the node settings, fill in:

    * **Method** — GET, POST, PUT, PATCH, or DELETE
    * **URL** — the external endpoint to call
    * **Headers** — any headers the API requires, such as `Authorization: Bearer <token>` or `Content-Type: application/json`
    * **Body** — for POST and PUT requests, the JSON payload. Use the variable picker to include dynamic values from earlier in the workflow.
  </Step>

  <Step title="Use the response">
    The response body and status code are available as variables for subsequent nodes in the workflow.
  </Step>
</Steps>

## Example: Stripe payment → create a follow-up task

When a payment succeeds in Stripe, this workflow creates a task in Navis Ops so your team can follow up with the customer.

<Steps>
  <Step title="Create a webhook-triggered workflow">
    Create a new workflow with a **Webhook** trigger. Copy the endpoint URL.
  </Step>

  <Step title="Add the webhook in Stripe">
    In the Stripe Dashboard, go to **Developers → Webhooks → Add endpoint**. Paste the Navis Ops endpoint URL and select the `payment_intent.succeeded` event. Copy the signing secret Stripe provides and paste it into the **Webhook secret** field in your Navis Ops trigger settings.
  </Step>

  <Step title="Add a Create Task node">
    Add a **Create Task** node with:

    * **Title** → `Follow up with customer: {{trigger.data.object.metadata.customer_email}}`
    * **Project** → select your customer success project
    * **Due date** → tomorrow
    * **Notes** → `Payment of {{trigger.data.object.amount_received}} received.`
  </Step>

  <Step title="Activate the workflow">
    Save and activate. The next time a payment succeeds in Stripe, the task appears in Navis Ops automatically.
  </Step>
</Steps>

## Testing webhooks

During development, your workflow endpoint needs to be reachable from the external service. A few tools make this easier:

<CardGroup cols={2}>
  <Card title="RequestBin" icon="inbox" href="https://requestbin.com">
    Capture and inspect incoming HTTP requests without any setup. Paste the RequestBin URL into your external service to see exactly what payload it sends before wiring it to Navis Ops.
  </Card>

  <Card title="ngrok" icon="arrow-right-arrow-left" href="https://ngrok.com">
    Expose a local server to the internet with a public URL. Useful if you're building a service locally that needs to receive webhook events during development.
  </Card>
</CardGroup>

You can also send test requests directly from your terminal to confirm the Navis Ops endpoint is accepting requests:

```bash theme={null}
curl -X POST https://<your-supabase-project>.supabase.co/functions/v1/webhook-trigger/<workflow-id> \
  -H "Content-Type: application/json" \
  -H "x-webhook-secret: <your-webhook-secret>" \
  -d '{"event": "test", "message": "Hello from curl"}'
```

A `200 OK` response means the endpoint is live and the workflow ran (or was queued to run). Check the **Workflow runs** panel to see the result.

## Troubleshooting

<AccordionGroup>
  <Accordion title="The workflow isn't running when I send a request">
    Check that the workflow is **active** — inactive workflows won't respond to webhook requests even if the endpoint is valid. Also confirm the `x-webhook-secret` header matches the secret in the trigger settings if you have validation enabled.
  </Accordion>

  <Accordion title="Payload fields aren't available in the variable picker">
    The variable picker populates from a sample payload. Send a test request to the endpoint, then go back to the workflow editor and reopen the node — the picker should now reflect the fields from your payload.
  </Accordion>

  <Accordion title="The external service is getting a timeout">
    Navis Ops acknowledges webhook requests immediately and processes the workflow asynchronously, so timeouts from the Navis Ops side are unlikely. If the external service is timing out, check that the endpoint URL is correct and that there are no network restrictions blocking the request.
  </Accordion>

  <Accordion title="I need to validate the signature from GitHub or Stripe instead of using the x-webhook-secret header">
    Use a **Condition** node at the start of your workflow to check the value of the service-specific signature header (for example, `x-hub-signature-256` from GitHub or `stripe-signature`). If the condition fails, add a branch that stops the workflow without taking any action.
  </Accordion>
</AccordionGroup>

## See also

<CardGroup cols={2}>
  <Card title="Workflow triggers" icon="bolt" href="/guides/workflows/triggers">
    Overview of all trigger types: webhook, manual, schedule, note, and entity.
  </Card>

  <Card title="Workflow nodes" icon="circle-nodes" href="/guides/workflows/nodes">
    Full reference for the HTTP Request node and all other node types.
  </Card>

  <Card title="GitHub integration" icon="github" href="/guides/integrations/github">
    Step-by-step guide to receiving GitHub webhook events in Navis Ops.
  </Card>

  <Card title="Zapier integration" icon="zap" href="/guides/integrations/zapier">
    Connect Navis Ops to 6,000+ apps without writing webhook code.
  </Card>
</CardGroup>
