Writing custom OpenCTI notifier templates

Custom OpenCTI notifier templates shape trigger data into the payload a chat, ticketing or SOAR webhook expects. This page covers the variables, the EJS template structure, the function allowlist and the checks to run before go-live.

On this page

Why teams write custom OpenCTI notifier templates

A security team wants OpenCTI triggers to reach the chat, ticketing or SOAR tool it already runs, but the default notification output does not match what the receiving system expects. A notifier template closes that gap. It defines the body of the message OpenCTI sends when a trigger fires, so a chat channel, a ticket queue or a SOAR webhook receives fields and formatting it can parse and act on. Teams commonly target chat channels for analyst awareness, ticketing systems for case creation, and SOAR webhooks that start a playbook. The template is written in EJS, a JavaScript templating syntax, and it is rendered by the platform before the message is delivered.

The variables a template can reference and the functions it may call are tied to the OpenCTI release you run. The function allowlist was extended in 6.4.11, but the exact set of variables and permitted functions for your version must come from the release notes for that version, not from older examples or from this page. Before you design templates, confirm the available variables for each trigger type, check whether your destination needs a specific payload shape, and record the release you tested against. Templates that worked on one release can fail silently after an upgrade if a variable is renamed or a function is removed.

Treat the template as part of your change process, not a one-time setting. Each destination needs a sample payload, a test trigger, and a named owner who will review changes when the OpenCTI release or the receiving tool changes. Ask whoever runs your OpenCTI platform which notifier types are enabled, whether notifiers are managed through the user interface or configuration, and who can edit them. Also check that templates do not expose sensitive intelligence or credentials to channels with wider membership than the source data allows. Confirming these points early makes the later build and testing work far more predictable.

How an OpenCTI trigger becomes a rendered webhook message

The flow starts when an OpenCTI trigger matches an event, and the notifier loads the EJS template configured for that trigger. The template receives the trigger variables and renders the message body, which is then sent as a request to the external webhook endpoint. The receiving tool returns a response that tells you whether delivery succeeded. The trust boundary sits where the rendered payload leaves the OpenCTI platform, so check what data each template exposes before it crosses that line.

Trigger-to-webhook flow, with the trust boundary around the OpenCTI platform.

Which template design fits chat, ticketing and SOAR destinations

This table compares chat, ticketing and SOAR destinations for OpenCTI notifier templates across payload shape, typical content, error handling and maintenance ownership. Read each row as a design constraint: the destination type sets how much structure the template must produce and how much tolerance it has for failed deliveries. Confirm each receiving system's payload contract and authentication method in your own environment before you write the template.

Design factorChat webhookTicketing webhookSOAR webhook
Payload shapeShort text body, often a single message fieldStructured fields mapped to ticket attributes such as title, priority and labelsMachine-readable object that downstream playbook steps parse
Typical contentTrigger name, entity name, a link back to OpenCTIEntity type, severity, affected asset, assignment hints and a summaryFull indicator or entity identifiers, STIX type, markings and trigger context
Template precision neededLow: readable wording matters more than exact field orderMedium: field names and value types must match the ticket APIHigh: a missing or renamed key can stop a playbook step silently
Retry and error handlingUsually tolerant of a dropped or duplicated message; confirm the receiver's rate limitsConfirm whether the ticket system deduplicates repeated requests before enabling retriesConfirm how failed deliveries surface and whether the playbook can replay them safely
Authentication to confirmWebhook URL secret or token scoped to one channelService account or API token with rights limited to ticket creationSigned or token-based credentials; confirm the SOAR platform's accepted scheme
Who maintains the templateUsually the operations or threat intelligence team that owns the channelService desk or security operations, with changes reviewed against ticket fieldsDetection engineering or SOAR owners, tested alongside the playbooks they feed
Change riskCosmetic changes are low riskRenamed fields can break ticket creation without an obvious error in OpenCTIAny payload change needs a test run against the playbook before release

How chat, ticketing and SOAR payloads differ in practice

Chat receivers are built for people scanning a channel, so the template should emit a short, human-readable summary: what changed, which object changed, and where to look next. The receiver usually accepts a single text block or a small set of fields, and long payloads get truncated or buried in a busy channel. Keep the template focused on the notification itself and leave full detail to a link back to the OpenCTI platform.

  • Lead with the event: Put the trigger type and the entity name in the first line so the message is readable in a channel preview.
  • Include one link: Add a single link to the affected object in the platform rather than copying its full content into the message.
  • Limit list fields: Cap lists such as labels or related objects to a few items and state how many were omitted.
  • Avoid raw dumps: Do not serialize the whole trigger object, since it adds noise and may expose fields the channel audience should not see.
  • Test with a real channel: Confirm line breaks and markup render as expected in the specific chat product your team uses.

Check that the message stays readable when several notifications arrive within a minute, and confirm the chat product's message size limit with its documentation or your own environment.

Which trigger variables a template can read

A notifier template only as useful as the data it reads. The variables fall into a few groups that together describe what fired, what it touched, and who should see it, so each group changes the message in a different way. Check each group against the variable reference for your release before you write the template.

Trigger and event identity

These variables identify the notifier that fired and the event that caused it, such as the event type, the trigger name and the event identifier. They decide whether a message reads as a new creation, an update or a deletion, and they give the receiving system a stable key for deduplication. Check that the event type you test against matches what your release emits for create, update and delete actions, because a template that only handles one type will silently drop the others.

Enterprise Edition docs

Affected entity type and name

These variables name the STIX entity that changed, such as an indicator, report, malware or threat actor, and its display name. The type drives routing in a chat channel or ticket queue, and the name is what an analyst searches for first. Confirm how names appear for observables, which often carry a value rather than a name, so your template does not print an empty title.

Markings and organization context

Markings show the handling restrictions on an entity, and organization context shows which team owns or created it. Include them in the message only when the destination is cleared for that marking level, because a chat webhook may reach people who are not allowed to see restricted intelligence. Test with an entity carrying a restrictive marking and confirm what the template renders.

Timestamps

Timestamps record when the entity was created, modified or first observed, and they affect how a message is ordered and triaged. Confirm which timestamp fields the release exposes and in which time zone they render, since a ticket opened at the wrong hour looks like a missed alert. Format them in the template rather than relying on the raw value.

Linked references

Linked references point to related entities, such as the reports, campaigns or external references attached to the changed object. They add context to a ticket, but they can expand into long lists or pull in entities the reader may not be allowed to see. Limit how many relations the template prints, and confirm how the release represents them in the variable set.

Exact variable names for your release

The variable names used in this guide come from no single reference, so the names in your template must come from the notifier documentation for the OpenCTI release you run. Copy names into a list, mark each one as present or missing in a test event, and rebuild the list after every upgrade. A renamed variable usually renders as blank text instead of an error, so the list is your main check.

Product life cycle docs

Structuring the EJS body and handling missing fields

An EJS notifier template is a block of static text, such as the JSON skeleton a chat or ticketing webhook expects, with embedded expressions that are replaced by values from the OpenCTI trigger event at send time. Keep the static skeleton as the fixed shape of the payload and limit the expressions to the places where a value changes. Every value that comes from the event, including entity names, labels, descriptions and external references, must be treated as untrusted text. Because a notification can fire for an entity that lacks a field you assumed was present, the template must guard optional values before using them. Use conditional tags to check that a value exists and fall back to a default string or to an empty array, so a missing field produces a readable message instead of an exception that drops the whole notification. Confirm in your own environment how the notifier handles a template render error, because that behavior determines whether a missing field fails silently or appears in the platform logs.

Escaping is the most common reason a template that looks correct produces broken output. A description that contains a double quote, a backslash or a line break will end the JSON string early if it is inserted raw into the body. Apply the escaping function that your EJS setup provides for JSON string contexts to every free-text variable, and keep expressions out of positions where the surrounding quotes are not yours to control. Name variables and helper logic in a consistent way, put any repeated guard logic at the top of the template, and add short comments that say which receiver the payload is built for. Those choices matter to whoever maintains the template after the original author has moved on, and they make the next change easier to review. Document the expected payload shape next to the template so the receiver owner can check it.

A template that renders invalid JSON can fail silently at the receiver. Many chat and ticketing endpoints return an error that the notifier may not surface in the OpenCTI interface, so an alert can simply never arrive. For that reason, the test plan must check the rendered output, not only whether the template compiles. Use a fixed set of test events that includes a fully populated entity, an entity with missing optional fields, and a description containing quotes, backslashes and newlines. Parse each rendered body with a JSON parser and compare the parsed fields with what the test event should produce. Then send the payload to a non-production receiver and confirm the received message. Repeat this check after each OpenCTI upgrade, because the variables supplied to templates can change between releases, and record which platform version each test run used. Ask your OpenCTI administrator to confirm where render and delivery errors are recorded in your version.

Setting up a notifier template from trigger to tested webhook

This sequence takes a notifier template from a confirmed OpenCTI release to a production trigger that posts to a chat, ticketing or SOAR webhook. Each step ends with a check, so the team knows the template renders correctly and the receiver handles it before real intelligence reaches the endpoint.

  1. Confirm release and notifier feature availability

    Check the OpenCTI version your platform runs against the release and life cycle documentation, and confirm that notifiers and the EJS template options you plan to use are present in that release. OpenCTI uses date-based versions, so record the exact version string, including any LTS suffix, in the change record. Confirm the exact configuration screens and settings in the target release before building anything, because the menu paths and template options can change between versions. Done when the team has a written note of the version, the notifier capability and the function allowlist behavior for that release.

  2. Define the receiver payload and authentication

    Ask the owner of the chat, ticketing or SOAR endpoint to document the JSON fields it expects, required and optional values, maximum message sizes, the content type, and how it authenticates requests, such as a shared secret header or an allowlisted source address. Store any secret in the platform's secret handling, not in the template body. Done when the payload contract and authentication method are written down and the receiver owner has agreed to them in writing.

  3. Create a test trigger on non-production data

    Create a trigger scoped to a test marking, a sandbox data set or a test organization so that only non-production intelligence fires it. Choose the event types you need, such as creation or update of a selected entity type, and keep the filter narrow. Confirm in the target release which trigger filters and scopes are available. Done when the trigger exists, is set to inactive or limited to test data, and a manually created test object is confirmed to match its filter.

  4. Write the EJS template

    Write the template against the variables documented for the release, mapping only the fields the receiver's contract requires. Use only functions that appear on the allowlist for your version, and keep logic simple so rendering is predictable. Escape or sanitize free-text fields such as descriptions and labels that may contain characters the receiver treats as markup. Keep the template and its version in source control. Done when the template is saved in the test configuration and the team has reviewed it against the payload contract.

  5. Render the template against sample trigger data

    Render the template with sample trigger data that includes typical and edge-case values, such as missing optional fields, long text, special characters and multiple related objects. Compare the rendered output to the receiver's contract, checking valid JSON, field names and types. Illustrative example: a missing optional field should produce the value the receiver expects, not an empty string that breaks its parser. Done when every sample renders to valid output that matches the contract, and failures are fixed and re-rendered.

  6. Send to a test endpoint and inspect the receiver

    Point the test trigger at a non-production endpoint or a request inspection tool and fire it with the sample data. Confirm the request method, headers, authentication and body arrive as designed. Then send deliberately malformed or unauthorized requests to the receiver to confirm it rejects them with the expected error responses. Done when the receiver logs a correct parse of the test message, rejects bad input with the documented status codes, and the platform's own logs show the notification attempt and any failure.

  7. Verify receiver parsing and error handling

    Review how the platform reports delivery failures, such as receiver timeouts or error status codes, and confirm the behavior in the target release. Decide who is alerted when deliveries fail and how retries or duplicate messages are handled by the receiver. Run the test trigger through a short sequence of changes to confirm that repeated events do not flood the endpoint. Done when the team has a signed-off record of successful parses, expected error responses, failure visibility and the duplicate-handling behavior.

  8. Enable the production trigger with a named owner

    Point the production trigger at the production endpoint, narrow its filter to the intended data, and assign one named owner who is accountable for the template, the trigger and the receiver contract. Record the template version, the release, the receiver owner and the review date in the change record. Enable the trigger and watch the first real deliveries against the receiver logs and the platform's notification history. Done when the first production deliveries parse correctly, the owner has acknowledged responsibility, and a rollback step to disable the trigger is documented.

How the function allowlist limits what templates can call

The function allowlist sets the boundary for what a notifier template may call when it renders. Any function that is not on the list is unavailable to the template, so an author cannot use a template to run arbitrary logic on the platform. For a notifier that formats a message and posts it to a chat, ticketing or SOAR webhook, this keeps the template to presentation work: reading the variables OpenCTI passes in, shaping text and sending the result. Treat the allowlist as a control you rely on, not as a convenience feature, and confirm its exact contents in the release notes for your version before you write anything that depends on it.

The control matters most when administrators let a wider group edit templates, such as analysts, detection engineers or a platform team that is not the security administrators. Once more people can change a template, a reviewer can no longer assume that every call inside it is harmless. Before you widen edit access, decide who approves template changes, keep templates in version control where your process allows it, and write down which functions your team expects templates to use. The allowlist narrows the risk, but it does not replace a review step.

A template that depends on a function outside the list fails when it renders, so the notification it was meant to send does not arrive. Because a missed alert is often discovered only when a response team notices silence, the failure can stay hidden for some time. After a platform upgrade, the list can change, so retest every template against a non-production instance using representative triggers, and confirm the function list in the OpenCTI releases page for the version you are moving to. Record which release introduced the allowlist and which functions it permits in your own runbook, since the answer determines how much of your existing template library you need to check.

Security risks in notifier templates and webhook delivery

A notifier template is code that runs against live threat intelligence and sends it to a system outside the platform. The cards below cover the places where that path can leak data, expose credentials or break trust, and the controls and checks to apply to each before a template reaches production.

Limit who can create and edit templates

Template editing is effectively code execution inside the notification path, so the people who can change a template can also change where data goes. Restrict template authoring to a small named group, keep notifier configuration out of general analyst roles, and review changes the same way you review application code. Confirm in your environment which OpenCTI roles and capabilities can open notifier settings and whether your Community or Enterprise deployment exposes an audit trail of those edits.

Keep webhook URLs and tokens out of templates

Chat, ticketing and SOAR webhook URLs often embed a secret that grants posting rights to a channel or queue. Store these values in the platform's notifier configuration rather than hard-coding them in template bodies, and rotate them when staff who knew them leave. Confirm where your installation keeps notifier configuration, who can read it through the API, and whether any copy ends up in exported settings or backups.

Check what leaves the platform

A notification payload can carry indicator values, report names, descriptions and marking labels that were never meant for a chat channel or an outside ticketing tenant. Map each variable a template uses to the marking it inherits, and decide which markings may leave the platform at all. Confirm that the destination is cleared for the most sensitive marking your trigger can match, and test with a restricted sample entity before enabling the notifier.

Escape trigger data in messages

Trigger data such as entity names, descriptions and labels is written by analysts, feeds and connectors, and some of it originates from third-party sources you do not control. If a template inserts that text into markup, a receiving system may interpret it as formatting, links or commands. Escape or restrict output for each target format, and test with entity names containing markdown, HTML and quote characters before you rely on the template.

Limit trust in the receiving system

A webhook receiver can be misconfigured, shared with other teams or compromised, and it may store everything it receives. Treat the destination as a separate trust zone: confirm who administers it, which of its users can see notification content, and how long it retains messages. Prefer destinations that accept a dedicated, narrowly scoped integration identity, and send only the fields the receiving workflow needs.

Log what was sent and when

When an alert reaches the wrong channel or a sensitive field appears in a ticket, you need to know which template and trigger produced it. Keep a record of template versions, trigger matches and delivery outcomes, and set a retention period that your investigation and privacy obligations require. Confirm whether your OpenCTI edition provides activity logs for notifier actions, and if it does not, decide where delivery records will be kept and who can read them.

Questions teams ask before writing notifier templates

Can our platform team write OpenCTI notifier templates without outside help?

Yes, in most teams that already run OpenCTI and can read EJS and the webhook documentation of their receiving tools. The skill is ordinary templating, but the hard part is the contract with each receiver: the exact JSON or form fields a chat channel, ticket queue or SOAR playbook expects, how errors come back, and who answers when a message fails. A team with one simple destination and a named owner on the receiving side can often do this internally. Teams with several destinations, strict payload schemas or no time for testing usually weigh a partner, because the work is less about syntax and more about repeatable verification.

What makes a notifier template take more or less effort?

Four factors drive most of the effort:

  • The number of destinations, since each one needs its own payload shape, authentication and error handling.
  • Payload complexity, such as nested STIX entities, conditional sections or attachments.
  • Receiver contracts, meaning how stable the receiving API is and how well its owners document it.
  • Testing and upgrade maintenance, which covers replaying sample triggers, checking rendered output and re-checking templates when OpenCTI or the receiver changes.

A single template for one chat channel is a small task. A set of templates covering ticketing and SOAR with tested failure paths is a larger one. Ask any quote to break the work down by these factors.

What do we need to provide before the work starts?

The work depends on decisions only your organization can make. Expect to provide:

  • A named owner for each receiving system who can confirm payload fields and error behavior.
  • Test endpoints or sandbox channels, so templates can be sent without paging a live queue.
  • Representative sample data for each trigger type, reviewed for sensitive content.
  • A change approval path for moving templates from test to production.

Without these, the template is usually built against assumptions and fails on the first real alert. Confirm in the quote who is responsible for providing each item and how long reviews are expected to take.

How long does one template take to build and test?

No general duration can be stated responsibly, because it depends on the destination, the payload and how quickly the receiving owner answers questions. A single template to a well-documented endpoint with a test channel is typically a short, contained task, while a template with conditional logic, several trigger types and failure handling takes longer to verify. Ask for the effort split between design, build, testing against sample triggers, and handover, and confirm which review cycles are included. Timelines in a written scope should name the dependencies, especially receiver owner availability.

Do notifier templates keep working after an OpenCTI upgrade?

They often do, but they should not be assumed to. Templates depend on the variables and functions available in the platform version running them, so a platform upgrade can change what a template receives. Recent OpenCTI releases also added a function allowlist for templates, which can block functions a template used before. Keep templates in version control, replay sample triggers in a test environment after each upgrade, and check the release notes for the version you are moving to. Confirm with the vendor which variables are stable across the LTS line you run.

Should templates be tested against live receivers?

Test against a sandbox or test endpoint first, then run a controlled trigger against production with the receiving owner watching. Live testing without a sandbox risks noisy tickets, duplicate pages and data leaving the boundary you intended. Agree in advance what a successful test looks like, including the rendered message, the response code and what the receiver should show. Record the results, because your security or compliance team may ask how notification content was checked.

What does a DeployOpen engagement cover for notifier templates?

DeployOpen works in your infrastructure and under a written scope agreed before work starts. Typical scope items are the template design for each destination, build and testing against sample triggers, documentation of variables and receiver contracts, and handover to your team. Ongoing upgrade checks and retesting can be arranged as a retainer. DeployOpen does not publish a price list, so ask for a quote that lists each destination, each trigger type, the testing and handover steps, and which items depend on your team or the receiver owners.

Limits to confirm for your OpenCTI version and environment

Notifier templates depend on the edition, release line, and network your OpenCTI platform runs in, so each limit below should be confirmed before the template is written. The cards cover the features, variables, lifecycle, delivery behavior, network rules and receiver limits that most often change a working template into a broken one.

Notifier and template availability

Confirm that notifiers and EJS template support are included in the edition and license you run, since the Community and Enterprise Edition feature sets differ. Enterprise Edition is proprietary and licensed separately from the Apache 2.0 Community Edition. Ask your Filigran contact or check the Enterprise Edition documentation before you plan around a feature that may sit behind a license key.

Enterprise Edition docs

Variable set and function allowlist

Template variables and the functions an EJS template may call are tied to the exact release. Read the notifier documentation for your version and list every variable your template reads, including nested entity fields that may be empty for some trigger types. Test each allowlisted function on your release, because a function available in one version may be absent or restricted in another.

Release line and LTS support

Regular releases ship when ready, while LTS releases are supported for one year and receive only critical bug and security fixes after a one-month stabilization period. A template that depends on a recent variable or function may break when you move between lines. Choose the release line first, then write templates against that line's documented behavior and re-test after each upgrade.

Product life cycle docs

Retries and failed deliveries

Confirm how your version retries a failed webhook call, how many attempts it makes, how long it waits between them, and whether a permanently failing delivery is dropped or queued. A template that renders correctly can still lose alerts if the receiver returns errors. Check the platform logs and queue behavior during a controlled failure test, and decide who owns the alert gap if delivery stops.

Outbound network rules

Webhook endpoints must be reachable from the OpenCTI platform container or host. In air-gapped or restricted networks, confirm the egress path, proxy settings, DNS resolution and TLS trust chain for each chat, ticketing or SOAR endpoint before rollout. Allow only the specific destinations required, and record them so a firewall change does not silently stop notifications.

Receiver rate limits and payload size

Chat, ticketing and SOAR platforms each enforce request rates, payload size limits and concurrency rules. A burst of triggers from a bulk import can exceed those limits and drop messages or open duplicate tickets. Ask each receiving system's administrator for its documented limits, test the template against a realistic trigger volume, and decide whether to batch, filter or deduplicate before the webhook call.

How DeployOpen scopes and delivers notifier templates

DeployOpen approaches custom OpenCTI notifier templates as a scoped build inside your own infrastructure. We agree which triggers, destinations and template variables are in play, build and test the EJS templates against your OpenCTI version, and hand over the templates with documentation your team can maintain. Engagements are fixed-scope, with ongoing support available as a retainer.

How we scope

  • Inventory the notification triggers and the chat, ticketing or SOAR webhooks each one must reach
  • Confirm the OpenCTI version in use, since available template variables and helper functions depend on it
  • Record the written scope, deliverables and timeline for the templates before any build work starts

How we build

  • Write EJS templates per destination, mapping OpenCTI fields into each webhook payload format
  • Restrict template helpers to the function allowlist and keep logic that needs more than that outside the template
  • Test each template against sample trigger events in a non-production instance before enabling it

How we hand over

  • Deliver the template files with a mapping of each variable to its source field and destination
  • Document how to add a trigger, change a destination and roll back a template to its previous version
  • Walk your operations team through testing, error handling and the checks to run after each OpenCTI upgrade

How we support

  • Review template behavior after OpenCTI upgrades, including changes to variables or the function allowlist
  • Offer ongoing support and continuous testing for templates as a retainer agreed in writing
  • Confirm with your team which notifications, credentials and webhook endpoints remain in your ownership

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.