Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Access the Gmail API with managed OAuth authentication. Read, send, and manage emails, threads, labels, and drafts.
| Model | Eval pass | Runs |
|---|---|---|
| gemini-3.6-flash | 100% | 31 |
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 162% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 49% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 185% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 205% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 49% | 0% |
Access the Gmail API with managed OAuth authentication. Read, send, and manage emails, threads, labels, and drafts.
bash# List messages python <<'EOF' import urllib.request, os, json req = urllib.request.Request('https://gateway.maton.ai/google-mail/gmail/v1/users/me/messages?maxResults=10') req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}') print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2)) EOF
https://gateway.maton.ai/google-mail/{native-api-path}Replace {native-api-path} with the actual Gmail API endpoint path. The gateway proxies requests to gmail.googleapis.com and automatically injects your OAuth token.
All requests require the Maton API key in the Authorization header:
Authorization: Bearer $MATON_API_KEYEnvironment Variable: Set your API key as MATON_API_KEY:
bashexport MATON_API_KEY="YOUR_API_KEY"
Manage your Google OAuth connections at https://ctrl.maton.ai.
bashpython <<'EOF' import urllib.request, os, json req = urllib.request.Request('https://ctrl.maton.ai/connections?app=google-mail&status=ACTIVE') req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}') print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2)) EOF
bashpython <<'EOF' import urllib.request, os, json data = json.dumps({'app': 'google-mail'}).encode() req = urllib.request.Request('https://ctrl.maton.ai/connections', data=data, method='POST') req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}') req.add_header('Content-Type', 'application/json') print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2)) EOF
bashpython <<'EOF' import urllib.request, os, json req = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}') req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}') print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2)) EOF
Response:
json{ "connection": { "connection_id": "21fd90f9-5935-43cd-b6c8-bde9d915ca80", "status": "ACTIVE", "creation_time": "2025-12-08T07:20:53.488460Z", "last_updated_time": "2026-01-31T20:03:32.593153Z", "url": "https://connect.maton.ai/?session_token=...", "app": "google-mail", "metadata": {} } }
Open the returned url in a browser to complete OAuth authorization.
bashpython <<'EOF' import urllib.request, os, json req = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}', method='DELETE') req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}') print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2)) EOF
If you have multiple Gmail connections, specify which one to use with the Maton-Connection header:
bashpython <<'EOF' import urllib.request, os, json req = urllib.request.Request('https://gateway.maton.ai/google-mail/gmail/v1/users/me/messages') req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}') req.add_header('Maton-Connection', '21fd90f9-5935-43cd-b6c8-bde9d915ca80') print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2)) EOF
If omitted, the gateway uses the default (oldest) active connection.
bashGET /google-mail/gmail/v1/users/me/messages?maxResults=10
With query filter:
bashGET /google-mail/gmail/v1/users/me/messages?q=is:unread&maxResults=10
bashGET /google-mail/gmail/v1/users/me/messages/{messageId}
With metadata only:
bashGET /google-mail/gmail/v1/users/me/messages/{messageId}?format=metadata&metadataHeaders=From&metadataHeaders=Subject&metadataHeaders=Date
bashPOST /google-mail/gmail/v1/users/me/messages/send Content-Type: application/json { "raw": "BASE64_ENCODED_EMAIL" }
bashGET /google-mail/gmail/v1/users/me/labels
bashGET /google-mail/gmail/v1/users/me/threads?maxResults=10
bashGET /google-mail/gmail/v1/users/me/threads/{threadId}
bashPOST /google-mail/gmail/v1/users/me/messages/{messageId}/modify Content-Type: application/json { "addLabelIds": ["STARRED"], "removeLabelIds": ["UNREAD"] }
bashPOST /google-mail/gmail/v1/users/me/messages/{messageId}/trash
bashPOST /google-mail/gmail/v1/users/me/drafts Content-Type: application/json { "message": { "raw": "BASE64URL_ENCODED_EMAIL" } }
bashPOST /google-mail/gmail/v1/users/me/drafts/send Content-Type: application/json { "id": "{draftId}" }
bashGET /google-mail/gmail/v1/users/me/profile
Use in the q parameter:
is:unread - Unread messagesis:starred - Starred messagesfrom:email@example.com - From specific senderto:email@example.com - To specific recipientsubject:keyword - Subject contains keywordafter:2024/01/01 - After datebefore:2024/12/31 - Before datehas:attachment - Has attachmentsjavascriptconst response = await fetch( 'https://gateway.maton.ai/google-mail/gmail/v1/users/me/messages?maxResults=10', { headers: { 'Authorization': `Bearer ${process.env.MATON_API_KEY}` } } );
pythonimport os import requests response = requests.get( 'https://gateway.maton.ai/google-mail/gmail/v1/users/me/messages', headers={'Authorization': f'Bearer {os.environ["MATON_API_KEY"]}'}, params={'maxResults': 10, 'q': 'is:unread'} )
me as userId for the authenticated userraw fieldINBOX, SENT, DRAFT, STARRED, UNREAD, TRASHcurl -g when URLs contain brackets (fields[], sort[], records[]) to disable glob parsingjq or other commands, environment variables like $MATON_API_KEY may not expand correctly in some shell environments. You may get "Invalid API key" errors when piping.| Status | Meaning | |--------|---------| | 400 | Missing Gmail connection | | 401 | Invalid or missing Maton API key | | 429 | Rate limited (10 req/sec per account) | | 4xx/5xx | Passthrough error from Gmail API |
MATON_API_KEY environment variable is set:bashecho $MATON_API_KEY
bashpython <<'EOF' import urllib.request, os, json req = urllib.request.Request('https://ctrl.maton.ai/connections') req.add_header('Authorization', f'Bearer {os.environ["MATON_API_KEY"]}') print(json.dumps(json.load(urllib.request.urlopen(req)), indent=2)) EOF
google-mail. For example:https://gateway.maton.ai/google-mail/gmail/v1/users/me/messageshttps://gateway.maton.ai/gmail/v1/users/me/messages| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 12,245 | 9,715 | -21% | 1 | 1 | 0% | 1,835 | 4,808 | +162% | 0 | 0 | — |
case-02 | fail→pass | 14,587 | 8,245 | -43% | 1 | 1 | 0% | 2,979 | 4,438 | +49% | 0 | 0 | — |
case-03 | fail→pass | 7,883 | 3,130 | -60% | 1 | 1 | 0% | 1,159 | 3,306 | +185% | 0 | 0 | — |
case-04 | fail→pass | 8,622 | 7,221 | -16% | 1 | 1 | 0% | 1,403 | 4,278 | +205% | 0 | 0 | — |
case-05 | fail→pass | 12,392 | 4,635 | -63% | 1 | 1 | 0% | 2,474 | 3,676 | +49% | 0 | 0 | — |
case-06 | fail→pass | 15,912 | 4,813 | -70% | 1 | 1 | 0% | 2,398 | 3,755 | +57% | 0 | 0 | — |
case-07 | fail→pass | 6,232 | 2,549 | -59% | 1 | 1 | 0% | 1,145 | 3,162 | +176% | 0 | 0 | — |
case-08 | fail→pass | 11,150 | 4,639 | -58% | 1 | 1 | 0% | 1,897 | 3,771 | +99% | 0 | 0 | — |
case-09 | fail→fail | 10,099 | 3,465 | -66% | 1 | 1 | 0% | 1,922 | 3,423 | +78% | 0 | 0 | — |
case-10 | fail→pass | 6,135 | 4,067 | -34% | 1 | 1 | 0% | 1,269 | 3,635 | +186% | 0 | 0 | — |
case-11 | fail→pass | 9,912 | 4,221 | -57% | 1 | 1 | 0% | 1,828 | 3,629 | +99% | 0 | 0 | — |
case-12 | fail→pass | 4,819 | 3,033 | -37% | 1 | 1 | 0% | 944 | 3,323 | +252% | 0 | 0 | — |
case-13 | fail→pass | 17,905 | 7,372 | -59% | 1 | 1 | 0% | 3,536 | 4,249 | +20% | 0 | 0 | — |
case-14 | fail→pass | 7,732 | 5,678 | -27% | 1 | 1 | 0% | 1,484 | 3,828 | +158% | 0 | 0 | — |
case-15 | fail→pass | 4,879 | 3,100 | -36% | 1 | 1 | 0% | 909 | 3,327 | +266% | 0 | 0 | — |
case-16 | fail→pass | 13,019 | 8,708 | -33% | 1 | 1 | 0% | 2,363 | 4,236 | +79% | 0 | 0 | — |
case-17 | fail→pass | 8,870 | 5,242 | -41% | 1 | 1 | 0% | 1,626 | 3,775 | +132% | 0 | 0 | — |
case-18 | fail→fail | 7,151 | 4,658 | -35% | 1 | 1 | 0% | 1,288 | 3,496 | +171% | 0 | 0 | — |
case-19 | fail→fail | 8,605 | 4,337 | -50% | 1 | 1 | 0% | 1,524 | 3,539 | +132% | 0 | 0 | — |
case-20 | fail→fail | 10,687 | 7,271 | -32% | 1 | 1 | 0% | 2,328 | 4,345 | +87% | 0 | 0 | — |
case-21 | fail→fail | 10,443 | 13,458 | +29% | 1 | 1 | 0% | 2,196 | 5,792 | +164% | 0 | 0 | — |
case-22 | fail→fail | 7,995 | 5,427 | -32% | 1 | 1 | 0% | 1,561 | 3,804 | +144% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +69 percentage points is the difference between those two pass rates over the 22 comparable cases. 2 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.