Send Follow-Up
Description
Section titled “Description”This module generates and prepares follow-up messages to send to the user when they have not responded. It supports three message generation modes:
- AI (ai): Generates the message automatically using an LLM. The system prompt instructs the AI to create short, natural, and non-invasive messages adapted to the follow-up number. It can reuse the brain configured in the session’s agent or use its own.
- Template (template): Uses a predefined message with dynamic variables such as
{{name}},{{last_topic}},{{follow_up_number}}, etc. Variables are replaced with session data and extracted entities. - Dynamic (dynamic): Takes the message directly from the input data (
message,text, orcontent).
The module optionally:
- Adds the follow-up message to the session history.
- Updates session counters and timestamps in the database.
If AI generation fails, a predefined fallback message is used based on the follow-up number.
Configuration
Section titled “Configuration”| Parameter | Type | Required | Description |
|---|---|---|---|
| message_mode | select | Yes | How the follow-up message is generated. Options: ai, template, dynamic. Default: ai. |
| template_message | textarea | No | Template message. Supports variables like {{name}}, {{last_topic}}, etc. Visible in template mode. |
| ai_prompt | textarea | No | Instructions for the AI on how to generate the follow-up message. Visible in ai mode. |
| use_session_brain | boolean | No | Use the same AI configured in the session’s agent. Default: true. Visible in ai mode. |
| brain_provider | select | No | AI provider for generating the message. Visible if use_session_brain is false. |
| brain_model | aiModelSelector | No | AI model to use. Default: gpt-4o. |
| credentials_key | credentials | No | AI provider credentials. Visible if use_session_brain is false. |
| max_tokens | number | No | Token limit for the generated message. Min: 50, Max: 1000. Default: 200. Visible in ai mode. |
| temperature | number | No | Message creativity (0.8 recommended for follow-ups). Default: 0.8. Visible in ai mode. |
| include_context | boolean | No | Include conversation context to generate a more relevant message. Default: true. |
| update_session | boolean | No | Add the sent message to the session history. Default: true. |
Credentials
Section titled “Credentials”Optional. If use_session_brain is true, the agent’s credentials are reused. Otherwise, credentials_key must be configured.
Output
Section titled “Output”{ "success": true, "message": "Hola! Vi que estabamos conversando. Hay algo en lo que pueda ayudarte?", "session_id": "uuid-sesion", "channel": "whatsapp", "external_id": "5491112345678", "follow_up_number": 1, "message_mode": "ai", "generated_at": "2026-03-23T10:00:00.000Z"}Usage Example
Section titled “Usage Example”Basic case
Section titled “Basic case”{ "message_mode": "template", "template_message": "Hola {{nombre}}, queria retomar nuestra conversacion sobre {{ultimo_tema}}. Puedo ayudarte en algo mas?", "include_context": true, "update_session": true}Expected input data
Section titled “Expected input data”session_id: Agent session ID.last_topic: Last conversation topic.last_user_message: Last user message.memory: Session memory.entities: Extracted entities (name, email, etc.).follow_up_number: Follow-up number (1, 2, 3…).channel: Communication channel.external_id: User’s external ID.
API Used
Section titled “API Used”In AI mode, the configured provider’s API (OpenAI, Anthropic, Google, etc.) is called to generate the follow-up message.
- Predefined fallback messages are: (1) “Hi! I noticed we were chatting…”, (2) “I just wanted to check if you have any pending questions…”, (3) “I hope everything is going well…”.
- In template mode, unreplaced variables are removed from the final message.
- A temperature of 0.8 is recommended for follow-ups, as it generates more varied and natural messages.
- The module does not send the message directly; it generates the text for a subsequent node (e.g. Telegram, WhatsApp) to send it.
Related Nodes
Section titled “Related Nodes”- Agent - AI Agent
- AgentDecision - Agent Decision