Instagram DM duplicate massages problem

Hello, I apologize in advance if this topic was opened unnecessarily.

However, I couldn’t find a solution to the problem.

I set up a DM automation for Instagram.

I used a chat trigger when creating the agent structure. My agent structure works flawlessly and exactly as I want it to.

However, the problem started when I tried to connect it to Instagram.

I am not using third-party software.

I connected the Instagram account to the workflow via webhook.

After completing the testing phases, I went live with the app via Facebook and activated the DM automation.

Whenever I send a message to Instagram, the webhook triggers multiple times.

I just can’t seem to figure this out.

I looked into solutions with Claude or ChatGPT, but none of them worked.

When I looked at the resources I found on YouTube, they didn’t have that problem at all.

I tried external solutions myself. Each message generates a “mid” number, and even if I try to filter them, I think the mid values change because the webhook triggers the same message multiple times, but I’m not sure.

How can I solve this problem?

If anyone has experienced this and solved the problem, I would appreciate their help.

hello @AtillaOzturk

Check the payload from different executions and remove the duplicates with the Remove Duplicates node.

Maybe Facebook resends the payload if it didn’t receive a 200 response.

Hello @barn4k

Hello, are you referring to the response code here?
I tried it as 200 in various variations.
Actually, the strange thing is that I reviewed almost every DM automation on YouTube, whether current or from 3-4 months ago, and couldn’t find a video related to this issue.

i have same problem maybe litle diffrent. 1 succsess 2 fail

if u find solution pls share whit me.

atilla hocam sanırım çözdüm. sorun aslında instagram 2-3 kere mesaj göndermiyor. çıkan output tekrar giriyor. o nasıl oluyor onu çözemedim ama ilk gelen mesajda is_echo=true diye bir veri var mı onu kontrol et ve engelle. birde boş bir şekilde kendini tekrar tetikliyor boş olduğu için de hata veriyor onu çözemedim

Selam hocam, kontrol ediyorum. echo kontrolünü filtrelemek için farklı bi yöntem denemiştim diye hatırlıyorum ama yine aynı sorun olmuştu sanırım, bakacağım yarın. Aslında temel sorun metanın kendi API’siyle iş yapmaya çalışmamız. Çünkü iyice araştırdıktan sonra türlü türlü sorunlar yaşayan insanlar gördüm en sağlıklısı x bir platformdan ücretli ya da deploy ile işlem yapmak onlar bu sorunları çözmüş. Ama işte ona 5 dolar ona 10 dolar x45 olunca dert oluyor insana.