Skip to content

Agent Follow-Up Trigger

The AgentFollowUpTrigger module is a trigger that initiates automatic follow-up workflows when a user stops interacting with an agent. The agentFollowUpService detects user inactivity and launches this trigger according to the configuration. It supports up to 3 follow-up stages (slots), each with its own wait time, activation condition, and execution limits. When triggered, it provides the workflow with all session information, conversation context, agent memory, and follow-up data. It also includes onSave and onDelete hooks that automatically register and deactivate the flow in the database.

ParameterTypeRequiredDescription
agent_idagentSelectorYesSelects the agent this follow-up belongs to.
slot_numberselectYesFollow-up sequence number: 1st, 2nd, or 3rd follow-up. Default: 1.
trigger_after_minutesnumberYesMinutes of inactivity before activating this follow-up. Min: 1, Max: 10080 (1 week). Default: 30.
trigger_conditionselectYesActivation condition: no response, no completed action, abandoned cart, scheduled, or custom. Default: no_response.
max_executionsnumberNoHow many times this follow-up can be executed per session. Min: 1, Max: 10. Default: 1.
cooldown_minutesnumberNoMinimum minutes between executions if max_executions > 1. Min: 0, Max: 1440. Default: 60.
flow_idhiddenNoInternal registered flow ID. Automatically generated when saving.
{
"session_id": "ses_abc123",
"session_status": "active",
"channel": "whatsapp",
"external_id": "+34600123456",
"last_topic": "consulta_producto",
"messages_count": 5,
"last_user_message": "Me interesa el producto X",
"last_agent_response": "El producto X tiene las siguientes caracteristicas...",
"minutes_since_last_message": 35,
"memory": {},
"entities": {},
"facts": [],
"preferences": {},
"follow_up_number": 1,
"follow_up_type": "no_response",
"previous_follow_ups": 0,
"triggered_at": "2026-03-23T10:30:00.000Z",
"success": true
}
{
"label": "Agent Follow-Up Trigger",
"agent_id": "agente_ventas",
"slot_number": 1,
"trigger_after_minutes": 30,
"trigger_condition": "no_response",
"max_executions": 1,
"cooldown_minutes": 60
}
  • Supports up to 3 slots (follow-up stages) per agent.
  • The flow is automatically registered in the agent_follow_up_flows table when saving the workflow.
  • When deleting the workflow, the flow is automatically deactivated (not deleted).
  • Available conditions are: no_response, no_action, cart_abandoned, scheduled, custom.
  • The maximum configurable inactivity time is 10080 minutes (1 week).
  • The cooldown only applies if max_executions is greater than 1.
  • Provides complete context: session, conversation, agent memory, and extracted entities.
  • telegramReceive (Telegram message trigger)
  • Webhook (generic trigger)
  • decision (to evaluate follow-up conditions)