Skip to main content

Triggers

The Triggers feature is an automation engine that allows you to create event-based rules to control your chatbot's behavior.

This is a Pro feature and requires the "Chatbot Triggers (Beta)" add-on to be activated.

You can configure triggers in the Triggers accordion of your chatbot's settings.

How It Works

The system follows a simple logic:

When an Event occurs, if all Conditions are met, then perform an Action

Creating a Trigger

Click the Add New Trigger button to create a new rule. Each trigger has the following settings:

  • Trigger Name & Description: For your own reference.
  • Priority: A number that determines the order in which triggers are checked. Lower numbers run first (e.g., priority 10 runs before priority 20).
  • Active: A toggle to enable or disable the trigger.

Events

An event is what starts a trigger. You select one event per trigger.

  • User Message Received: Fires every time a user sends a message, before the AI processes it.
  • Session Started: Fires only on the very first message of a new conversation.
  • Form Submitted: Fires when a user submits a form that was displayed by a display_form action.
  • System Error Occurred: Fires when the AI call or another internal process fails.

Conditions

Conditions are rules that must all be true for the action to run. If you don't add any conditions, the action will run every time the event occurs.

  1. Condition Type: The category of data you want to check (e.g., User Context, Text Content).
  2. Field: The specific piece of data to check (e.g., user_role, user_message_text).
  1. Operator: The comparison to perform (e.g., equals, contains, greater_than).
  2. Value: The value to compare against.

Example Condition:

  • Type: User Context
  • Field: user_role
  • Operator: is_one_of
  • Value: subscriber, customer

This condition would be true if the current user has either the "Subscriber" or "Customer" role.

Actions

An action is what the trigger does if its conditions are met.

  • Bot Reply: The chatbot sends a predefined message. You can use placeholders like {{user_name}}. You can also choose to stop the AI from processing the user's original message after the reply is sent.
  • Inject Context: Silently adds extra information to the AI's instructions or history before it generates a response. This is useful for dynamically changing the bot's behavior.
  • Block Message: Prevents the user's message from being processed and can display a custom reason to the user.
  • Call Webhook: Sends the chat context data to an external URL, allowing you to integrate with other services like a CRM or a Zapier workflow.
  • Display Form: Renders a form inside the chat window for the user to fill out. You can build the form with text fields, dropdowns, and checkboxes directly in the trigger editor.
  • Store Form Submission: Logs the data from a submitted form to the chat history for a permanent record. This action is only used in form-submitted triggers.

Example Usage

Let’s walk through a real-world use case involving two triggers.

Goal: When a user sends a message containing “help”, display a contact form. When they submit the form, store the submission to the chat history.

✅ Trigger 1: Show Contact Form

1. Trigger Settings

  • Name: Show Contact Form
  • Priority: 10
  • Active: ✅ Enabled

2. Event

  • Event: User Message Received

3. Condition

TypeFieldOperatorValue
Text Contentuser_message_textcontainshelp

This ensures the form only shows when the user mentions "help".

4. Action

  • Action Type: Display Form

Form Settings:

  • Form ID: help_request_form
  • Form Title: Need Help? Contact Us Below
  • Submit Button Text: Send Request

Form Fields:

Field TypeLabelField ID
TextNameuser_name
TextEmailuser_email
TextareaMessageuser_message

ℹ️ Field IDs must be unique and are used for data storage and formatting.

✅ Trigger 2: Store Form Submission

This second trigger handles storing the data once the form is submitted.

1. Trigger Settings

  • Name: Log Help Form Submission
  • Priority: 20
  • Active: ✅ Enabled

2. Event

  • Event: Form Submitted

3. Conditions

  • No conditions required (leave empty)

4. Action

  • Action Type: Store Form Submission

Optional Log Format (supports placeholders):

Placeholders will be replaced with submitted values and stored in chat logs.

🧪 Final Result

When a user types:

"I need help"

  1. Trigger 1 runs → displays the contact form
  2. User fills out name, email, and message
  3. Trigger 2 runs → logs the form data to chat history