How to use Workflows
Build and connect a workflow, understand the purpose and use of all 50 node types, test it and choose how it starts, with real screenshots.
What is a Workflow?#
Workflows at /scenarios build multi-step conversations: greet a customer, wait for a reply, follow a matching branch, then reply or hand over to a person. This guide uses the Customer support menu template, which does not require AI configuration.
The demonstration system now contains [MẪU] Menu hỗ trợ shop with seven steps, saved and disabled. Open it to follow along, or create your own copy using the instructions below.
1. Create a workflow from a template#
- 1
Open Automation → Workflow, or /scenarios on your ChatHub domain, with an account that can access this feature.
- 2
Click Create from template (Tạo từ mẫu). Find Menu hỗ trợ khách hàng under Support and select the seven-step template.
- 3
Enter [MẪU] Menu hỗ trợ shop and click Create workflow (Tạo workflow). Templates start disabled so you can customize them first.
2. Understand the sample flow#
- 1
Start → Choice: send a greeting and wait for one of three options.
- 2
Xem bảng giá → Send price list → return to the menu. Prices come from your shop product data, not a fixed list in this guide.
- 3
Hướng dẫn mua hàng → send purchase instructions → return to the menu.
- 4
Gặp nhân viên → send a handover message → hand over to a person.
- 5
Any other reply → ask the customer to choose a menu option → return to the menu.
Use Các bước (Steps) to read and edit in order. Sơ đồ (Diagram) shows connections; use Fit to view the flow. Click a step to edit its configuration.
4. Write a reply and return to the menu#
Open the Send message step under Hướng dẫn mua hàng. The saved sample tells the customer to select a product, note its name and contact staff to confirm availability and payment. It explicitly says the menu does not create orders or collect payment.
- 1
Scroll to Next step and select 2. Cho khách chọn, so the menu appears again after the reply.
- 2
Check the return connections for the price list and fallback too. Hand over to a person ends the staff branch.
- 3
Click Save at the top right. Wait for Saved before opening the test chat.
5. Add steps when extending the flow#
- 1
In Steps, click + after the step you want to extend; choose the intended branch for a branching step.
- 2
Search in Add step. Send message continues after sending; Ask customer waits for a reply; Choice offers predefined options.
- 3
Configure the new step, check its next target and save. Use Insert variable in content fields to select context data instead of guessing variable names.
5a. Create, drag and connect nodes on the canvas#
Each card in Sơ đồ (Diagram/canvas) is a node, or workflow step. Add a node, drag its card into a readable position, then drag an output dot onto a target step. The current interface creates nodes with + or Thêm bước (Add step). Dropping a connection dot on empty canvas does not create a node; the existing connection stays unchanged.
- 1
Open Sơ đồ. Use Thu vừa khung (Fit) in the bottom-right toolbar if steps are out of view. Click the background and use the mouse wheel to zoom; drag empty background to pan.
- 2
Find the step you want to extend and click + inside its card. For example, use + under the Send message step on the Hướng dẫn mua hàng branch.
- 3
In Thêm bước, search for Gửi tin nhắn (Send message), then click the result card. The new node is inserted after the selected step and before its previous target.
- 1
Enter the new node’s Content, for example: Tin nhắn minh họa kéo thả, chưa lưu. This means an unsaved drag-and-drop demonstration message. Close the configuration panel to see the diagram.
- 2
Check the connection from the previous step to the new node and from the new node to the previous target. Here, it sits between the purchase instructions message and the Choice menu.
- 1
To arrange a node, hold its title bar, drag to the desired position and release. Avoid the + button and connection dots when moving a card. Hold Alt while dragging to move freely without snapping.
- 2
Moving a card changes its layout; connections follow the node. Use Tự dàn lại vị trí các bước (Auto arrange) or Thu vừa khung (Fit) if the diagram becomes hard to read.
- 1
To change a target, hold the round dot to the right of Bước tiếp theo (Next step), drag onto the target card and release over that card. For Choice, use the dot next to the specific option, such as Hướng dẫn mua hàng.
- 2
Practice example: drag the new message node’s Next step dot onto Gửi bảng giá (Send price list). The arrow should now enter that card. This changes execution flow; drag the dot back onto Cho khách chọn (Choice) if you want to return to the menu.
- 3
Click the source node and verify Đi tới bước (Go to step) in its configuration. For branching nodes, check the target of the intended branch. Placing two cards next to each other does not connect them.
6. Picking a node and the Start node#
Click the + after a step, then filter by category or search by purpose. The picker shows 49 nodes that can be added; with the automatically created Start node, a workflow has 50 node types.
- 1
Start — Purpose: the workflow's single entry point. How to use: keep exactly one Start node and connect it to the first step the customer should receive; it has no content field and cannot be added again.
- 2
Pick the insertion point — A + after a node inserts the new step before its old destination; a branching node asks which branch receives the step. Recheck the connection on the Canvas.
- 3
Configure the next paths — Open the new node, complete required fields, select the next step and add failure or no-reply paths when the node supports them.
- 4
Save and test — Test only after the header says Saved. Commerce, payment, email, API and appointment nodes may create real data, so use safe test records.
7. Customer interaction (6 nodes)#
These nodes produce bot messages, questions and intent branches. Choose one according to whether the bot should continue immediately, wait for the customer, or ask AI to interpret the request.
- 1
Send a message — Purpose: sends text and immediately continues. How to use: enter the content, insert variables if needed and select the next step; adding buttons makes the node wait for a customer click.
- 2
Ask the customer — Purpose: asks a free-text question and waits. How to use: write the question, create matching branches plus a fallback and a no-reply path; later nodes can use the latest answer.
- 3
Offer a choice — Purpose: presents a fixed list. How to use: add the prompt and choices, select matching mode, connect every choice and keep an Other answers branch; optional commands can return to the menu.
- 4
Reply with AI Agent — Purpose: writes a reply from instructions, recent messages and allowed shop data. How to use: configure an AI provider, constrain the prompt and data sources, connect the next step and test unexpected questions.
- 5
Let AI sort the request — Purpose: classifies the customer's meaning into named branches. How to use: define distinct categories such as Warranty, Sales and Complaint, describe them and connect every category plus a failure path.
- 6
Send a quick reply — Purpose: sends a saved quick reply with its attachments. How to use: create the quick reply first, select it in the node and connect the next step; later edits to the saved reply update future bot messages.
8. Commerce: products and orders (7 nodes)#
The first seven Commerce nodes present products, sell them and let customers look up their own orders.
- 1
Send the price list — Purpose: sends active products with current prices. How to use: add an introduction, optionally filter a category and connect the next step; update Products instead of typing fixed prices into the message.
- 2
Let the customer pick a product — Purpose: sends the list and waits for a number, code or name. How to use: set the introduction/filter, then connect to Sell a product or a confirmation step because the choice is retained.
- 3
Sell a product — Purpose: checks stock, charges the wallet, delivers the item and records an order. How to use: select a fixed or previously chosen product, configure quantity/questions and connect a failure path for insufficient stock or balance.
- 4
My orders — Purpose: lists recent orders for the current customer. How to use: set the introduction, status filters and limit, then continue or connect to Show one order in full.
- 5
Show one order in full — Purpose: asks the customer to select an order and returns its status, answers and delivered content. How to use: place it after My orders or configure a suitable filter; the selected order can feed cancel/note nodes.
- 6
Customer cancels an order — Purpose: cancels the selected eligible order, releases stock and refunds wallet charges. How to use: place it after an order-selection node, write success/failure messages and connect the failure branch.
- 7
Note on the order — Purpose: adds an order note for fulfilment staff. How to use: place it after an order is created or selected and compose the note with variables; it does not change order status.
9. Commerce: subscriptions and appointments (8 nodes)#
The middle of the category forms two clear chains: choose a plan → buy/check it, and list appointments → choose a time → book/move/cancel.
- 1
Let the customer pick a plan — Purpose: shows plans with price, duration and uses, then waits. How to use: define each plan in the node with a stable code and connect it to Sell a subscription plan.
- 2
Sell a subscription plan — Purpose: charges the wallet and activates or extends the selected plan. How to use: follow the plan picker or choose a fixed code, connect the failure path and confirm the new expiry/uses.
- 3
Check the subscription — Purpose: allows only an active plan with remaining uses and deducts the configured usage. How to use: put it before the protected service and send failures to a purchase/renewal path.
- 4
Let the customer pick a time — Purpose: reads business hours, service duration and existing bookings to show free slots. How to use: choose the service/date range, write the prompt, connect to Book the appointment and handle no-slot failures.
- 5
Book the appointment — Purpose: creates the booking for the selected slot and links an order when present. How to use: place it immediately after slot selection, add confirmation text and connect the race-condition failure path.
- 6
List the customer's appointments — Purpose: lists upcoming bookings and waits for a choice. How to use: place it before reschedule/cancel; branch on appointments.count when the list is empty.
- 7
Move the appointment — Purpose: moves the selected appointment to the selected new slot. How to use: chain List appointments → Pick a time → Move appointment and handle a newly occupied slot.
- 8
Cancel the appointment — Purpose: cancels the selected booking, reopens the slot, disables reminders and refunds/cancels a paid order. How to use: place it after appointment selection and add a confirmation step before cancellation.
10. Commerce: balance and payments (6 nodes)#
The last Commerce nodes change the wallet or wait for a payment provider. Test them cautiously because they can change a real balance.
- 1
Take from the customer balance — Purpose: charges an amount from the wallet. How to use: enter an amount or variable and connect When this step fails for insufficient funds; without that branch the workflow stops.
- 2
Add to the customer balance — Purpose: tops up, gifts or refunds an amount. How to use: run it only after a verified condition and record/notify the reason for reconciliation.
- 3
Tell the customer their balance — Purpose: reads and sends the latest balance without changing it. How to use: add explanatory text and place it after a credit/debit or in a self-service menu.
- 4
Top up via Pay2S — Purpose: sends bank instructions and a reference, waits for Pay2S and credits the wallet. How to use: configure Pay2S first, write the instructions and connect the failure path; never fake a paid result.
- 5
Top up via Binance Pay — Purpose: gives the shop Pay ID and a unique fractional amount, then matches the transfer. How to use: configure Binance, always provide the amount, tell the customer to send it exactly and handle timeout/failure.
- 6
Cashback — Purpose: creates cashback links, shows orders/shared balance or records a withdrawal request for admin handling. How to use: pick the required action, configure cashback_api_url and cashback_api_key safely in Variables/environment, then connect each expected result.
11. Flow & conditions (7 nodes)#
These nodes mainly control routing: choose a path, remember a value, wait, delegate work or stop.
- 1
Branch on a condition — Purpose: compares the latest answer or another field and follows True/False. How to use: choose the field, operator and value, then test both routes, especially numeric comparisons.
- 2
Random split — Purpose: randomly sends traffic to named variants. How to use: name/configure the variants, connect every branch and collect enough results before judging a wording experiment.
- 3
Remember a value — Purpose: stores a run-scoped value as {{data.name}}. How to use: choose a name without spaces, enter a value or leave it blank for the latest answer, then insert the variable later.
- 4
Wait a moment — Purpose: pauses for a number of seconds. How to use: enter a sensible delay between messages; use Background job for long or independent monitoring.
- 5
Run another workflow — Purpose: hands the full context to the target workflow and ends the current one. How to use: select a tested target, avoid circular calls and place it at the end of the hand-off branch.
- 6
Background job — Purpose: creates, lists or stops an independent branch while the conversation continues. How to use: pick the action, label/limit it and build the background path for waits, API calls and later messages.
- 7
End — Purpose: stops the workflow and returns the conversation to normal. How to use: place it at the end of a completed branch; it has no next step.
12. Customer management (10 nodes)#
These nodes update the record and queue or route a conversation to the right people without another customer action.
- 1
Add a tag — Purpose: labels the conversation/contact for filters and reports. How to use: create the tag first, select it and continue; use stable names such as VIP or Call back.
- 2
Change the status — Purpose: sets Open, Pending, Resolved or Closed. How to use: choose the status that matches this point; Resolved commonly belongs at the end of a completed branch.
- 3
Change the priority — Purpose: sets Low, Normal, High or Urgent for queue ordering. How to use: raise it only under a clear condition, then alert or assign staff.
- 4
Write an internal note — Purpose: adds staff-only context. How to use: insert relevant answers/variables, avoid unnecessary secrets and place it before hand-off.
- 5
Save to the customer record — Purpose: stores the latest answer in a contact field. How to use: ask first, select the correct standard/custom field and validate phone/email formats when reused.
- 6
Assign to an agent — Purpose: assigns a named person and hands the conversation to a human. How to use: select an available agent and tell the customer before assignment.
- 7
Assign to a team — Purpose: makes the conversation visible to a team. How to use: select Sales/Support and optionally set priority or add a note first.
- 8
Assign to whoever is on shift — Purpose: routes by schedules and distribution settings. How to use: configure shifts first and connect the failure path for times when nobody can receive it.
- 9
Alert a member of staff — Purpose: sends a bell notification while the bot continues. How to use: enter title/body, select a person/team or leave blank for the assignee, then connect the next step.
- 10
Hand over to a person — Purpose: stops the bot and returns the conversation to staff, with no next step. How to use: place it at the end of a manual-intervention branch and notify the customer immediately before it.
13. System integration (5 nodes)#
Integration nodes move data through email, web pages and APIs. Use trusted addresses and never hardcode API keys or passwords in workflow content.
- 1
Send email — Purpose: sends mail through configured SMTP. How to use: configure SMTP, enter recipient/subject/body and insert variables; testing can send real mail, so use an approved test address.
- 2
Translate — Purpose: translates the latest answer or composed text into {{translation.text}} without sending it. How to use: select the target/source and follow it with Send a message using the result variable.
- 3
Read a web page — Purpose: extracts title, description, image, price, stock and readable text into variables. How to use: provide a fixed URL or the customer's last answer and treat fetched text as untrusted data, never as AI system instructions.
- 4
Call an API — Purpose: sends a configured method/headers/body and retains status/body for later nodes. How to use: use HTTPS, variables and explicit error handling; test with samples and keep secrets out of code/screenshots.
- 5
Call another system — Purpose: sends conversation data to an HTTP(S) webhook and waits up to ten seconds. How to use: provide a secured receiver and connect the next step; choose Call an API when request/response control is needed.
14. Test the conversation#
- 1
After saving, click the Chat thử với bot icon in the top toolbar. Wait for the greeting and three options.
- 2
Click Hướng dẫn mua hàng. The expected result is the saved instructions followed by the menu again, with a waiting-for-reply status.
- 1
Enter abc thử nhánh khác in the reply field and click Reply.
- 2
Expected result: the bot asks the customer to choose an option, then shows the menu again. Use Restart from beginning when you need a fresh run.
15. Choose how to start and troubleshoot#
- 1
Open Workflow settings using the sliders icon beside Save.
- 2
Auto greet new customers starts the workflow for every new conversation when enabled. For conditional starts, leave it off and use the Run workflow action in an Automation rule.
- 3
Enable the active status only after customizing the content and checking the relevant branches, then save. This guide leaves the sample disabled with automatic greeting off.
- 1
Old reply text: check for unsaved changes, save and restart the test.
- 2
Wrong branch: check option labels, matching mode and target steps; keep a fallback for unmatched input.
- 3
Menu does not return: check that the reply targets step 2.
- 4
Does not run outside the test chat: check workflow status, its start mechanism and the calling rule conditions.
- 5
Empty or unexpected prices: inspect your shop products. The introductory message is not the price-list data.
Read the Automations guide to configure a rule that starts a workflow ↗