The situation:
I was connecting Google accounts in my app with composio.connected_accounts.initiate and ran into a weird problem. The redirect_url lets the user pick a different Google account than the user_id I passed in, so the connected account came back with only my own user_id on it and no hint about which Google account it actually pointed at. With multiple connected Gmail accounts there was no way to tell them apart programmatically when authorizing a tool. The thread was from October 2025 and marked as a resolved question.
What actually fixes it (verified in the thread):
The user_id you pass is just your own app identifier, not the Google account, so you have to look it up yourself. On the callback_url you set in initiate, you get the new connectedAccountId, and for Gmail you can call the GMAIL_GET_PROFILE tool (or proxy the toolkit's get_current_user endpoint) with that id to get the actual email address. One gotcha: in the Python SDK the parameter is snake_case, connected_account_id, not camelCase, which cost the reporter an auth error. For Calendar or Drive there wasnt an equivalent profile tool at the time, but Composio said they were standardizing connected account names for that.