https://linen.dev logo
Gmail Create trigger returns Not connected despite...
# 🖥│support-forum
d
I get this error when i try to set up a gmail trigger code: 422 - {'error': {'message': 'Connected account is not in an ACTIVE state rather a INITIATED', 'code': 1700, 'status': 422, 'request_id': 'eec6b49526be4f85944018d1756926ae', 'suggested_fix': ''}} user id - Also tried to connect from your dashborad , still failing , when i inspected i get the same error despite being connected
Copy code
{
  "error": {
    "message": "Connected account not found",
    "code": 606,
    "status": 404,
    "request_id": "88ab9f7e-dc3f-4bec-8cb7-7acd6f0b0736",
    "suggested_fix": ""
  }
}
User id - 68e2329be4196ae1450408ae When i check my account is connected (attached image) code -
Copy code
async def create_trigger(
        self,
        user_id: str,
        trigger_slug: str = None,
        trigger_config: Dict[str, Any] = None,
    ) -> Optional[Dict[str, Any]]:
        """
        Create an email trigger for a user.

        Returns:
            Dict containing trigger information or None if failed
        """
        try:

            # Get email trigger type configuration
            trigger_type = self.composio.triggers.get_type(trigger_slug)
            logger.info(f"Email trigger configuration: {trigger_type.config}")

            # Create the email trigger
            trigger = self.composio.triggers.create(
                user_id=user_id,
                slug=trigger_slug,
                trigger_config=trigger_config or {},
            )

            return {
                "trigger_id": trigger.trigger_id,
                "user_id": user_id,
                "trigger_slug": trigger_slug,
                "status": "active",
            }

        except Exception as e:
            logger.error(f"Error creating email trigger for user {user_id}: {e}")
            return None
https://cdn.discordapp.com/attachments/1431258193987764425/1431258194407325716/Screenshot_2025-10-24_at_5.56.46_PM.png?ex=68fcc291&is=68fb7111&hm=7f628d6ba2bfb415f08342bdabba2a56e5db9a31e1289601a70ba21261b3e07e&
userid - 68e2329be4196ae1450408ae
@abhishekpatil4 please check
sdk version - (venv) adityavernekar@Adityas-MBP insightx-backend % poetry show composio name : composio version : 1.0.0rc9 description : SDK for integrating Composio with your applications. dependencies - composio-client 1.4.0 - openai * - pydantic >=2.6.4 - pysher >=1.0.8 - typing-extensions >=4.0.0 (venv) adityavernekar@Adityas-MBP
a
You seem to have more than one connection with the same userId, in such cases the most recent connection that matches the userId would be used and the most recent one (
ca_W9WR2CLL-BhL
) is in
INITIATED
state which is why the trigger creation failed. I'd also recommend upgrading your
composio
package to [latest](https://pypi.org/project/composio/) version.
2 Views