Portal Community

Example 1: Wait for User Confirmation Message Before Proceeding

Scenario: A deployment workflow pauses and requires a manager to type "CONFIRM" in the deployment channel before proceeding. If no response arrives within 30 minutes, the deployment is cancelled.

// Step 1 — Chat node: send a prompt message
{
  "channel": "{{ vars.deployment_channel }}",
  "text": "Deployment of {{ vars.service_name }} v{{ vars.version }} is ready. Type CONFIRM to proceed or CANCEL to abort."
}

// Step 2 — ChatReceive node
{
  "from_channel": "{{ vars.deployment_channel }}",
  "from_user": "{{ vars.manager_user_id }}",
  "keyword_filter": "CONFIRM",
  "timeout_minutes": 30
}

// waiting port → (no additional action needed)

// success port → proceed with deployment steps

// error port → Chat node: "Deployment timed out waiting for confirmation. Deployment cancelled."
//            → StopWorkflow node
Expected outcome: The workflow pauses at the ChatReceive node. When the manager types "CONFIRM" in the channel, the workflow resumes and continues with deployment. If no response in 30 minutes, the error branch cancels the deployment and notifies the team.

Example 2: Multi-Step Conversational Q&A Using Loop + ChatReceive

Scenario: A support intake bot asks three questions sequentially — each using a separate ChatReceive node. Answers are collected into variables for a support ticket.

// Triggered by ChatTrigger (initial message from user)

// Step 1 — Chat node: "What is your name?"
// Step 2 — ChatReceive: wait for name
{
  "from_user": "{{ trigger.user_id }}",
  "timeout_minutes": 10
}
// success → VariableAssignment: customer_name = message_text

// Step 3 — Chat node: "What product are you having trouble with?"
// Step 4 — ChatReceive: wait for product
{
  "from_user": "{{ trigger.user_id }}",
  "timeout_minutes": 10
}
// success → VariableAssignment: product_name = message_text

// Step 5 — Chat node: "Please describe the issue in detail."
// Step 6 — ChatReceive: wait for description
{
  "from_user": "{{ trigger.user_id }}",
  "timeout_minutes": 15
}
// success → VariableAssignment: issue_description = message_text

// Step 7 — MongoDB/insertOne: create support ticket
// Step 8 — Chat node: "Your ticket #{{ vars.ticket_id }} has been created. Our team will contact you within 2 hours."
Expected outcome: The bot conducts a three-question intake entirely through chat. Each question waits for a response before asking the next. After all questions are answered, a support ticket is created automatically and the user receives a confirmation with their ticket number.

Example 3: Support Ticket Escalation Chat Flow

Scenario: A support ticket is auto-escalated to Tier 2. The workflow posts the ticket details to the #tier2-support channel and waits for a technician to claim it by replying "CLAIM".

// Triggered by webhook from support system (ticket escalated to T2)

// Step 1 — Chat node: post to #tier2-support channel
{
  "channel": "#tier2-support",
  "text": "ESCALATION: Ticket #{{ vars.ticket_id }} requires Tier 2 attention.\nCustomer: {{ vars.customer_name }}\nIssue: {{ vars.issue_summary }}\nSeverity: {{ vars.severity }}\n\nReply CLAIM to take ownership."
}

// Step 2 — ChatReceive: wait for any T2 technician to claim
{
  "from_channel": "CH-tier2-support",
  "keyword_filter": "CLAIM",
  "timeout_minutes": 60
}

// waiting port → log "Waiting for T2 claim since {{ now }}"

// success port:
// → VariableAssignment: assigned_tech = from_user
// → HTTP POST to support system: assign ticket to technician
// → Chat node: "Ticket #{{ vars.ticket_id }} claimed by <@{{ vars.assigned_tech }}>. SLA clock started."

// error port (timeout — no claim in 60 minutes):
// → Chat node: "@here — URGENT: Ticket #{{ vars.ticket_id }} unclaimed for 60 minutes! Immediate attention required."
// → HTTP POST to support system: escalate to manager
// → VariableAssignment: escalation_count += 1
// → ChatReceive (second attempt with extended timeout)
Expected outcome: The first available Tier 2 technician to type "CLAIM" in the channel takes ownership of the ticket. The workflow captures their user ID, assigns the ticket in the support system, and posts a confirmation. If no one claims the ticket within an hour, an @here alert fires and the ticket escalates further.