In the last chapter, we added permissions so different roles see different content. But all operations are still done manually — when a new ticket comes in, someone has to go check; when a status changes, nobody gets notified.
In this chapter, we'll make the system do things automatically.
A workflow is a set of automated "if... then..." rules.
Think of it like an alarm on your phone that goes off every morning at 8 AM. That alarm is the simplest workflow — when a condition is met (it's 8 AM), an action executes automatically (the alarm rings).
NocoBase workflows follow the same idea:
Actions can be chained with multiple nodes. Common node types include:
This tutorial only covers a few of the most common ones — once you learn to combine them, you'll be able to handle most scenarios.
NocoBase offers several trigger types, which you select when creating a workflow:
| Trigger | Description | Typical Use Case |
|---|---|---|
| Collection event | Fires when a record is created, updated, or deleted | New ticket notification, status change logging |
| Schedule | Fires on a Cron expression or fixed time | Daily reports, periodic data cleanup |
| Post-action event | Fires after a user performs a UI action | Send notification after form submission |
| Approval | Initiates an approval flow with multi-level support | Leave requests, purchase approvals |
| Custom action | Bound to a custom button, fires on click | One-click archiving, batch operations |
| Pre-action event | Intercepts a user action synchronously before it completes | Pre-submit validation, auto-fill fields |
| AI Employee | Exposes the workflow as a tool for AI employees to call | AI-driven business operations |
This tutorial uses both Collection event and Post-action event triggers. The other types work similarly; once you've learned these, you can pick up the rest quickly.
NocoBase workflows are a built-in plugin — no extra installation needed, ready to use out of the box.
Requirement: When someone creates a new ticket and specifies an assignee, the system automatically sends an in-app message to the assignee, letting them know "there's work to do."
Open the plugin settings menu in the top-right corner and go to Workflow management.

Click New, and in the dialog that appears:

After submitting, click the Configure link in the list to enter the flow editor.
Click the trigger card at the top to open its configuration drawer:
Collection: Select Main datasource / "Tickets"
Trigger on: Select "After record created or updated"
Changed fields: Check "Assignee" — the workflow only triggers when the Assignee field changes, avoiding unnecessary notifications from other field updates (when creating a record, all fields are considered changed, so new tickets will also trigger)
Only triggers when conditions are met: Set the mode to "Match any condition in the group," then add two conditions:
assignee_id is not emptyAssignee / ID is not emptyWhy two conditions? Because at trigger time, the form may only have the foreign key (assignee_id) without the associated object loaded, or vice versa. Using OR ensures the workflow triggers as long as an assignee is specified.
Preload associations: Check "Assignee" — the notification node needs the assignee's information, so it must be preloaded in the trigger

Click Save. The trigger itself now handles the condition filtering — it only fires when the Assignee is not empty, so there's no need for a separate condition node.
Click the + below the trigger and select a Notification node.

Open the notification node's configuration. The first option is to select a Notification channel — but we haven't created one yet, so the dropdown is empty. Let's go create one first.

NocoBase supports multiple notification channel types:
| Channel Type | Description |
|---|---|
| In-app message | Browser notifications, pushed in real-time to the user's notification center |
| Sends via SMTP, requires email server configuration |
For this tutorial, we'll use the simplest option — In-app message:


Go back to the workflow editor and open the notification node's configuration.
The notification node has the following configuration options:
id = Trigger variable / Trigger data / Assignee / IDNew ticket: {{Trigger data / Title}}
(Before leaving the popup for the next step, remember to save first!)
/admin/camcwbox2uc/view/d8f8e122d37/filterbytk/353072988225540. Paste the path into the field, then replace the number after filterbytk/ with the trigger data's ID variable (click the variable selector → Trigger data → ID). Once configured, clicking the notification in the list will navigate directly to that ticket's detail page and automatically mark it as read

After the notification is sent, the assignee can see the message in the Notification center (top-right corner of the page). Unread items will show a red dot indicator. Clicking the notification takes you directly to the ticket detail page.
The complete flow for Scenario 1 has just two nodes: Trigger (with condition filtering) → Notification. Simple and direct.
Don't rush to enable it — workflows provide a manual execution feature that lets you test the flow with specific data first:
Click the Execute button in the top-right corner (not the enable toggle)
Select an existing ticket record as the trigger data
If the ticket selector shows IDs instead of titles, go to Data sources → Collections → Tickets and set the "Title" column as the title field.
Click execute. The workflow will run and automatically switch to a duplicated new version.

Click the three dots in the top-right corner and select Execution history. You should see the execution record we just created. Click to view the details — including trigger info, each node's execution details, and parameters.



Click the notification to jump to the target ticket page. The notification is automatically marked as read.

Once confirmed, click the On/Off toggle in the top-right corner to enable the workflow.

Note: Once a workflow has been executed (including manual execution), it becomes read-only (grayed out) and can no longer be edited. If you need to make changes, click "Duplicate to new version" in the top-right corner and continue editing the new version. The old version is automatically disabled.

Go back to the tickets page and create a new ticket — make sure to select an assignee. Then switch to the assignee's account and check the notification center — you should see a new notification.

Congratulations, your first automation is up and running!
Requirement: When a ticket is marked as "Completed," the system automatically fills in the "Completion time" field with the current time. No manual entry needed, and it never gets forgotten.
If you haven't created a "Completion time" field in the Tickets collection yet, go to Collection management → Tickets and add a Date type field named "Completion time." Refer to Chapter 2 for how to create fields — we won't repeat the steps here.
Go back to the workflow management page and click New:
About synchronous vs asynchronous:
- Asynchronous: After the action, you can continue doing other things while the workflow runs in the background
- Synchronous: After the action, the UI waits for the workflow to finish before you can do anything else

Open the trigger configuration:
"Global mode" (checking both operations) is generally recommended. However, to familiarize ourselves with how triggers bind to specific actions, we'll use "Local mode" for this tutorial. Feel free to switch to global mode later!

Unlike the collection event trigger which has built-in conditions, we need to add a condition node ourselves:

We recommend selecting "Continue on 'Yes' and 'No' separately" for easier future expansion.

This way, only when the status is "Completed" will the subsequent actions execute. Other statuses (like "In Progress") won't trigger anything.
Click + and select an Update record node:


The workflow is configured, but a "Post-action event" needs to be bound to a specific action button to trigger. Let's create a dedicated "Complete" button in the ticket list's action column:




Go back to the workflow management page and enable the "Auto-record ticket completion time" workflow.
Then open a ticket with "In Progress" status and click the "Complete" button in the action column. After refreshing the page, you should see:

Convenient, right? This is the second common use case for workflows — automatically updating data. And by using the "Post-action event + Local mode + Button binding" approach, we've created a precise trigger mechanism: the workflow only runs when a specific button is clicked.
How many times has the workflow run? Were there any errors? NocoBase keeps track of everything.
In the workflow management list, each workflow shows an Execution count link. Click it to see the detailed record of each execution:

If an execution failed, clicking into the details shows which node had the problem and the specific error message. This is the most important tool for debugging workflows.

In this chapter, we created two simple but practical workflows:
These two workflows demonstrate two different trigger types, and together took less than 10 minutes to configure. The system can already do things automatically. NocoBase supports many more node types (HTTP requests, calculations, loops, etc.), but for getting started, mastering these combos is enough to handle most scenarios.
The system can do things automatically now, but we're still missing a "big picture view" — how many tickets are there in total? Which category has the most? How many new tickets per day? In the next chapter, we'll use chart blocks to build a data dashboard to see everything at a glance.