How n8n for security automation with MISP and TheHive works
A security team that wants indicators enriched and cases opened without copy-paste is usually spending analyst time moving the same values between a threat intelligence platform and a case manager. n8n can sit between them. A workflow takes an indicator, queries MISP for matching events and attributes, and then creates or updates a case in TheHive through the dedicated MISP and TheHive nodes and their underlying APIs. The workflow runs on servers you control, so indicators, case data and stored credentials stay inside your network boundary. The design question is less whether the flow is possible and more which steps deserve automation, which need an analyst, and how the workflow behaves when one side is slow or unavailable.
Two constraints shape the design before any node is placed. First, n8n is source-available under the Sustainable Use License, a different category from OSI open source. That license limits use to your own internal business purposes or to non-commercial use, so check it against how you plan to run the workflows, particularly if a workflow is shared with or delivered to another organization. Read the n8n license terms before you rely on the arrangement. Second, the MISP and TheHive nodes, their operations and their credential fields can change between n8n releases, so confirm the exact node names, supported operations and API requirements against the n8n version you intend to install.
This page covers how the enrichment and case-opening flow is structured, which API credentials and permissions each platform needs, how to handle failed lookups and duplicate cases, and the point at which a dedicated SOAR tool fits the workload better. Read it alongside your own MISP and TheHive versions, because the API behavior you depend on is set by those installations. Treat the workflow as a production integration from the start: decide who owns the credentials, where workflow changes are reviewed, and what an analyst sees when an automated step fails.
What you need before connecting n8n to MISP and TheHive
Connecting n8n to MISP and TheHive touches licensing, two versions of third-party software, credentials and network paths. Each card below is one item to settle before building the first workflow, so the integration does not depend on assumptions about any of them.
n8n edition and license fit
Confirm that your use of n8n falls within the Sustainable Use License, which permits use for your own internal business purposes. Using n8n to run security automation for your own SOC is internal use, but embedding it in a product or offering it to outside parties is a different question. Check whether any workflows or nodes you plan to use are in files marked .ee, since those need a valid Enterprise License. Confirm which edition supports the features you need before you design around them.
MISP version and support status
MISP 2.5 is the recommended version for new deployments, and MISP 2.4 is end of life with security fixes only. If you already run MISP 2.4, plan an upgrade before building automation against its API, because the nodes and API behavior you test today may change. Record the exact MISP version and confirm your API endpoints and PyMISP usage against it, not against an older example.
MISP download pageTheHive version and API key account
Confirm which TheHive version you run and whether the n8n TheHive node supports it. Do not assume compatibility from the node name. Create a dedicated TheHive user for n8n and generate its API key under that account, so every action is attributed to the integration and access can be revoked without affecting analysts. Record the version and API behavior you verified in your test environment.
Least-privilege service accounts
Create a separate service account in MISP and in TheHive, each limited to the organizations, sharing groups, case templates and actions the workflows need. For example, an enrichment workflow may only need read access to indicators, while a case-opening workflow needs write access to cases in one organization. Review these permissions with the owners of both tools, because a broad key in n8n exposes every system behind it.
Network paths and TLS certificates
Map each connection from the n8n workers to the MISP and TheHive endpoints, including any proxy or firewall in between. Queue mode workers make these calls, not only the main instance, so the rules must cover every worker host. Confirm that both services present certificates that n8n trusts, and that the internal certificate authority is available to the n8n container or host. Test the path from each worker before you debug workflow logic.
Encryption key handling for credentials
n8n encrypts stored credentials with its encryption key, and in queue mode every worker and webhook processor must share that key to read them. Confirm where the key is stored, who can read it, and how it is backed up, because losing it makes saved MISP and TheHive credentials unusable. Keep the key in your secrets management system rather than in a workflow or a shared file, and plan how it is rotated.
n8n queue mode docsHow to configure the MISP and TheHive nodes in sequence
This sequence takes a team from confirmed MISP and TheHive instances to an n8n workflow that enriches indicators, opens TheHive cases and notifies analysts. Each step ends with a check so problems surface before the next node is added.
Confirm MISP and TheHive are running and reachable
Before touching n8n, confirm that the MISP instance and the TheHive instance are deployed, reachable from the network segment where n8n runs, and serving their web interfaces over the certificates your organization trusts. Your platform team owns this step, and MISP installation options and versions are worth confirming against the MISP download page before you deploy. Done means you can log in to both products from a host on the n8n network and see their current version in the administration views. If either system is unreachable from that host, fix routing, DNS or certificate trust now, because every later step depends on it.
Create dedicated API keys with minimum rights
Create a separate service account in MISP and a separate service user in TheHive for n8n, rather than reusing an analyst's personal key. Grant only the roles the workflow needs: read access to events and attributes for enrichment in MISP, and case creation and tagging rights in TheHive. Record which account owns each key so that rotation and revocation are assigned to a named team. Done means each key works from the n8n host when called directly with a simple read request, and a request for an action outside its role is refused.
Create n8n credentials for each system
In n8n, create one credential for MISP and one for TheHive using the API keys and base URLs from the previous step. Store them in n8n's credential store rather than pasting keys into node parameters or expressions. If your instance runs in queue mode, confirm that the encryption key is shared with every worker and webhook processor, since otherwise the credentials will not decrypt on those processes. Done means each credential passes the built-in connection test, and the test returns without an authentication error.
Test a read-only MISP attribute search
Build a manual workflow with a single MISP node set to a read operation, such as an attribute search for one known test value that exists in your MISP instance. Run it from the editor and inspect the output panel. Done means the execution returns the expected fields, including the attribute type, value, event identifier and tags, for the test value you chose. If the result is empty, check the MISP search filters and whether the test value was published in an event your key can see. Do not add any write operations until this read succeeds.
Build the indicator enrichment step
Extend the workflow so the indicator from your trigger is passed into the MISP search, and the results are shaped into a small set of fields your analysts need, such as hit count, matching event identifiers, threat level and tags. Use an IF node so that an indicator with no MISP match follows a clear path instead of failing. Done means a known indicator returns enriched fields and an unknown indicator takes the no-match branch in a test run. Review what fields are passed downstream, because enrichment output often ends up in tickets and chat messages.
Add the TheHive case creation step
Add a TheHive node that creates a case from the enrichment output, mapping title, description, severity and tags from the enriched data. Keep the tag scheme consistent with your MISP taxonomy so that cases can be filtered later. Run the workflow with a test indicator and then check TheHive directly. Done means a new case appears in TheHive with the expected title, the severity you set, and the tags produced by the workflow. If tags are missing, check the mapping expression before changing the TheHive permissions.
Notify analysts and confirm the full path
Add a notification node, such as a chat or email node, that posts the case identifier, a link to the case and the key enrichment fields to the analyst channel your team monitors. Confirm the destination channel with the people who will act on it. Then run the complete workflow end to end on a test indicator, once with a known match and once with an unknown one. Done means the analyst channel receives one message for each run with the correct case reference, and the unknown indicator produces the agreed no-match behavior rather than an error. Activate the workflow only after both runs pass.
How indicators flow from MISP into TheHive cases
The core decision in this flow is which system owns each judgment. An alert or indicator enters n8n through a trigger, such as a SIEM webhook or a scheduled poll, and n8n then queries MISP for matching attributes, correlated events and galaxy context. The MISP steps return the evidence, but n8n does not decide what correlates or who may see it. Correlation behavior, the distribution level of each event and attribute, and sharing groups are all configured in MISP itself, so the analyst should check those settings there before trusting the automated result. Once the lookup returns, n8n writes a case or observable into TheHive and posts a summary to the analyst channel.
Trust boundaries sit in three places. First, credentials: the MISP API key and the TheHive credential are stored in n8n, so the team must decide which n8n project and which roles can open those credentials, and whether the keys are scoped to the minimum needed. Second, the distribution level of returned data: an event shared at a wide level can carry material that should not be copied into a case visible to a broader group, so the workflow should compare the returned distribution with the TheHive case audience before writing. Third, case visibility: TheHive controls who can read the case, and n8n will create it under whatever account it uses, so that account's permissions define the audience.
Before go-live, confirm with the MISP and TheHive administrators which distribution levels the integration account may read, which fields it copies into cases, and who receives analyst channel messages. Run the workflow against a test event with a known distribution level and check that the case appears only for the intended group. Record these checks, since they are the evidence that the boundary was designed rather than assumed.
How MISP attributes, events and galaxies map to TheHive observables and cases
This table compares the MISP fields analysts rely on with the TheHive field each one should populate, and who decides the mapping. Read the third column first: custom expressions are logic you build and test in n8n, while SOC agreements are naming and visibility decisions to settle before the first workflow runs. The main takeaway is that attribute and event fields map mechanically, but distribution and galaxy handling need an explicit SOC decision.
| MISP field | TheHive target | How to map |
|---|---|---|
| Attribute type (ip-dst, domain, sha256, url) | Observable data type | Custom expression: lookup table from MISP types to TheHive observable names, confirmed against your TheHive version |
| Attribute category (network activity, payload delivery) | Observable or case description context | Agree with SOC which categories become observables and which stay as context |
| Event info | Case title | Custom expression: prefix with the MISP event ID and trim length. Agree the naming pattern with SOC |
| Event tags (for example, TLP and PAP tags) | Case tags | Agree with SOC which tag namespaces copy over. Custom expression to filter the rest |
| To IDS flag and attribute comment | Observable IOC flag and observable description | Custom expression. Confirm how your TheHive version stores the IOC flag |
| Distribution level and sharing group | Case visibility through organization or profile access | Agree with SOC. No direct one-to-one match, so decide which distributions open cases at all |
| Galaxy clusters (MITRE ATT&CK, threat actors, malware) | Case description or custom fields | Custom expression to extract cluster names. Agree field names with SOC before building |
| Taxonomy tags (for example, admiralty-scale) | Case or observable tags | Agree with SOC on namespace and tag spelling so analysts can filter consistently |
Securing the MISP and TheHive automation
An n8n workflow that touches MISP and TheHive holds API keys for both systems, copies of indicators and case data, and the power to write back to them. The six controls below cover credentials, transport, access to the workflows themselves, external enrichment and audit, so the automation does not become the weakest path into your threat intelligence.
Dedicated low-privilege API keys
Create a separate MISP key and a separate TheHive key for each n8n integration, instead of reusing an administrator's personal key. Scope each one to the actions the workflow performs: reading events and attributes for enrichment, or creating cases and observables in TheHive. Check which roles and organizations each key inherits in both products, since a key tied to a broad MISP role can read distribution levels the workflow never needs. Rotate keys on a schedule you can name, and revoke them when the analyst who requested the integration leaves.
Credential encryption and queue mode key sharing
n8n encrypts stored credentials with its encryption key, so the MISP and TheHive secrets are only as protected as that key. In queue mode, every worker and webhook processor must hold the same encryption key to read those credentials, which spreads the secret across more hosts. Record where the key lives, who can read it, and what happens to stored credentials if it changes. Treat a key copy on a worker as a copy of every saved security tool credential in the instance.
n8n queue mode docsRestricting who edits analyst workflows
A workflow that enriches indicators or opens cases can be changed to send analyst data somewhere else, so edit rights matter as much as run rights. Limit editing of workflows that hold MISP or TheHive credentials to a small named group, and keep analysts on read or execute access where their role allows it. Review shared credentials so that a broad project membership does not expose the MISP key to people who only need to receive alerts. Confirm how your n8n edition handles roles and projects before you depend on them.
TLS verification to MISP and TheHive
Both connections carry indicators, case content and API keys, so they should use HTTPS with certificate validation enabled in the n8n HTTP-based nodes and credentials. Disabling verification to get a test environment working is a common reason these integrations are later found to accept any certificate. Use your internal certificate authority where the products sit behind it, and confirm that the n8n host trusts that chain. Test the failure case too: a workflow should stop when a certificate is invalid rather than continue with unverified data.
Execution logging for audit
Analysts and auditors will ask which workflow read a MISP event, which enrichment service received an indicator and which case was opened from an alert. Keep n8n execution records long enough to answer those questions, and forward logs from the n8n host and reverse proxy to your central logging platform. Confirm whether your edition supports log streaming, since n8n lists it among features limited to its higher-priced plans. Record the workflow version alongside each execution so a later change can be traced.
Keeping distribution-restricted data out of enrichment services
MISP events carry distribution levels and sharing groups that limit who may see an indicator. An enrichment step that sends a restricted indicator, or a whole event, to a public lookup service can disclose that information outside the community it was shared with. Map each MISP enrichment target to the distribution levels it may receive, and send only the indicator value where possible. Ask each third-party service how it stores and reuses submitted queries before adding it to a workflow.
Common failures when n8n calls MISP and TheHive
This table lists the failures teams hit most often when n8n workflows call MISP and TheHive, with the usual cause and fix for each. Read it as a checklist to run through when an enrichment or case step fails, starting with authentication and data visibility before touching workflow logic.
| Failure | Likely cause | Fix |
|---|---|---|
| Authentication rejected (401 or 403) | API key expired, rotated, copied with whitespace, or belongs to a user without the needed role in MISP or TheHive | Generate a new key for a dedicated automation user with the least role needed, store it in n8n credentials, and test the credential before running the workflow |
| Expected MISP attributes missing from results | The automation user's organization or sharing group cannot see the events, or distribution levels hide attributes from that user | Confirm with the MISP administrator which distribution levels and sharing groups the automation user can read, then adjust access or query scope |
| TLS certificate trust error | MISP or TheHive uses a certificate issued by a private certificate authority that the n8n host does not trust | Install the internal CA certificate on the n8n host and in the container image, or set the trusted certificate path in the n8n environment, and do not disable verification |
| TheHive case creation rejected | The payload omits required fields such as title, description, severity, or tlp values expected by the TheHive version in use | Map every required field in the HTTP or TheHive node, validate the payload against the TheHive API documentation for your version, and add an error branch that logs the rejected body |
| Duplicate cases after retries | A failed or timed-out execution is retried, or a webhook is delivered twice, and the case step has no idempotency check | Store a stable reference such as the MISP event UUID or alert ID, search TheHive for it before creating a case, and only create the case when no match exists |
| Timeouts or rate errors on large MISP searches | Broad restSearch queries return very large result sets, or many executions query MISP at the same time | Narrow searches by type, date, tag and distribution, paginate results, limit concurrency in n8n, and confirm any rate limits with the MISP administrator |
| Node behavior changes after a MISP or TheHive upgrade | A new version changes API responses, field names or deprecates endpoints that the workflow relies on | Read the release notes before upgrading, test enrichment and case workflows in a staging instance, and pin the n8n node or HTTP request paths you have verified |
| Workflow fails after an n8n upgrade | A node version or credential type changed between n8n releases, so saved workflows reference an outdated configuration | Review n8n release notes for node changes, re-test MISP and TheHive steps after the upgrade, and keep a rollback copy of the workflow export |
When a dedicated SOAR tool fits better than n8n
A small team with a handful of enrichment and notification flows is the situation where n8n tends to fit well. The work is mostly calling MISP for indicator lookups, posting results to chat, and creating a ticket when a known pattern appears. n8n's visual canvas, large integration catalog and general-purpose code steps let one or two engineers build and maintain these flows without learning a security-specific data model. The main questions are whether the flows stay small enough to read in one screen and whether the same person can answer for them during an incident.
- Flow count: A few flows that each run in a few steps are easy to review and rarely need formal versioning.
- Analyst actions: Analysts mostly read results rather than click through case states or approve each step.
- Ownership: One or two maintainers can cover the workflows, the credentials and the upgrades.
- Integration reach: Most of the systems you touch already have n8n nodes or a simple HTTP Request pattern.
- Licensing: Confirm that your internal use fits the Sustainable Use License before you rely on n8n in production.
Before committing, check whether your flows will still be readable and supportable in a year, and who on the team would carry the on-call responsibility for them.
A security operations center that needs case management, approvals, playbook versioning and many analyst-driven actions usually reaches the limit of a workflow tool built for general automation. A dedicated SOAR platform typically models cases, tasks, assignees and audit history as first-class objects, and it lets analysts trigger actions from the case itself. Shuffle is one example of this category. It is licensed under AGPL-3.0 and has its own app model, runtime and deployment architecture, so it should be evaluated on its own terms rather than assumed to behave like n8n.
- Case lifecycle: Analysts need to open, reassign, escalate and close cases with a record of who did what.
- Playbook governance: Versioned playbooks, reviews and rollback matter when many analysts depend on the same actions.
- Analyst-driven actions: Buttons, approvals and manual steps inside an investigation are a core requirement.
- Runtime model: Shuffle runs apps as containers and uses its own backend and OpenSearch store, which changes the operating model.
- Evaluation scope: Test Shuffle separately for its apps, secrets handling, SSO and high availability requirements.
Before choosing, list your daily case actions and ask each candidate platform to demonstrate them end to end on your own data.
A team that already runs a SIEM with its own SOAR features may find that a second automation layer adds more overlap than value. Case creation, alert triage and some enrichment may already live in that platform, and adding n8n or a separate SOAR tool can split investigations across two consoles. In this situation the useful question is which steps the existing platform handles well and which gaps need an external workflow tool, such as calling MISP or TheHive for sharing and case records that the SIEM does not manage.
- Existing coverage: Map the response steps your SIEM already performs before adding anything new.
- Gap analysis: Identify the specific integrations, such as MISP sharing or TheHive cases, that the SIEM does not cover.
- Console sprawl: Each additional tool adds a place analysts must check and a set of credentials to protect.
- Vendor features: Confirm what the SIEM's built-in response features support, including licensing and any cost tied to them.
- Data path: Decide whether alerts should flow through the SIEM first or directly into the workflow tool.
Ask the SIEM vendor to show which of your planned actions it supports natively before you build them somewhere else.
Questions buyers ask before connecting n8n to MISP and TheHive
What drives the effort and cost of connecting n8n to MISP and TheHive?
The main drivers are the number of workflows, how many enrichment sources each indicator passes through, how cases are structured in TheHive, and how much error handling and audit trail the analysts require. Each workflow needs its own design, credential setup, testing against real alert shapes and handover to the team that will run it. Ask any provider for a quote that lists the workflows by name, the MISP and TheHive versions in scope, the hosting environment (n8n, MISP and TheHive each in your infrastructure or not) and whether the work is one-time build, ongoing support, or both. Recurring cost usually comes from upgrades and changes to the playbooks, not from the first build.
Can our own team build n8n workflows for MISP and TheHive without outside help?
A team that already runs n8n, understands MISP events and attributes, and knows how TheHive models cases and observables can build simple enrichment and notification workflows internally. The harder parts are credential handling, error paths, idempotent case creation and testing against sample data that resembles production alerts. Before deciding, check whether your engineers have run n8n in production with queue mode and encryption key management, and whether anyone owns the workflows after the first release. Outside help is most useful when the workflows must be reviewed by a compliance or security function, or when several analyst teams depend on them.
What do our MISP and TheHive administrators need to provide?
Administrators need to create dedicated API users with the narrowest role that lets n8n read events, add attributes, or create and update cases, and they need to confirm which sharing groups and distribution levels the automation may use. TheHive administrators should provide an organization and profile for the integration, and agree on which case templates and observable types the workflows may set. Both teams should confirm network paths from the n8n workers to each API, certificate trust, and who rotates the API keys. Ask them to review the workflows before go-live, because a misconfigured distribution level can publish data more widely than intended.
How long does testing take, and how does it change with the number of workflows?
Testing time grows with the number of workflows, the number of alert types each one handles, and the number of systems it touches. Each workflow needs happy-path tests, failure tests (MISP or TheHive unavailable, malformed input, duplicate alerts) and a review of what gets written to each platform. Plan a separate test instance of MISP and TheHive so that no test data reaches production sharing groups. The project plan should list test cases per workflow and the acceptance criteria your SOC signs off, rather than a single calendar estimate. Ask any provider to state how testing is scoped and who verifies results.
Does n8n's Sustainable Use License allow us to use it for this internal security work?
The Sustainable Use License allows use or modification for your own internal business purposes, so running n8n to automate your own security operations generally fits that grant. It does not permit distributing the software free of charge for commercial purposes, and it does not make n8n OSI open source. Files with .ee in their name or directory need a valid n8n Enterprise License. Features such as SSO and LDAP, environments with Git and log streaming are included only in the Business and Enterprise plans on n8n's pricing page. Confirm the edition you need with your legal team and n8n, and do not assume that a community deployment covers every feature you plan to use. Your counsel should review the license text directly.
What changes when MISP or TheHive is upgraded?
An upgrade can change API behavior, field names, database schema and the way events or cases are stored, so each workflow must be retested after every platform upgrade. MISP 2.4 is end of life with security fixes only, and the project recommends MISP 2.5 for new deployments, so an older instance should be planned for migration before the automation is built. Keep the n8n nodes, credentials and workflow versions under change control, and test against a staging copy of MISP or TheHive first. Confirm with your MISP and TheHive vendors or project which API versions the nodes you use support, and schedule the upgrade of n8n itself alongside those tests.
Is a dedicated SOAR tool a better choice than n8n for this work?
A dedicated SOAR tool fits better when you need built-in case management, analyst approval steps across many playbooks, and vendor support for the security stack around them. n8n fits well when the team already runs it, needs lightweight enrichment and notification across many business systems, and accepts that security logic must be engineered and reviewed carefully. Shuffle is another open-source SOAR option with its own licensing model, and it is worth comparing on the same test cases before choosing. Compare the two on the workflows you actually need, the number of analysts, audit requirements and who will maintain the integrations.
How n8n sits between MISP, TheHive and analysts
The flow starts when an alert reaches an n8n webhook inside the client network. The workflow pulls the stored API keys for MISP and TheHive from n8n's credential store, then queries the MISP API to enrich the indicators in the alert. It then calls the TheHive API to open a case and posts a summary to the analyst chat channel. Check that the credential store, the encryption key and the network paths to MISP and TheHive stay inside the trust boundary, and confirm which hops cross it.
Trust boundary, workflow steps and the systems each step calls.
How DeployOpen scopes and delivers this integration
DeployOpen is a Chainscore Labs company that plans, implements, hardens, documents and supports self-hosted open-source platforms inside your own infrastructure. For n8n security automation with MISP and TheHive, we start by agreeing which enrichment, case and notification steps belong in n8n and which belong in a dedicated SOAR tool, then build and test that scope in your environment.
How we scope
- Inventory the MISP and TheHive versions, APIs, API keys and network paths your analysts already use
- Agree which enrichment, case creation and analyst notification workflows are in scope for n8n
- Record in writing the SOAR boundary, data handling rules and any workflows that stay out of n8n
How we build
- Deploy n8n with the database, encryption key and credential storage settings planned before workflows are built
- Build and test MISP lookup, TheHive case and notification workflows against non-production data first
- Validate error handling, retries and credential scopes for each workflow, including failed MISP or TheHive calls
How we hand over
- Deliver written workflow documentation covering triggers, inputs, outputs, credentials and owners
- Document the encryption key, backup and upgrade procedures so your team can run the instance
- Walk your analysts and platform engineers through the runbook and the escalation path for failed runs
How we support
- Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts
- Ongoing support, upgrades and continuous testing are available as a retainer after handover
- Confirm the n8n license terms, edition features and any Enterprise requirements with us before scoping

