https://linen.dev logo
GMAIL_EMAIL_SENT_TRIGGER Is invalid
# 🖥│support-forum
c
Hi there, according to the management API and documentation there is a trigger for GMAIL sent messages with the slug GMAIL_EMAIL_SENT_TRIGGER However when I attempt to configure a trigger with the slug on the connected account I get an error Sent trigger result: { success: false, error: 'Trigger type GMAIL_EMAIL_SENT_TRIGGER not found' } Is the documentation inaccurate? What am I supposed to do here?
@project_id: pr_-F79FMyi8cKv @org_id: tWzQRbwirxi- @org_member_email: chad@pingassistant.com @user_id: 36fa1401-3927-43eb-9c94-677357ead525 @playground_test_user_id: pg-test-36fa1401-3927-43eb-9c94-677357ead525
a
Hey there, could you share the reproducible code snippet or API you are using? It'll help us in debugging.
c
This is a code snippet in the docs...
Copy code
// Get trigger type by slug (GET /api/v3/triggers_types/:slug)
const response = await fetch("https://backend.composio.dev/api/v3/triggers_types/GMAIL_NEW_EMAIL_SENT_TRIGGER", {
  method: "GET",
  headers: {
    "x-api-key": "<key>"
  },
});

const body = await response.json();
console.log(body);
Response:
Copy code
{
  "error": {
    "message": "Trigger GMAIL_NEW_EMAIL_SENT_TRIGGER not found",
    "code": 2601,
    "status": 404,
    "request_id": "04ea0494-53a4-4ff7-a5c2-1386334597b4",
    "suggested_fix": "Check your input."
  }
}
a
Hey Chad, we've added
version
in our API calls to define the version of the tool/trigger used. You can add it to your body with value: "latest". Ex:
Copy code
curl -G https://backend.composio.dev/api/v3/triggers_types/GMAIL_EMAIL_SENT_TRIGGER \
     -H "x-api-key: <api-key>" \
     -d version=latest
— Let me know if it works for you!
c
That didn't change the output
Copy code
curl -G https://backend.composio.dev/api/v3/triggers_types/GMAIL_NEW_EMAIL_SENT_TRIGGER \
     -H "x-api-key: a*************************NJ" \
     -d version=latest
{
  "error": {
    "message": "Trigger GMAIL_NEW_EMAIL_SENT_TRIGGER not found",
    "code": 2601,
    "status": 404,
    "request_id": "5264c766-834d-4be9-ba56-36fc1833b5e2",
    "suggested_fix": "Check your input."
  }
}
Had to look in the list trigger types endpoint and it now shows GMAIL_EMAIL_SENT_TRIGGER