https://linen.dev logo
Trigger relates to account ID instead of user ID
# 🖥│support-forum
o
Hi team! Currently we discovered a big issue - if our users delete/re-initiate their account ID (for Gmail for example) - all the triggers who were related to this account ID - got deleted! That's really inconvinient. It doesn't make sense that I need to inform my users, that if they delete/re-initialte their connection to Gmail - all their configured triggers will be deleted. Espically, when the current behaviour of fetching & using tools: composio.tools.get(). relates only to user ID. And even if the user decides to re-initiate his connection with Gmail - he can still fetch & use Gmail tools. That should be the exact behaviour also for triggers.
u
Hey @Or , triggers are linked to connected accounts. So, if a connected account is deleted, it’s expected behaviour for the child trigger to be deleted too. However, when the connection is re-initiated (refresh), the associated child trigger shouldn’t be deleted. Could you please verify this and let me know? Also, the statement “*the current behaviour of fetching & using tools: composio.tools.get(). relates only to user ID*” isn’t entirely accurate, as the tool execution (using tools) requires a user ID, you can pass the connected account ID. If no connected account ID is provided, the tool uses the most recent connected account ID for the user ID(user) passed in the argument. In simple terms, tool execution depends on the connected account of the user.
o
Thanks for your reply @User ! Exactly. So I wish that the triggers will behave in the same way as "tool use" - the most recent connected account ID for the user ID. Instead of automatically deleting all the triggers when deleting the related account ID - just let the trigger use the most recent connected account ID for the user ID. In addition, you are right - the triggers got deleted only when the account ID was deleted (and not on re-initiated) - but in my opinion that is still bad behaviour - and it should behave just like the "tool use"... do you think it's possible to change this? (currently - if my users delete and initiate new connection to Gmail - all their triggers will be deleted. I know that they can refresh the connection, but still, if they decide to delete the acount ID - it will be very inconvinient...)
@Uday do you think it's possible?
a
Hey @Or, Thanks for the detailed feedback and for walking us through your use case. From a user's perspective, connecting the same account multiple times feels identical - it's still "my Gmail." But under the hood, triggers work differently than tool execution. When you set up a trigger, we register a webhook subscription with the third-party service using the OAuth access token from that specific connection. Each connection has its own unique access token, even if it's the same underlying account. The tricky part is that trigger management and webhook behavior varies significantly across platforms. For example, some service X continue delivering webhook payloads even after the access token is invalidated, while another service Y may automatically disable webhooks when OAuth access is revoked. This inconsistency makes it challenging to have a unified approach for migrating or reassigning triggers across connections - we'd need to handle each platform's behavior differently to avoid edge cases like duplicate events, silently broken triggers, or orphaned subscriptions. I'll bring this up during our upcoming sprint planning to discuss potential approaches with the team. Being very transparent though - this would require careful thought given the platform-specific nuances, and would be a significant change on our end so will take some time. Will keep you posted on any updates 🙂
o
Thank @Abhishek for your detailed reply. Will wait for updates 🙏
3 Views