You are reading the documentation of OpenCTI 7.260309 LTS · 7.260309.0-lts.8, supported until 2027-04.Latest is 7.261119.0 →
How-to guide

Customize the emails OpenCTI sends

Write email templates for administrative messages to OpenCTI users, such as onboarding or maintenance notices, and send them on creation, in bulk or one by one.

OpenCTIEnterprise EditionFor administrators

An email template is a one-time message to OpenCTI users: a welcome email with the platform address and, when needed, an API token, a notice about a process change, a warning before maintenance. This page shows how to write a template, test it, and send it to new users, to a selection of users or to one user. Templates are not used for knowledge notifications or for disseminating reports: those go through notifiers and dissemination lists.

Before you start

  • Your platform has an Enterprise Edition license.
  • Your role has the Manage credentials capability.
  • The platform can send emails: see Send emails from OpenCTI.

OpenCTI comes with one template, "Built-In Template For Onboarding", that you can adapt rather than start from scratch.

Create a template

  1. Open Settings, then Security, then Email templates and click Create Email template. The Create a template panel opens.

  2. Fill in the fields, then click Create. The template opens in the Template Editor.

    FieldWhat to enter
    NameHow you find the template in lists
    DescriptionOptional: when to use it
    Email subjectThe subject line users see
    Display name of the senderThe sender name shown next to the platform's sender address
  3. Write the body in the editor. Format the text and insert images as in any rich text editor.

  4. Add variables from the side panel, which lists them under Attributes of the user and Attributes of the platform: click Copy attribute name to clipboard next to a variable and paste it where the value should appear.

  5. Click Save template. The tab shows You have unsaved changes until you do.

    OpenCTI 7.260309.0-lts.8

Variables

VariableReplaced by
$user.firstnameFirst name of the recipient
$user.lastnameLast name
$user.nameUser name
$user.user_emailEmail address
$user.account_statusAccount status, such as Active
$user.objectOrganizationThe organizations the user belongs to, separated by commas
$user.account_lock_after_dateThe date the account expires, empty if none
$user.api_tokenA new API token, created for the recipient when the email is sent
$settings.platform_urlThe URL of the platform
Warning

Each email that contains $user.api_token creates a new token, named Template generated token, for its recipient, test emails included. Use it only in onboarding emails, remind users to keep it secret, and revoke the tokens your tests create. The side panel lists this variable as $user.token_user; write $user.api_token, which is the name OpenCTI replaces.

ExampleWelcome analysts from member hotel chains

Example CERT opens its platform to the security teams of the hotel chains it serves. Each new account should get a welcome email that says where to log in and which organization the account belongs to.

  • Name: Member onboarding
  • Description: Sent when an account is created for a member hotel chain
  • Email subject: Your access to the Example CERT threat intelligence platform
  • Display name of the sender: Example CERT

The body, with the variables pasted from the side panel:

Hello $user.firstname,

Your account on the Example CERT threat intelligence platform is ready.

Log in at $settings.platform_url with the address $user.user_email.
Your account belongs to: $user.objectOrganization.

Start with the reports labelled hotel-sector, such as the latest analyses of
the Velvet Harbor intrusion set. Questions go to cti@example.com.

The Example CERT team

For Leo Martin of Grand Meridian Hotels, created with the template chosen in Email template, the email reads "Hello Leo," and gives the platform address and "Grand Meridian Hotels". The template leaves out $user.api_token on purpose: members log in through the interface and need no API token.

Test a template

Click the Send test email button in the template's header. OpenCTI sends the email to your own address, with the variables filled with your account's values, so you see it as a recipient will.

Change or delete a template

Open the template from the list. In the menu of its header, Update opens Update a template, where you change the name, the description, the subject and the sender name; the body stays in the Template Editor, saved with Save template. Delete removes the template.

Send a template

ToDo this
A new user, when you create the accountIn the user creation form of Settings, then Security, then Users, choose the template in Email template
Several usersIn Settings, then Security, then Users, select the users, click Send email in the toolbar, choose the template and click Send
One userOpen the user, click Send email, choose the template and click Send

A playbook can also send a template, with the Send email from template component: see Create a playbook. Every email sent is recorded in the activity events.

Organization administrators can send a template from the page of a user they manage, but only users with Manage credentials see the Email templates menu and create, change or delete templates.

Rendering limits

OpenCTI fills the variables of a template in an isolated worker thread, with a memory limit and a 5-second timeout, so that a faulty template cannot slow down the platform. A template that exceeds them fails to render, and the email, test emails included, is not sent. Notifier templates and the platform's own emails go through the same workers.

In this version, the limits are fixed: 50 MB of main memory, 10 MB for short-lived objects, 10 MB for compiled code and a 4 MB stack per render.

What's next

NextManage labels, vocabularies and templates
OpenCTI
Cyber threat intelligence as a knowledge graph: ingest, analyze, automate, share.

Published

Overview