composio-gmail
Original:🇺🇸 English
Translated
Gmail via Composio API. Use when: (1) Sending emails with optional CC/BCC (2) Listing, searching, or reading inbox messages (3) Replying to messages (4) Creating drafts or managing labels Use Composio HTTP API only.
14installs
Added on
NPX Install
npx skill4agent add prashaantr/teach-claude-something-new composio-gmailTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Gmail via Composio
Environment
bash
COMPOSIO_API_KEY # API key
COMPOSIO_USER_ID # Entity ID (required for all requests)
COMPOSIO_CONNECTIONS # JSON with .gmail connection IDCore Pattern
bash
CONNECTION_ID=$(echo $COMPOSIO_CONNECTIONS | jq -r '.gmail')
curl -s "https://backend.composio.dev/api/v3/tools/execute/ACTION_NAME" \
-H "x-api-key: $COMPOSIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"connected_account_id": "'$CONNECTION_ID'",
"entity_id": "'$COMPOSIO_USER_ID'",
"arguments": {}
}' | jq '.data'Quick Start
IMPORTANT: Choose the right action!
- User says "draft" or "prepare" → Use (saves to Drafts folder)
GMAIL_CREATE_DRAFT - User says "send" → Use (sends immediately)
GMAIL_SEND_EMAIL
bash
# CREATE DRAFT (saves to Drafts folder for user to review/send)
curl -s "https://backend.composio.dev/api/v3/tools/execute/GMAIL_CREATE_DRAFT" \
-H "x-api-key: $COMPOSIO_API_KEY" -H "Content-Type: application/json" \
-d '{
"connected_account_id": "'$CONNECTION_ID'",
"entity_id": "'$COMPOSIO_USER_ID'",
"arguments": {
"to": "recipient@example.com",
"subject": "Subject line",
"body": "Email body text"
}
}' | jq
# SEND EMAIL (sends immediately - always include agent tag)
curl -s "https://backend.composio.dev/api/v3/tools/execute/GMAIL_SEND_EMAIL" \
-H "x-api-key: $COMPOSIO_API_KEY" -H "Content-Type: application/json" \
-d '{
"connected_account_id": "'$CONNECTION_ID'",
"entity_id": "'$COMPOSIO_USER_ID'",
"arguments": {
"to": "recipient@example.com",
"subject": "Subject line",
"body": "Email body text\n\n--\nSent by '"$AGENT_NAME"'"
}
}' | jq
# List recent messages
curl -s "https://backend.composio.dev/api/v3/tools/execute/GMAIL_LIST_MESSAGES" \
-H "x-api-key: $COMPOSIO_API_KEY" -H "Content-Type: application/json" \
-d '{
"connected_account_id": "'$CONNECTION_ID'",
"entity_id": "'$COMPOSIO_USER_ID'",
"arguments": {"max_results": 10}
}' | jqAll Actions
See references/actions.md for complete API reference including:
- Messages: send, list, search, get, reply
- Labels: list, add/remove from messages
- Drafts: create
Discover Actions
bash
curl -s "https://backend.composio.dev/api/v2/actions?apps=gmail" \
-H "x-api-key: $COMPOSIO_API_KEY" | jq '.items[] | {name, description}'