i need help i created an automation in n8n using webhooks for an FB page now that in production and working the ai keeps repeating the greeting message. Any suggestion/solution for this?
Hey @Exequiel_Co Welcome to the n8n community!
If you can share your workflow that would really help to pin point the exact problem where AI is repeating the greetings message, let me know if you can share your workflow
@Exequiel_Co It sounds like your webhook is being triggered multiple times or your workflow doesn’t have proper logic to prevent duplicate responses.
Try this fix:
Add a Filter node after your webhook with this condition:
{{ $json.entry[0].messaging[0].message.is_echo }} is not true
AND
{{ $json.entry[0].messaging[0].message.text }} exists
This prevents your workflow from responding to its own messages and ensures there’s actual message content.
Let me know.
Sounds like your AI Agent is treating every webhook call as a brand-new chat, so it keeps sending the “first message / greeting” again and again.
Fix ideas (quick):
-
adjust Memory: it may be resetting or not correctly tied to a user/session. Make sure memory is keyed by sender/user id (PSID) so the agent knows it already greeted them.
-
Add an IF guard for greeting: Store a flag like
greeted=trueper user (Data Store / DB) and only send the greeting when that flag is missing. -
Don’t include greeting in the base prompt: If your system prompt starts with a greeting, it will naturally repeat each run.
In short: persist state per user (memory/session id or datastore flag) and only greet once. Let me know if the issue persists
ill try the first fix, because right now my simple memory doesnt have any keys i just entered 1 there
it doesnt work, i dont understand the 2nd and 3rd fix im sorry, right now the ai will understand my message and reply to it accordingly, then few seconds later it will spam a greeting message, i think the ai is talking to itself it sees the reply to itself
here is the screenshot
@Exequiel_Co can you share your workflow code?

