Standard auto-replies are boring. I’ll show you how to build a ‘Weekend Router’ in n8n. It detects the day (Saturday/Sunday) and switches the LLM system prompt from ‘Instant Support’ to ‘Lead Capture & Scheduling’ mode.
With n8n, we can create a workflow that checks the current day and adjusts the AI Agent’s behavior accordingly. This way, we can capture leads and schedule appointments on weekends, when our competitors are closed.
Here’s a code snippet to get you started:
n8n: https://n8n.io/
// Weekend Router workflow
{
"name": "Weekend Router",
"nodes": [
{
"parameters": {
"date": "{new Date().getDay()}",
"mode": "Lead Capture & Scheduling"
},
"type": "n8n-nodes-base.if",
"name": "Weekend Check"
},
{
"parameters": {
"LLM System Prompt": "{{node["Weekend Check"].json["mode"]}}"
},
"type": "n8n-nodes-base.updateItem",
"name": "Update LLM Prompt"
}
],
"next": {
"node": "Update LLM Prompt"
}
}
Feel free to customize and expand this workflow to suit your needs. With n8n and our WhatsApp AI Agent, you can create a comprehensive sales bot that runs 24/7.
Leave a Reply