# n8n Integration

#### Overview

[n8n](https://n8n.io/) is an open-source workflow automation platform that lets you connect any app or service using visual, no-code workflows. By adding an HTTP Request node to any n8n workflow, you can send alerts directly to ITOC360 and trigger your on-call escalation policies in real time.

#### Provider Configuration & Mapping

ITOC360 uses the `severity` field from the incoming payload to determine alert priority.

Priority Mapping:

| Payload Value | ITOC360 Priority |
| ------------- | ---------------- |
| `low`         | LOW              |
| `medium`      | MEDIUM           |
| `high`        | HIGH             |
| `critical`    | CRITICAL         |

#### Required Payload Format

Your HTTP Request node must send a JSON body in the following structure:

```json
{
  "event_type": "alert",
  "title":      "High CPU Usage on prod-01",
  "message":    "CPU usage exceeded 90% threshold",
  "severity":   "critical",
  "host":       "prod-01",
  "source":     "my-workflow-name",
  "timestamp":  "2026-04-06T10:00:00Z"
}
```

To resolve an existing alert, send the same payload with `event_type` set to `resolve`. The `host`, `title`, and `source` values must match the original alert exactly so ITOC360 can correlate and close it.

```json
{
  "event_type": "resolve",
  "title":      "High CPU Usage on prod-01",
  "message":    "CPU usage back to normal",
  "severity":   "critical",
  "host":       "prod-01",
  "source":     "my-workflow-name",
  "timestamp":  "2026-04-06T10:05:00Z"
}
```

#### Setup Instructions

**Step 1: Get Your Webhook URL**

1. Log in to your ITOC360 platform.
2. Go to **Sources → Add Source**.
3. Select **n8n** as your provider.
4. Save the configuration and copy the generated **Webhook URL** and **token**.

**Step 2: Create a New Workflow**

1. Log in to your n8n instance.
2. Go to **Workflows** and click **Add Workflow → Start from scratch**.
3. Click **Add first step** and search for **Manual Trigger**. Select it as your starting node.
4. Click the **+** button to the right of the Manual Trigger node, search for **HTTP Request**, and select it.

You should now have a two-node workflow like this:

<figure><img src="/files/hYPQHxd1Lp5WbXeKypkQ" alt=""><figcaption></figcaption></figure>

**Step 3: Configure the HTTP Request Node**

Click on the **HTTP Request** node to open its settings panel.

1. **Method:** `POST`
2. **URL:** Paste the Webhook URL you copied in Step 1.
3. **Authentication:** `None`
4. **Send Headers:** Toggle **on**.
5. Click **Add Header** and fill in:
   * **Name:** `x-itoc360-token`
   * **Value:** Paste your token from Step 1.
6. **Send Body:** Toggle **on**.
7. **Body Content Type:** `JSON`
8. **Specify Body:** `Using JSON`

<figure><img src="/files/tEsWEIgDiqc0PnL1w53B" alt=""><figcaption></figcaption></figure>

**Step 4: Add the Payload**

Scroll down to the **JSON** field and paste the following:

```json
{
  "event_type": "alert",
  "title":      "High CPU Usage on prod-01",
  "message":    "CPU usage exceeded 90% threshold",
  "severity":   "critical",
  "host":       "prod-01",
  "source":     "my-workflow-name",
  "timestamp":  "2026-04-06T10:00:00Z"
}
```

<figure><img src="/files/JhzTf943Fzqry7KhceYi" alt=""><figcaption></figcaption></figure>

Replace the field values with your own dynamic expressions or static test values.

**Step 5: Test the Workflow**

1. Click **Test workflow** in the top right corner.
2. Both nodes should turn green, confirming a successful delivery.

Once testing is complete, replace the Manual Trigger with the actual trigger that fits your use case — such as a Schedule, Webhook, or any app event node — and publish your workflow.


---

# 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://docs.itoc360.com/integrations/inbound-integrations/workflow-and-automation/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.
