https://linen.dev logo
GMAIL NEW GMAIL MESSAGE triggered on replies in th...
# 🖥│support-forum
v
I'm not sure this is the intended behavior of this trigger, if so let me know and ill try to update my code to handle it. I have set up a GMAIL_NEW_GMAIL_MESAGE trigger, and to test it I setup a rule to reply to all incoming gnome-related emails with a ai generated image of a gnome. This worked fine, the agent responded to the email with the composio gmail reply tool. Then it triggered again. And again. And again. From the logs, I noticed that the GMAIL_NEW_GMAIL_MESSAGE triggers from my own replies in a thread. Since there is a GMAIL_EMAIL_SENT_TRIGGER i expected this to be for when my account sent emails, and the other for all recieves. Am I using it wrong? How can I detect if the event is a response from me in a thread? Im using gmail toolkit version 20260417_00
c
Hi, Thanks for reporting the reply loop. As a workaround, check the
sender
in each
GMAIL_NEW_GMAIL_MESSAGE
event and skip the reply when it matches your connected Gmail address or a send-as alias. You're right to expect the new-message trigger to be for received mail. Its firing on sent replies is a known issue on our side and is tracked.
GMAIL_EMAIL_SENT_TRIGGER
handles sent mail separately, but it does not stop these new-message events.