I have created a workflow to automate replies within my FB page using gemini as my agent that gets trigger with a webhook now that it is live and working how do i make the ai stop responding once an admin replies instead, how do i also make an alert to my email that a customer wants to talk to admin instead of ai
Hey @Exequiel_Co
There’s no toggle to stop AI in n8n, but you can do it with some simple state management and routing.
Basically, track each conversation’s status (AI or human) in a database or Google Sheets. When a message comes in, check the status:
- If it’s AI, let the AI reply.
- If it’s human, skip the AI and end the flow.
When an admin responds, update the status to “human” so the AI won’t answer anymore. You can handle admin messages separately or detect them by sender ID.
For customers asking for a human, you can detect keywords like “talk to a human,” send an email alert, and set the status to “human” for future messages.
In short: load the conversation state, decide whether to reply with AI or not, and update the state when needed. This way, once a human steps in, the AI stays out, and you’re notified when someone requests a human.
You can also add something like a ADMIN-FORM where you can temporarily disable your workflow’s features by toggling its states.
Let me know if this helps!