/recipe-skills:gmail-recipesfrom recipe-skills
Generates Workato recipe JSON for Gmail operations: send, list/search, manage labels, get message details. Requires the workato-recipes base skill.
Ships in recipe-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
DEPENDENCY: Load the
workato-recipesbase skill first if not already loaded. This skill requires the base Workato knowledge for triggers, control flow, datapills, and recipe structure.
You are now equipped with Gmail-specific knowledge for writing Workato recipes using the native Gmail connector.
.recipe.json files to understand local patternstemplates/ directory for validated exampleslist-emails-001, get-details-002["body", ...] wrapperWARNING: Gmail adhoc HTTP responses wrap data in
body. Always use paths like["body", "messages"]for list/search results.
With this skill loaded, you can:
This skill covers the native Gmail connector (gmail) which provides:
Important: The native Gmail connector is built on the Gmail REST API v1 with a hardcoded base URL (
https://www.googleapis.com/gmail/v1/users/). This means:
- 3 native actions + 1 trigger — covers send, get email/draft by ID, and download attachment
- Adhoc HTTP required for most operations: list/search emails, labels, user info, message modification, deletion, threads, drafts
- API version locked - Cannot access newer Gmail API features not in v1
If a user needs functionality not supported by the v1 API, recommend they:
- Check the Workato Community Library for updated Gmail connectors
- Consider building a custom SDK connector with the needed endpoints
- Use the HTTP connector with custom OAuth for full API flexibility
Note: Developers can build custom SDK connectors for Gmail with additional actions. See
workato-recipes/patterns/custom-connector-actions.mdfor custom connector patterns. Custom connectors are not included with Workato by default.
Use gmail for the native Gmail connector:
"provider": "gmail"
{
"keyword": "application",
"provider": "gmail",
"skip_validation": false,
"account_id": {
"zip_name": "my_gmail_account.connection.json",
"name": "My Gmail account",
"folder": ""
}
}
For adhoc HTTP actions, Gmail uses:
https://www.googleapis.com/gmail/v1/users/
Common paths:
me/messages - List messagesme/messages/{id} - Get message detailsme/labels - List labelsme/labels/{id} - Get/modify labelNative actions (like send_mail) return data without body wrapper:
"path": ["id"]
"path": ["threadId"]
"path": ["labelIds"]
Adhoc HTTP actions wrap responses in body:
"path": ["body", "messages"]
"path": ["body", "id"]
"path": ["body", "labelIds"]
The q parameter supports Gmail search operators:
from:[email protected] - From specific senderto:[email protected] - To specific recipientsubject:keyword - Subject contains keywordis:unread - Unread messagesis:starred - Starred messageshas:attachment - Has attachmentsafter:2024/01/01 - After datebefore:2024/12/31 - Before datelabel:INBOX - Has specific labelCombine with spaces: from:[email protected] is:unread has:attachment
For optional query parameters, use .presence || skip:
"input": {
"data": {
"maxResults": "=_dp('{...}').presence || skip",
"pageToken": "=_dp('{...}').presence || skip",
"q": "=_dp('{...}').presence || skip",
"labelIds": "=_dp('{...}').presence || skip"
}
}
The Gmail connector provides 3 native actions and 1 trigger. See lint-rules.json for the authoritative list of valid action and trigger names.
new_email — Fires when a new email arrives in the connected account.Native actions (use these when possible):
send_mail — Send an email (text or HTML) with optional attachments. See detail below.get_email_or_draft_by_id — Get full details of a single email or draft by message ID. Returns headers, body, labels, snippet.download_attachment — Download an attachment by message ID and attachment ID.Adhoc HTTP required for everything else:
__adhoc_http_action with GET me/messages and Gmail query syntax via the q parameter. See adhoc patterns below.me/labels endpoints.me/profile.me/messages/{id}/modify, me/messages/{id}/trash.me/threads, me/drafts.See patterns/gmail-api-reference.md for the full endpoint catalog.
Send an email with optional attachments:
{
"provider": "gmail",
"name": "send_mail",
"keyword": "action",
"input": {
"email_type": "html",
"to": "[email protected]",
"subject": "Email Subject",
"body": "<p>HTML content here</p>",
"from": "[email protected]",
"cc": "[email protected]",
"bcc": "[email protected]",
"reply_to": "[email protected]",
"attachments": {
"____source": "#{_dp('{...path to attachments array}')}",
"file_binary_content": "#{_dp('{...path to file content}')}",
"file_name": "#{_dp('{...path to file name}')}"
}
}
}
Email types:
"text" - Plain text email"html" - HTML formatted emailOutput fields:
id - Message IDthreadId - Thread IDlabelIds - Array of label IDs{
"provider": "gmail",
"name": "__adhoc_http_action",
"keyword": "action",
"input": {
"mnemonic": "List Emails",
"verb": "get",
"response_type": "json",
"path": "me/messages",
"input": {
"schema": "[...]",
"data": {
"maxResults": "=_dp('{...}').presence || skip",
"q": "=_dp('{...}').presence || skip"
}
},
"output": "[{\"name\":\"messages\",\"type\":\"array\",\"of\":\"object\",\"properties\":[{\"name\":\"id\",\"type\":\"string\"},{\"name\":\"threadId\",\"type\":\"string\"}]}]"
}
}
{
"provider": "gmail",
"name": "__adhoc_http_action",
"keyword": "action",
"input": {
"mnemonic": "Get Message Details",
"verb": "get",
"response_type": "json",
"path": "me/messages/#{_dp('{...message_id}')}",
"output": "[{\"name\":\"id\",\"type\":\"string\"},{\"name\":\"threadId\",\"type\":\"string\"},{\"name\":\"labelIds\",\"type\":\"array\",\"of\":\"string\"},{\"name\":\"snippet\",\"type\":\"string\"},{\"name\":\"payload\",\"type\":\"object\",\"properties\":[...]}]"
}
}
Gmail's list endpoint returns minimal data (just IDs). To get full details, use a foreach loop:
See templates/list-emails.json for a complete example.
Wrap Gmail operations in try/catch for robust error handling:
{
"keyword": "try",
"block": [
// Gmail operations
]
},
{
"keyword": "catch",
"block": [
// Return error response
]
}
See validation-checklist.md for Gmail-specific validation, which references the base checklist in workato-recipes/validation-checklist.md.
skills/workato-recipes/SKILL.md - Base platform knowledgeskills/gmail-recipes/patterns/native-gmail-actions.md - Native action detailsskills/gmail-recipes/patterns/gmail-api-reference.md - API endpoint referenceskills/gmail-recipes/templates/ - Validated recipe templatesAsk the user for these details:
Gmail connection name - What is their Gmail connection called?
Operation type - Send, list, search, or manage labels?
Trigger type - API endpoint, scheduler, or event-driven?
lint-rules.json (opens in a new tab)patterns/gmail-api-reference.md (opens in a new tab)patterns/native-gmail-actions.md (opens in a new tab)skill.yaml (opens in a new tab)templates/gmail-salesforce-integration.json (opens in a new tab)templates/list-emails.json (opens in a new tab)templates/send-email.json (opens in a new tab)validation-checklist.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
8 skills in this plugin
/asana-recipesAsana integration recipes for Workato. Enables AI agents to generate valid recipe JSON for Asana operations including task management, project organization, portfolio tracking, goal setting, team management, and workspace administration./datatable-recipesData Tables connector recipes for Workato. Covers triggers, CRUD actions, search, upsert, batch operations, UUID column mapping, and table reference objects for the internal workato_db_table connector./jira-recipesJira integration recipes for Workato. Enables AI agents to generate valid recipe JSON for Jira operations including searching issues by JQL, creating and updating issues, and querying sprint data.npx claudepluginhub workato-devs/recipe-skills --plugin recipe-skillsOther plugins' skills for the same job