I have setup an automation to do Automated Instagram commenting using webhook as the trigger
And before the auto reply I have setup a filter to filter out if the DM is from the account owner itself. The automated DM should only reply if the DM is from a user. It is working perfectly fine when we test it in Instagram web. But when we test it in Instagram mobile app, the first reply for the user is done correctly but after the automated DM the flows runs again and detects that the DM was from the account owner using the filter check but now the flows starts running again and gives us an automated reply non stop like a loop, it looks like a bug to me , I am not sure how to solve it.
Thanks, and if you check execution history how different are the payloads / responses, my thoughts atm are
Add a second condition to ignore messages containing your automated text (easy if generic, but am guessing it’s more ai agent reply from RAG)
It might be worth trying to add some sleeps / delays in, maybe it’s calling to quick?
I would start with checking the responses and why it’s different, this would help further into finding why the filter is failing, it that all look good I wouldn’t say it a glitch / bug, because it’s filtering okay on insta web
But if you’re replying using the same webhook flow, consider adding a short delay + flag check like writing a short status to a Airtable or memory variable to avoid loops within 10–30s of last message.
Without looking at your whole flow, this is my guess.
Hey Samuel, I can also share the whole flow. Heres the thing, after checking the executions, the filter check to identify the sender is working perfectly fine even for the mobile app and its stops right there but I don’t know what happens after that the webhook triggers again but this time without any input message and then the entire flows executes and this time the filter node is also executing and keeping it instead of discarding even though the automated message was sent from the owner side. The worst part is keeps running again and again and it never stops until we deactivate the flow itself.
This is my entire flow and if you could see the comment agent is working fine, we are facing the problem with the DM Agent.
To my surprise, even the filter node previous to the agent step is working fine and it is in fact discarding the item if the account ID and sender ID is the same, but right after that the flows triggers again but this time without any message and the flows continues and gets into loop and never stops unless we hit the Inactive button.
I think maybe just filter also no message, this will clear it running hopefully it stops that loop. @anishani can you try that let me know how it responds if it keeps making multiple executions after please.
we can look further into it, but maybe that is the workaround for now.
@anishani Thanks for the pm, so to confirm you have tried this, I still don’t have access to the workflow, please can you try share it, you can export that workflow, and share via drive if large file or here. I’ll take a further look into it, just ping me one ready.