Gmail
Draft replies, summarize threads, and search your inbox.
| Family | Category | Sub-type | Auth type | Trending score |
|---|---|---|---|---|
| Communication | communication | email | oauth2 | 95 |
Overview
| Product URL | API docs | Supported features |
|---|---|---|
| https://workspace.google.com/gmail/ | https://developers.google.com/workspace/gmail/api/guides | tool_discovery, health_check |
Setup
- Install the connector instance.
- Complete the OAuth authorization flow.
- Sync the tools and test the connection.
- Review approval-gated write tools before running them.
Auth & Configuration
This connector does not require additional instance config.
Available Tools
| Tool | Requires approval | Description |
|---|---|---|
send_email | No | Send an email message from the authenticated Gmail account. |
list_emails | No | List email messages in the authenticated mailbox. |
get_email | No | Retrieve a single email message by its ID. |
create_draft | No | Create a draft email in the authenticated Gmail account. |
list_labels | No | List all labels in the authenticated Gmail account. |
Use send_email for the main execution example below because it is safe to run without approval.
Examples
Install
bash
chainabit connectors install gmail --name "Gmail"bash
curl -X POST "$BASE_URL/connectors/instances" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"connectorKey": "gmail",
"displayName": "Gmail"
}'javascript
const response = await fetch(`${BASE_URL}/connectors/instances`, {
method: 'POST',
headers: {
Authorization: `Bearer ${TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"connectorKey": "gmail",
"displayName": "Gmail"
}),
});Credentials
bash
chainabit connectors auth <instance-id>bash
curl -X POST "$BASE_URL/connectors/instances/<instance-id>/oauth/initiate" \
-H "Authorization: Bearer $TOKEN"javascript
const response = await fetch(`${BASE_URL}/connectors/instances/<instance-id>/oauth/initiate`, {
method: 'POST',
headers: {
Authorization: `Bearer ${TOKEN}`,
},
});Execute
bash
chainabit connectors exec <instance-id> send_email --input '{}'bash
curl -X POST "$BASE_URL/connectors/instances/<instance-id>/tools/tool_send_email/execute" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"input": {}
}'javascript
const response = await fetch(
`${BASE_URL}/connectors/instances/<instance-id>/tools/tool_send_email/execute`,
{
method: 'POST',
headers: {
Authorization: `Bearer ${TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"input": {}
}),
},
);Security Notes
- Keep tokens, API keys, and connection strings in the encrypted credentials vault.
- Do not allow arbitrary server URLs for remote MCP connectors.
Troubleshooting
- If the health check fails, verify the token scope or credential payload and try again.
- If the tool list is empty, re-run sync-tools after storing the latest credentials.