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

# Custom integrations

> Connect any external tool to Flowla using webhooks, custom code, and HTTP requests.

Flowla's built-in integrations cover the most common tools — but if you use something that isn't natively supported, these three building blocks let you connect anything.

| Building block          | What it does                                                             |
| ----------------------- | ------------------------------------------------------------------------ |
| **Webhook Trigger**     | Lets an external tool start a Flowla workflow by sending it a signal     |
| **Code Action**         | Runs a small piece of JavaScript to process or reshape data mid-workflow |
| **HTTP Request Action** | Sends data from Flowla outward to any external tool or service           |

You can use these on their own or combine them depending on what you need.

***

## Webhook trigger — Receive data from external tools

### What it does

A Webhook trigger gives your workflow a unique URL. When any external tool sends a request to that URL, your workflow starts automatically.

Use this when:

* A tool your team uses in-house (like a custom CRM or billing system) needs to kick off a Flowla workflow
* An external event — like a contract being signed, or a form submitted on your website — should create or update a room
* You want to trigger Flowla from a tool that doesn't have a native integration

### How to set it up

<Steps>
  <Step title="Open AutoPilot and create a new workflow">
    Go to **AutoPilot** → **New Workflow**.
  </Step>

  <Step title="Select Webhook as the trigger">
    Choose **Webhook** from the trigger options.
  </Step>

  <Step title="Copy your webhook URL">
    Flowla generates a unique URL for this workflow. Copy it.
  </Step>

  <Step title="Configure your external tool">
    In your external tool, set it up to send a `POST` request (a way of pushing data) to that URL whenever the relevant event happens.
  </Step>
</Steps>

A typical payload (the data sent to Flowla) might look like this:

```json theme={null}
{
  "deal_id": "deal_8821",
  "contact_email": "jane@acmecorp.com",
  "contact_name": "Jane Doe",
  "company": "Acme Corp",
  "stage": "Proposal",
  "deal_value": 42000
}
```

<video autoPlay muted loop playsInline src="https://mintcdn.com/flowla/DTw1cUtVl5HKnL9j/images/autopilot/webhook_trigger.mp4?fit=max&auto=format&n=DTw1cUtVl5HKnL9j&q=85&s=d54a71190ca52575bd26ab231eda46ea" data-path="images/autopilot/webhook_trigger.mp4" />

<Tip>Use a tool like Postman to send a test payload before building out the rest of the workflow. Check the workflow run history to confirm it fired correctly.</Tip>

### What happens to the data

The data your external tool sends lands in Flowla as a raw block of text. To use individual fields from it in later steps — like the contact's name or deal value — you'll need to extract them using a Code action (explained below).

***

## Code action — Process data mid-workflow

### What it does

The Code action runs a small JavaScript snippet at any point in your workflow. It reads data from earlier in the workflow, transforms it if needed, and outputs named values that all your later actions can use.

You'll most commonly use it to extract specific fields from a webhook payload, but it works anywhere you need to reshape data.

### How to set it up

Add a **Code** action at the point in your workflow where you need to process data. Write your JavaScript snippet, then `return` the values you want to pass forward.

For each value you want to use later:

1. Click **Add variable**
2. The variable is added to your code as a `const`

### Extracting fields from a webhook payload

```javascript theme={null}
// The trigger data lives under this key in context
const triggerData = context["00000000-0000-0000-0000-000000000000"];

// The webhook payload is raw text, so parse it into usable data
const payload = JSON.parse(triggerData.payload);

// Return the specific field you want to use downstream
return payload.dataPoint;
```

After this runs, **dataPoint** is available in every subsequent action — just like any built-in variable.

<video autoPlay muted loop playsInline src="https://mintcdn.com/flowla/DTw1cUtVl5HKnL9j/images/autopilot/code_action.mp4?fit=max&auto=format&n=DTw1cUtVl5HKnL9j&q=85&s=58035f59aaf497594f0dab7c24ddadb6" data-path="images/autopilot/code_action.mp4" />

***

## HTTP Request action — Send data to external tools

### What it does

The HTTP Request action sends data from Flowla to any external tool or service. Use it to push information out of Flowla into a system that doesn't have a native integration.

This action can follow **any trigger** in Flowla — not just a webhook.

### Common uses

* Room viewed for the first time → notify your internal system
* Form submitted in a room → push responses to a ticketing tool or database
* HubSpot deal stage changes → sync a field to an in-house CRM
* A task in a room is completed → trigger a downstream process in your ops tools
* A call transcript is processed → send a summary to an internal Slack bot

### How to set it up

Add an **HTTP Request** action to your workflow and fill in:

| Field       | What to enter                                              |
| ----------- | ---------------------------------------------------------- |
| **Method**  | `POST`, `PATCH`, `PUT`, or `GET`                           |
| **URL**     | The endpoint to send data to — can include `{{variables}}` |
| **Headers** | Authentication details and content type                    |
| **Body**    | The data to send — use `{{variables}}` from earlier steps  |

### Example: Notify an internal system when a room is first viewed

**Trigger:** Room viewed first time

**Method:** `POST`

**URL:**

```
https://api.yourcompany.com/events/room-viewed
```

**Headers:**

```
Content-Type: application/json
Authorization: Bearer YOUR_API_TOKEN
```

**Body:**

```json theme={null}
{
  "room_id": "{{room.id}}",
  "room_link": "{{room.link}}",
  "viewer_email": "{{contact.email}}",
  "viewed_at": "{{trigger.timestamp}}"
}
```

### Authentication options

**Bearer token:**

```
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR...
```

**API key header:**

```
X-API-Key: your_api_key_here
```

**Basic auth:**

```
Authorization: Basic base64(username:password)
```

<Tip>Always put authentication credentials in the **Headers** field, not in the body, so they don't appear in payload logs.</Tip>

<video autoPlay muted loop playsInline src="https://mintcdn.com/flowla/DTw1cUtVl5HKnL9j/images/autopilot/http_request.mp4?fit=max&auto=format&n=DTw1cUtVl5HKnL9j&q=85&s=675d594133abf85b8a0e67a3d78f4f1f" data-path="images/autopilot/http_request.mp4" />

***

## Combining the building blocks

These three tools work alongside any other Flowla action — room creation, email sending, CRM updates, Slack messages, and more. Here are three common patterns:

### Pattern A — External event → Flowla action

An external tool fires a webhook. You extract the data and use it to create a room or send an email.

```
[Webhook Trigger]
       ↓
[Code Action — extract fields from the payload]
       ↓
[Create Room from Template — using {{company}}, {{contactEmail}}, etc.]
       ↓
[Send Email — with room link]
```

### Pattern B — Flowla event → External tool

Something happens inside Flowla and you push the data outward. No webhook or code action needed.

```
[Form Submitted Trigger]
       ↓
[HTTP Request — POST form responses to your database]
```

### Pattern C — External event → Flowla → Back out again

An external tool triggers the workflow, Flowla acts on it, then sends data back.

```
[Webhook Trigger]
       ↓
[Code Action — extract payload fields]
       ↓
[Create Room from Template]
       ↓
[Send Email]
       ↓
[HTTP Request — POST room URL back to the originating system]
```

***

## FAQs

<AccordionGroup>
  <Accordion title="Can I add a Code action in the middle of a workflow, not just at the start?">
    Yes. Place it anywhere in the sequence — for example, between a CRM trigger and an HTTP Request if you need to reformat a value before sending it out.
  </Accordion>

  <Accordion title="Does the HTTP Request action work with any trigger?">
    Yes. It's a standard action that can follow any trigger — room activity, form submissions, CRM changes, call transcripts, email, or a webhook.
  </Accordion>

  <Accordion title="Can I add multiple HTTP Request actions in one workflow?">
    Yes. Add as many as you need — they run in sequence. For example, you could notify two different external systems in the same workflow.
  </Accordion>

  <Accordion title="How do I test a webhook before going live?">
    Send a sample POST request to your Flowla webhook URL using a tool like Postman. Then check the workflow run history to confirm the trigger fired and your Code action extracted the right values.
  </Accordion>

  <Accordion title="What if my webhook payload isn't always the same structure?">
    Use optional chaining in your Code action (`data.field?.subfield ?? "fallback"`) to handle missing or inconsistent fields without breaking the workflow.
  </Accordion>
</AccordionGroup>

***

## What's next

<CardGroup cols={2}>
  <Card title="Triggers" icon="bolt" href="/automations/triggers">
    Full list of available triggers
  </Card>

  <Card title="Actions" icon="play" href="/automations/actions">
    Full list of available actions
  </Card>

  <Card title="AI Agents" icon="sparkles" href="/automations/ai-actions">
    Add AI-generated content between steps
  </Card>

  <Card title="Suggested Recipes" icon="book-open" href="/automations/suggested-recipes">
    Pre-built workflow templates to get started
  </Card>
</CardGroup>
