https://linen.dev logo
s
Hi, looking at this documentation https://docs.composio.dev/api-reference/triggers/post-trigger-instances-by-slug-upsert, I'm finding that the trigger_config requires a "userId" field. In the instance where the app for the trigger is gmail, the trigger config expects a userId field where the userId is the google email that the user connected. First off, I don't see where you guys provide a way to retrieve this google email. Additionally, in my opinion, you guys shouldn't need to request this from us. The connected account nano id should be enough.
c
HI Sacha, It looks like there's been a misunderstanding. The
user_id
is actually defined when creating a connection to specify or identify a User. I've attached an Image for your reference. Let me know if you need any alternative way of retrieving the
user_id
. Thanks! https://cdn.discordapp.com/attachments/1399921061516017705/1399953450036367371/Screenshot_2025-07-30_at_08.42.22.png?ex=688adfc0&is=68898e40&hm=8245b492e1c37ae5b0271c2d65efc0fe44a4a0a19607d90966c8db89b295df0f&
it does not work. this is the same error i am getting in my code
it does work when i put the email address
but you guys dont provide a way to programatically get the email address in the flow
but regardless, i dont think that providing a user id , such as an email address, should be necessary... why provide a user id and a connected account id? shouldn't only one be necessary?
c
it looks like there's a misunderstanding. The
UserId
from the Trigger is the required email address of the user you want to create a Trigger for. You can leave it at default which will be '**me**' to create a trigger for the email with which the account is connected. FYI: The user_id(68893...) is actually an identifier from composio.
Let me know if you need more context regarding the Issue.
s
i'm not sure i understnad
for creating a trigger ^
please note that i was only using the web panel to test. I won't ever be using 'me' (i dont think???) because i am doing this programatically using your sdk, not on the panel
c
For Gmail Trigger, to enable a trigger when a new message is received, you have to provide an email address for which the trigger is enabled. For example, if the connected account is authenticated using test@gmail.com, you can keep(default value) the field as "**me**" to enable the trigger for the authenticated user. Hence, a new message received on test@gmail.com will fire the trigger. As for the user_id(6889..) is actually the name you give to your user for identification.
s
so when would you not put "me"?
in what instance?
what's the point of having it
c
The field value is "**me**" by default for the Authenticated user associated with the access token. You can refer to this documentation for more information: