# n8n

## Step 1: Create a Webhook in n8n

1. **Open n8n**: Log into your n8n dashboard.
2. **Create a new workflow**.
3. **Add the "Webhook" node**:
   * Set the **HTTP Method** to `GET`.
   * Set the **Path** to something like `get-date`.
   * Enable authentication (optional) if you want to restrict access.
4. **Connect the nodes**: Webhook ➝ Set ➝ Response.
5. **Add "Respond to Webhook" node**:
   * Set the `Response Mode` to `Last Node`.
6. **Save and Activate** the workflow.

```
GET https://n8n.yourdomain.com/webhook/get-date
```

## Step 2: Integrate n8n Webhook with Your Voice Agent

Your **voice agent** should be able to call this webhook to retrieve today’s date and handle the response.

### 1. **Open Your Voice Agent Application**

* Open the agent you want to integrate with the webhook.
* Navigate to agent configuration page -> conversational flow tab.

<figure><picture><source srcset="/files/t4MzNSJc1hduuBIIfrbs" media="(prefers-color-scheme: dark)"><img src="/files/O2fCJ2ChQgVrpg3WwYN2" alt=""></picture><figcaption></figcaption></figure>

### 2. **Add a Webhook Node**

* Click on the **`+ Add Node`** button.
* Select the **Webhook** node from the list of available nodes.
* The node will now appear on the agent flow canvas.

<figure><picture><source srcset="https://github.com/DataQueue-AI/gitbook/blob/main/docs/broken-reference" media="(prefers-color-scheme: dark)"><img src="/files/kXqzuJxmIuwtCzzj201W" alt=""></picture><figcaption></figcaption></figure>

### 3. **Configure the Webhook Node**

* Click on the newly added **Webhook node** to open its settings panel.
* You’ll see a **Webhook URL** input field.
* Paste the n8n webhook URL (e.g., `https://n8n.yourdomain.com/webhook/get-date`).

## Step 3: Test the Webhook

Before launching the full agent, you can **test the webhook connection**:

### **Navigate to the "Webhook" Section**

* While editing the webhook node, look for a **“Test Webhook”** button.
* Click the **"Test Webhook"** button.
* The system will try to send a request to the n8n webhook URL.
* Message will appear (Webhook test : Success) or (Webhook test : Failed) depending wether it is set properly.

<figure><picture><source srcset="/files/NWkU8yFA7QBcUs6T2eZ1" media="(prefers-color-scheme: dark)"><img src="/files/Ao4tU1YwlhiXn8qOwmlQ" alt=""></picture><figcaption></figcaption></figure>

## Step 4: Save and Launch the Voice Agent

Once the webhook works correctly:

1. **Save** the node configuration( "Save" button).
2. Click **“Start Call”**.
3. Interact with your voice agent — it will now call the n8n webhook, receive the response, and handle the data accordingly (e.g., show it or save it to a database).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dataqueue.gitbook.io/voicehub-docs/integrations/n8n-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
