- Home
- Resources
- Integrations
- TheHive
TheHive n8n integrationAutomate TheHive with n8n.
Every alert raised in TheHive can start an n8n workflow. The TheHive n8n integration pairs a trigger node listening to 14 events across alerts, cases, tasks, logs and observables with a node that exposes 4 Log operations. Built for security teams tired of copying findings by hand.
Verified Trustpilot reviews · AI, automation & growth agency
What does the TheHive n8n integration actually do?
The TheHive n8n integration connects your incident response platform to the rest of the toolchain. One node reads and writes inside TheHive, a second node starts a workflow the moment something moves in an alert, a case or a task. Both talk to TheHive 3 and TheHive 4, through an API key created in your own instance.
Start with triage. An analyst receives a phishing report, an alert lands in TheHive, and alert_create fires the workflow. n8n queries your threat intelligence sources, then writes the verdict straight into the investigation task with Create a log. A short summary goes to the on-call channel through the Slack node, so nobody refreshes a dashboard waiting for news.
Second pattern: the audit trail. Compliance asks what happened on a case and when. Get many logs pulls every entry attached to a task, Return All walks through the pages of the API instead of stopping at the first batch, and the result lands in a Postgres table or a Google Sheets tab that anyone can read without a TheHive account.
Third pattern: responders. TheHive lets you attach responders to an object, and Execute a responder fires one on a specific log from a workflow. Useful when a decision has already been made elsewhere, in a ticket or in an approval step, and the action just has to be applied without an analyst clicking through the interface.
Now the honest part. The catalogue exposes 4 operations, all on the Log resource. The node itself covers 5 resources (Alert, Case, Log, Observable and Task), but the operations n8n shows you depend on the API version you pick in the credential, the saved connection you fill in once: create the credential first, choose the version, then come back to the node and the list appears. Anything the node does not offer is still reachable with HTTP Request, which calls any TheHive endpoint while reusing the same credential.
Two limits worth knowing before you build. This node targets the version 3 and version 4 APIs; a TheHive 5 server needs the separate TheHive 5 node instead. And the trigger will not register its own webhook, you declare it in the TheHive configuration file yourself. If you are still weighing the platform, the n8n review covers that ground, and the n8n training goes through building workflows step by step.
How do you connect TheHive to n8n?
- 01
Create an API key in TheHive
TheHive runs on your own server, so the key comes from your instance, not from a vendor portal. Open Organization > Create API Key and copy the value straight away. That key carries the permissions of the account it belongs to, which is worth thinking about: a workflow that writes logs into tasks does not need an administrator. Create a dedicated service account with the rights it actually uses and you keep your audit trail readable.
- 02
Fill the credential in n8n
In n8n, open the Credentials menu and add a TheHive credential. Paste the API Key, then set URL to the address of your TheHive server, the same one your analysts open in their browser. A credential is a saved connection: you fill it once and every workflow picks it from a dropdown, so a rotated key is updated in a single place rather than in ten nodes.
- 03
Pick the API version, then open the node
The API Version field offers TheHive 3 (api v0) and TheHive 4 (api v1), and this choice drives what the node can do. Ignore SSL Issues lets n8n connect when certificate validation fails, which happens on internal instances with a self-signed certificate. Save, go back to the node, select a resource, and the operations available for your version show up in the list.
What starts a workflow from TheHive ?
TheHive Trigger is the node that starts a workflow when something happens in TheHive. It listens to 14 events, listed below by family. Pick one or several, activate the workflow: n8n registers the webhook on your TheHive account.
What you see in n8n
Every event, by family
One row per object, one chip per action. The event to tick in the node is object.action; hover a chip to read exactly when it fires.
alert_create.*1alert_create. alert_create
alert_delete.*1alert_delete. alert_delete
alert_update.*1alert_update. alert_update
case_artifact_create.*1case_artifact_ create. case_artifact_ create
case_artifact_delete.*1case_artifact_ delete. case_artifact_ delete
case_artifact_update.*1case_artifact_ update. case_artifact_ update
case_create.*1case_create. case_create
case_delete.*1case_delete. case_delete
case_task_create.*1case_task_ create. case_task_ create
case_task_log_create.*1case_task_ log_ create. case_task_ log_ create
case_task_log_delete.*1case_task_ log_ delete. case_task_ log_ delete
case_task_log_update.*1case_task_ log_ update. case_task_ log_ update
case_task_update.*1case_task_ update. case_task_ update
case_update.*1case_update. case_update
The trigger also accepts * (any event). Handy for logging, dangerous in production.
Configuration notes
01Configure the TheHive Trigger
The TheHive Trigger starts a workflow when your instance reports activity. It works by webhook, meaning TheHive calls an n8n URL as things happen and the execution begins within seconds, with no polling loop asking for changes on a timer.
Key parameters
- Events: the list of things you want to react to, 14 of them in total. Leave the wildcard
*selected to catch everything and filter later in the workflow, or tick only the ones you need and keep executions clean.
notification.webhook.endpoints in the application.conf file of your server, name each endpoint, list your organisation, then run the documented cURL command against /api/config/organisation/notification to switch notifications on.02Alert Created, Alert Updated, Alert Deleted
Alerts are what reaches TheHive before anyone decides it deserves a case: a SIEM detection, a mailbox report, a feed. Three events cover their whole life and they are the ones most workflows start from.
Key parameters
- Events: tick Alert Created (
alert_create) for anything new, Alert Updated (alert_update) when severity or status changes, Alert Deleted (alert_delete) when one is discarded.
03Case Created, Case Updated, Case Deleted
A case is the investigation itself, the container analysts work in for hours or days. Its three events give you a reliable way to keep the rest of the company informed without anyone writing a status update by hand.
Key parameters
- Events: Case Created (
case_create) opens the story, Case Updated (case_update) covers every change made along the way, Case Deleted (case_delete) closes it out.
04Task, Log and Observable events
Underneath cases sit the pieces analysts actually manipulate: tasks to do, logs describing what was done, observables holding the technical indicators. Eight events cover them.
Key parameters
- Events: Task Created (
case_task_create) and Task Updated (case_task_update); Log Created (case_task_log_create), Log Updated (case_task_log_update) and Log Deleted (case_task_log_delete); Observable Created (case_artifact_create), Observable Updated (case_artifact_update) and Observable Deleted (case_artifact_delete).
What can the TheHive node do?
The TheHive node exposes 4 operations across 5 resources. For each one: the node as you configure it in n8n, the required fields, and our field notes.
| Resource | Create | Get | Get Many | Execute Responder |
|---|---|---|---|---|
| Alert | ||||
| Case | ||||
| Log | ✓ | ✓ | ✓ | ✓ |
| Observable | ||||
| Task |
Operations index
Alert
0 operationsCase
0 operationsLog
4 operationsCreate a log
log.createWhat you see in n8n
Notes & use cases
Adds an entry to the timeline of a TheHive task, which is how an automated step leaves a trace an analyst can read later.
Key parameters
- Task ID: the identifier of the task the entry belongs to, often
{{ $json.id }}coming from a Task Created event. - Message: the content of the log, the text your previous nodes assembled.
- Start Date: the submission date, already set to now, so you only touch it when backfilling.
- Status:
OkorDeleted,Okby default. - Attachment: in the Options collection, attaches a file to the entry.
Execute a responder
log.executeResponderWhat you see in n8n
Notes & use cases
Runs one of the responders configured on your instance against a single log entry, and the action happens in TheHive rather than in the workflow.
Key parameters
- Log ID: the identifier of the entry the responder acts on, taken from a Log Created event or from Get many logs.
- Responder Name or ID: picked from the list your instance exposes, or supplied as an identifier through an expression, a value such as
{{ $json.id }}pulled from an earlier node, when the choice depends on the data.
Get many logs
log.getAllWhat you see in n8n
Notes & use cases
Reads the entries attached to a task and returns them as separate items, one per log, ready for the next node.
Key parameters
- Task ID: the task whose timeline you want to read.
- Return All: enabled, n8n walks through the pages of the API until every entry is retrieved.
- Limit: the ceiling when Return All is off, handy while testing so a busy task does not flood your execution.
Get a log
log.getWhat you see in n8n
Notes & use cases
Fetches a single entry and returns its current content, which matters when the log was written minutes ago and may have changed since.
Key parameters
- Log ID: the identifier of the entry, not its message. A Log Updated event gives it to you directly, and so does an earlier call in the same workflow.
Observable
0 operationsTask
0 operationsNeed help automating TheHive with n8n?
A person reads every message.