[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-86012c5e-25dc-4c88-9d22-ea9282240505":3,"$fOsqSV0YIKcCzJt8kODOX5NUt92ve0XTrBR0-ArxPLzA":43},{"id":4,"title":5,"description":6,"categoryId":7,"moduleId":8,"tags":9,"prompt":10,"icon":11,"source":12,"sourceUrl":13,"authorId":14,"authorName":15,"isPublic":16,"stars":17,"runs":18,"createdAt":19,"updatedAt":19,"module":20,"category":27,"packages":34},"86012c5e-25dc-4c88-9d22-ea9282240505","sendgrid-automation","通过Composio的SendGrid工具包自动化SendGrid电子邮件交付工作流程，包括营销活动（单次发送）、联系人和列表管理、发件人身份设置和电子邮件分析。","cat_prod_automation","mod_productivity","sickn33,productivity","---\nname: sendgrid-automation\ndescription: \"Automate SendGrid email delivery workflows including marketing campaigns (Single Sends), contact and list management, sender identity setup, and email analytics through Composio's SendGrid toolkit.\"\nrisk: critical\nsource: community\ndate_added: \"2026-02-27\"\n---\n\n# SendGrid Automation via Rube MCP\n\nAutomate SendGrid email delivery workflows including marketing campaigns (Single Sends), contact and list management, sender identity setup, and email analytics through Composio's SendGrid toolkit.\n\n## Prerequisites\n\n- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)\n- Active SendGrid connection via `RUBE_MANAGE_CONNECTIONS` with toolkit `sendgrid`\n- Always call `RUBE_SEARCH_TOOLS` first to get current tool schemas\n\n## Setup\n\n**Get Rube MCP**: Add `https:\u002F\u002Frube.app\u002Fmcp` as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.\n\n1. Verify Rube MCP is available by confirming `RUBE_SEARCH_TOOLS` responds\n2. Call `RUBE_MANAGE_CONNECTIONS` with toolkit `sendgrid`\n3. If connection is not ACTIVE, follow the returned auth link to complete SendGrid API key authentication\n4. Confirm connection status shows ACTIVE before running any workflows\n\n## Core Workflows\n\n### 1. Create and Send Marketing Campaigns (Single Sends)\n\n**When to use**: User wants to create and send a marketing email campaign to a contact list or segment.\n\n**Tool sequence**:\n1. `SENDGRID_RETRIEVE_ALL_LISTS` - List available marketing lists to target [Prerequisite]\n2. `SENDGRID_CREATE_A_LIST` - Create a new list if needed [Optional]\n3. `SENDGRID_ADD_OR_UPDATE_A_CONTACT` - Add contacts to the list [Optional]\n4. `SENDGRID_GET_ALL_SENDER_IDENTITIES` - Get verified sender ID [Prerequisite]\n5. `SENDGRID_CREATE_SINGLE_SEND` - Create the campaign with content, sender, and recipients [Required]\n\n**Key parameters for SENDGRID_CREATE_SINGLE_SEND**:\n- `name`: Campaign name (required)\n- `email__config__subject`: Email subject line\n- `email__config__html__content`: HTML body content\n- `email__config__plain__content`: Plain text version\n- `email__config__sender__id`: Verified sender identity ID\n- `email__config__design__id`: Use instead of html_content for pre-built designs\n- `send__to__list__ids`: Array of list UUIDs to send to\n- `send__to__segment__ids`: Array of segment UUIDs\n- `send__to__all`: true to send to all contacts\n- `email__config__suppression__group__id` or `email__config__custom__unsubscribe__url`: One required for compliance\n\n**Pitfalls**:\n- Setting `send_at` on CREATE does NOT schedule the send; it only prepopulates the UI date; use the Schedule endpoint separately\n- `send_at: \"now\"` is only valid with the Schedule endpoint, not CREATE\n- Must provide either `suppression_group_id` or `custom_unsubscribe_url` for unsubscribe compliance\n- Sender must be verified before use; check with `SENDGRID_GET_ALL_SENDER_IDENTITIES`\n- Nested params use double-underscore notation (e.g., `email__config__subject`)\n\n### 2. Manage Contacts and Lists\n\n**When to use**: User wants to create contact lists, add\u002Fupdate contacts, search for contacts, or remove contacts from lists.\n\n**Tool sequence**:\n1. `SENDGRID_RETRIEVE_ALL_LISTS` - List all marketing lists [Required]\n2. `SENDGRID_CREATE_A_LIST` - Create a new contact list [Optional]\n3. `SENDGRID_GET_A_LIST_BY_ID` - Get list details and sample contacts [Optional]\n4. `SENDGRID_ADD_OR_UPDATE_A_CONTACT` - Upsert contacts with list association [Required]\n5. `SENDGRID_GET_CONTACTS_BY_EMAILS` - Look up contacts by email [Optional]\n6. `SENDGRID_GET_CONTACTS_BY_IDENTIFIERS` - Look up contacts by email, phone, or external ID [Optional]\n7. `SENDGRID_GET_LIST_CONTACT_COUNT` - Verify contact count after operations [Optional]\n8. `SENDGRID_REMOVE_CONTACTS_FROM_A_LIST` - Remove contacts from a list without deleting [Optional]\n9. `SENDGRID_REMOVE_LIST_AND_OPTIONAL_CONTACTS` - Delete an entire list [Optional]\n10. `SENDGRID_IMPORT_CONTACTS` - Bulk import from CSV [Optional]\n\n**Key parameters for SENDGRID_ADD_OR_UPDATE_A_CONTACT**:\n- `contacts`: Array of contact objects (max 30,000 or 6MB), each with at least one identifier: `email`, `phone_number_id`, `external_id`, or `anonymous_id` (required)\n- `list_ids`: Array of list UUID strings to associate contacts with\n\n**Pitfalls**:\n- `SENDGRID_ADD_OR_UPDATE_A_CONTACT` is asynchronous; returns 202 with `job_id`; contacts may take 10-30 seconds to appear\n- List IDs are UUIDs (e.g., \"ca7a3796-e8a8-4029-9ccb-df8937940562\"), not integers\n- List names must be unique; duplicate names cause 400 errors\n- `SENDGRID_ADD_A_SINGLE_RECIPIENT_TO_A_LIST` uses the legacy API; prefer `SENDGRID_ADD_OR_UPDATE_A_CONTACT` with `list_ids`\n- `SENDGRID_REMOVE_LIST_AND_OPTIONAL_CONTACTS` is irreversible; require explicit user confirmation\n- Email addresses are automatically lowercased by SendGrid\n\n### 3. Manage Sender Identities\n\n**When to use**: User wants to set up or view sender identities (From addresses) for sending emails.\n\n**Tool sequence**:\n1. `SENDGRID_GET_ALL_SENDER_IDENTITIES` - List all existing sender identities [Required]\n2. `SENDGRID_CREATE_A_SENDER_IDENTITY` - Create a new sender identity [Optional]\n3. `SENDGRID_VIEW_A_SENDER_IDENTITY` - View details for a specific sender [Optional]\n4. `SENDGRID_UPDATE_A_SENDER_IDENTITY` - Update sender details [Optional]\n5. `SENDGRID_CREATE_VERIFIED_SENDER_REQUEST` - Create and verify a new sender [Optional]\n6. `SENDGRID_AUTHENTICATE_A_DOMAIN` - Set up domain authentication for auto-verification [Optional]\n\n**Key parameters for SENDGRID_CREATE_A_SENDER_IDENTITY**:\n- `from__email`: From email address (required)\n- `from__name`: Display name (required)\n- `reply__to__email`: Reply-to address (required)\n- `nickname`: Internal identifier (required)\n- `address`, `city`, `country`: Physical address for CAN-SPAM compliance (required)\n\n**Pitfalls**:\n- New senders must be verified before use; if domain is not authenticated, a verification email is sent\n- Up to 100 unique sender identities per account\n- Avoid using domains with strict DMARC policies (gmail.com, yahoo.com) as from addresses\n- `SENDGRID_CREATE_VERIFIED_SENDER_REQUEST` sends a verification email; sender is unusable until verified\n\n### 4. View Email Statistics and Activity\n\n**When to use**: User wants to review email delivery stats, bounce rates, open\u002Fclick metrics, or message activity.\n\n**Tool sequence**:\n1. `SENDGRID_RETRIEVE_GLOBAL_EMAIL_STATISTICS` - Get account-wide delivery metrics [Required]\n2. `SENDGRID_GET_ALL_CATEGORIES` - Discover available categories for filtering [Optional]\n3. `SENDGRID_RETRIEVE_EMAIL_STATISTICS_FOR_CATEGORIES` - Get stats broken down by category [Optional]\n4. `SENDGRID_FILTER_ALL_MESSAGES` - Search email activity feed by recipient, status, or date [Optional]\n5. `SENDGRID_FILTER_MESSAGES_BY_MESSAGE_ID` - Get detailed events for a specific message [Optional]\n6. `SENDGRID_REQUEST_CSV` - Export activity data as CSV for large datasets [Optional]\n7. `SENDGRID_DOWNLOAD_CSV` - Download the exported CSV file [Optional]\n\n**Key parameters for SENDGRID_RETRIEVE_GLOBAL_EMAIL_STATISTICS**:\n- `start_date`: Start date YYYY-MM-DD (required)\n- `end_date`: End date YYYY-MM-DD\n- `aggregated_by`: \"day\", \"week\", or \"month\"\n- `limit` \u002F `offset`: Pagination (default 500)\n\n**Key parameters for SENDGRID_FILTER_ALL_MESSAGES**:\n- `query`: SQL-like query string, e.g., `status=\"delivered\"`, `to_email=\"user@example.com\"`, date ranges with `BETWEEN TIMESTAMP`\n- `limit`: 1-1000 (default 10)\n\n**Pitfalls**:\n- `SENDGRID_FILTER_ALL_MESSAGES` requires the \"30 Days Additional Email Activity History\" paid add-on; returns 403 without it\n- Global statistics are nested under `details[].stats[0].metrics`, not a flat structure\n- Category statistics are only available for the previous 13 months\n- Maximum 10 categories per request in `SENDGRID_RETRIEVE_EMAIL_STATISTICS_FOR_CATEGORIES`\n- CSV export is limited to one request per 12 hours; link expires after 3 days\n\n### 5. Manage Suppressions\n\n**When to use**: User wants to check or manage unsubscribe groups for email compliance.\n\n**Tool sequence**:\n1. `SENDGRID_GET_SUPPRESSION_GROUPS` - List all suppression groups [Required]\n2. `SENDGRID_RETRIEVE_ALL_SUPPRESSION_GROUPS_FOR_AN_EMAIL_ADDRESS` - Check suppression status for a specific email [Optional]\n\n**Pitfalls**:\n- Suppressed addresses remain undeliverable even if present on marketing lists\n- Campaign send counts may be lower than list counts due to suppressions\n\n## Common Patterns\n\n### ID Resolution\nAlways resolve names to IDs before operations:\n- **List name -> list_id**: `SENDGRID_RETRIEVE_ALL_LISTS` and match by name\n- **Sender name -> sender_id**: `SENDGRID_GET_ALL_SENDER_IDENTITIES` and match\n- **Contact email -> contact_id**: `SENDGRID_GET_CONTACTS_BY_EMAILS` with email array\n- **Template name -> template_id**: Use the SendGrid UI or template endpoints\n\n### Pagination\n- `SENDGRID_RETRIEVE_ALL_LISTS`: Token-based with `page_token` and `page_size` (max 1000)\n- `SENDGRID_RETRIEVE_GLOBAL_EMAIL_STATISTICS`: Offset-based with `limit` (max 500) and `offset`\n- Always paginate list retrieval to avoid missing existing lists\n\n### Async Operations\nContact operations (`ADD_OR_UPDATE_A_CONTACT`, `IMPORT_CONTACTS`) are asynchronous:\n- Returns 202 with a `job_id`\n- Wait 10-30 seconds before verifying with `GET_CONTACTS_BY_EMAILS`\n- Use `GET_LIST_CONTACT_COUNT` to confirm list growth\n\n## Known Pitfalls\n\n### ID Formats\n- Marketing list IDs are UUIDs (e.g., \"ca7a3796-e8a8-4029-9ccb-df8937940562\")\n- Legacy list IDs are integers; do not mix with Marketing API endpoints\n- Sender identity IDs are integers\n- Template IDs: Dynamic templates start with \"d-\", legacy templates are UUIDs\n- Contact IDs are UUIDs\n\n### Rate Limits\n- SendGrid may return HTTP 429; respect `Retry-After` headers\n- CSV export limited to one request per 12 hours\n- Bulk contact upsert max: 30,000 contacts or 6MB per request\n\n### Parameter Quirks\n- Nested params use double-underscore: `email__config__subject`, `from__email`\n- `send_at` on CREATE_SINGLE_SEND only sets a UI default, does NOT schedule\n- `SENDGRID_ADD_A_SINGLE_RECIPIENT_TO_A_LIST` uses legacy API; `recipient_id` is Base64-encoded lowercase email\n- `SENDGRID_RETRIEVE_ALL_LISTS` and `SENDGRID_GET_ALL_LISTS` both exist; prefer RETRIEVE_ALL_LISTS for Marketing API\n- Contact adds are async (202); always verify after a delay\n\n### Legacy vs Marketing API\n- Some tools use the legacy Contact Database API (`\u002Fv3\u002Fcontactdb\u002F`) which may return 403 on newer accounts\n- Prefer Marketing API tools: `SENDGRID_ADD_OR_UPDATE_A_CONTACT`, `SENDGRID_RETRIEVE_ALL_LISTS`, `SENDGRID_CREATE_SINGLE_SEND`\n\n## Quick Reference\n\n| Task | Tool Slug | Key Params |\n|------|-----------|------------|\n| List marketing lists | `SENDGRID_RETRIEVE_ALL_LISTS` | `page_size`, `page_token` |\n| Create list | `SENDGRID_CREATE_A_LIST` | `name` |\n| Get list by ID | `SENDGRID_GET_A_LIST_BY_ID` | `id` |\n| Get list count | `SENDGRID_GET_LIST_CONTACT_COUNT` | `id` |\n| Add\u002Fupdate contacts | `SENDGRID_ADD_OR_UPDATE_A_CONTACT` | `contacts`, `list_ids` |\n| Search contacts by email | `SENDGRID_GET_CONTACTS_BY_EMAILS` | `emails` |\n| Search by identifiers | `SENDGRID_GET_CONTACTS_BY_IDENTIFIERS` | `identifier_type`, `identifiers` |\n| Remove from list | `SENDGRID_REMOVE_CONTACTS_FROM_A_LIST` | `id`, `contact_ids` |\n| Delete list | `SENDGRID_REMOVE_LIST_AND_OPTIONAL_CONTACTS` | `id`, `delete_contacts` |\n| Import contacts CSV | `SENDGRID_IMPORT_CONTACTS` | field mappings |\n| Create Single Send | `SENDGRID_CREATE_SINGLE_SEND` | `name`, `email__config__*`, `send__to__list__ids` |\n| List sender identities | `SENDGRID_GET_ALL_SENDER_IDENTITIES` | (none) |\n| Create sender | `SENDGRID_CREATE_A_SENDER_IDENTITY` | `from__email`, `from__name`, `address` |\n| Verify sender | `SENDGRID_CREATE_VERIFIED_SENDER_REQUEST` | `from_email`, `nickname`, `address` |\n| Authenticate domain | `SENDGRID_AUTHENTICATE_A_DOMAIN` | `domain` |\n| Global email stats | `SENDGRID_RETRIEVE_GLOBAL_EMAIL_STATISTICS` | `start_date`, `aggregated_by` |\n| Category stats | `SENDGRID_RETRIEVE_EMAIL_STATISTICS_FOR_CATEGORIES` | `start_date`, `categories` |\n| Filter email activity | `SENDGRID_FILTER_ALL_MESSAGES` | `query`, `limit` |\n| Message details | `SENDGRID_FILTER_MESSAGES_BY_MESSAGE_ID` | `msg_id` |\n| Export CSV | `SENDGRID_REQUEST_CSV` | `query` |\n| Download CSV | `SENDGRID_DOWNLOAD_CSV` | `download_uuid` |\n| List categories | `SENDGRID_GET_ALL_CATEGORIES` | (none) |\n| Suppression groups | `SENDGRID_GET_SUPPRESSION_GROUPS` | (none) |\n| Get template | `SENDGRID_RETRIEVE_A_SINGLE_TRANSACTIONAL_TEMPLATE` | `template_id` |\n| Duplicate template | `SENDGRID_DUPLICATE_A_TRANSACTIONAL_TEMPLATE` | `template_id`, `name` |\n\n## When to Use\nThis skill is applicable to execute the workflow or actions described in the overview.\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n","","imported","https:\u002F\u002Fgithub.com\u002Fsickn33\u002Fantigravity-awesome-skills","user_system_seed","SkillOPIC",true,50,2063,"2026-05-16 13:38:40",{"id":8,"name":21,"slug":22,"icon":23,"description":24,"sort":25,"createdAt":26},"效率工具","productivity","mdi-lightning-bolt-outline","文档处理、数据分析、自动化工作流",4,"2026-05-16 12:53:40",{"id":7,"name":28,"slug":29,"icon":30,"description":31,"moduleId":8,"sort":32,"skillCount":33,"createdAt":26},"自动化","automation","mdi-robot-outline","工作流自动化、批处理",3,101,[35],{"id":36,"skillId":4,"version":37,"fileName":38,"fileSize":39,"filePath":40,"fileHash":41,"manifest":42,"createdAt":19},"13c76e40-cbee-484d-aa95-85afc17c08f1","1.0.0","sendgrid-automation.zip",4687,"uploads\u002Fskills\u002F86012c5e-25dc-4c88-9d22-ea9282240505\u002Fsendgrid-automation.zip","e5447d715d20770c2189563372be25a80616bb596cf640171c447f6d48985193","[{\"path\":\"SKILL.md\",\"isDirectory\":false,\"size\":13151}]",{"code":44,"message":45,"data":46},200,"success",{"items":47,"stats":48,"page":51},[],{"averageRating":49,"totalRatings":49,"ratingCounts":50},0,[49,49,49,49,49],{"limit":52,"offset":49,"hasMore":53,"nextOffset":52,"ratedOnly":16},15,false]