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
{
"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 -
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