sendgrid-automation

2
0
Source

Automate SendGrid email operations including sending emails, managing contacts/lists, sender identities, templates, and analytics via Rube MCP (Composio). Always search tools first for current schemas.

Install

mkdir -p .claude/skills/sendgrid-automation && curl -L -o skill.zip "https://mcp.directory/api/skills/download/3440" && unzip -o skill.zip -d .claude/skills/sendgrid-automation && rm skill.zip

Installs to .claude/skills/sendgrid-automation

About this skill

SendGrid Automation via Rube MCP

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.

Prerequisites

  • Rube MCP must be connected (RUBE_SEARCH_TOOLS available)
  • Active SendGrid connection via RUBE_MANAGE_CONNECTIONS with toolkit sendgrid
  • Always call RUBE_SEARCH_TOOLS first to get current tool schemas

Setup

Get Rube MCP: Add https://rube.app/mcp as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.

  1. Verify Rube MCP is available by confirming RUBE_SEARCH_TOOLS responds
  2. Call RUBE_MANAGE_CONNECTIONS with toolkit sendgrid
  3. If connection is not ACTIVE, follow the returned auth link to complete SendGrid API key authentication
  4. Confirm connection status shows ACTIVE before running any workflows

Core Workflows

1. Create and Send Marketing Campaigns (Single Sends)

When to use: User wants to create and send a marketing email campaign to a contact list or segment.

Tool sequence:

  1. SENDGRID_RETRIEVE_ALL_LISTS - List available marketing lists to target [Prerequisite]
  2. SENDGRID_CREATE_A_LIST - Create a new list if needed [Optional]
  3. SENDGRID_ADD_OR_UPDATE_A_CONTACT - Add contacts to the list [Optional]
  4. SENDGRID_GET_ALL_SENDER_IDENTITIES - Get verified sender ID [Prerequisite]
  5. SENDGRID_CREATE_SINGLE_SEND - Create the campaign with content, sender, and recipients [Required]

Key parameters for SENDGRID_CREATE_SINGLE_SEND:

  • name: Campaign name (required)
  • email__config__subject: Email subject line
  • email__config__html__content: HTML body content
  • email__config__plain__content: Plain text version
  • email__config__sender__id: Verified sender identity ID
  • email__config__design__id: Use instead of html_content for pre-built designs
  • send__to__list__ids: Array of list UUIDs to send to
  • send__to__segment__ids: Array of segment UUIDs
  • send__to__all: true to send to all contacts
  • email__config__suppression__group__id or email__config__custom__unsubscribe__url: One required for compliance

Pitfalls:

  • Setting send_at on CREATE does NOT schedule the send; it only prepopulates the UI date; use the Schedule endpoint separately
  • send_at: "now" is only valid with the Schedule endpoint, not CREATE
  • Must provide either suppression_group_id or custom_unsubscribe_url for unsubscribe compliance
  • Sender must be verified before use; check with SENDGRID_GET_ALL_SENDER_IDENTITIES
  • Nested params use double-underscore notation (e.g., email__config__subject)

2. Manage Contacts and Lists

When to use: User wants to create contact lists, add/update contacts, search for contacts, or remove contacts from lists.

Tool sequence:

  1. SENDGRID_RETRIEVE_ALL_LISTS - List all marketing lists [Required]
  2. SENDGRID_CREATE_A_LIST - Create a new contact list [Optional]
  3. SENDGRID_GET_A_LIST_BY_ID - Get list details and sample contacts [Optional]
  4. SENDGRID_ADD_OR_UPDATE_A_CONTACT - Upsert contacts with list association [Required]
  5. SENDGRID_GET_CONTACTS_BY_EMAILS - Look up contacts by email [Optional]
  6. SENDGRID_GET_CONTACTS_BY_IDENTIFIERS - Look up contacts by email, phone, or external ID [Optional]
  7. SENDGRID_GET_LIST_CONTACT_COUNT - Verify contact count after operations [Optional]
  8. SENDGRID_REMOVE_CONTACTS_FROM_A_LIST - Remove contacts from a list without deleting [Optional]
  9. SENDGRID_REMOVE_LIST_AND_OPTIONAL_CONTACTS - Delete an entire list [Optional]
  10. SENDGRID_IMPORT_CONTACTS - Bulk import from CSV [Optional]

Key parameters for SENDGRID_ADD_OR_UPDATE_A_CONTACT:

  • 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)
  • list_ids: Array of list UUID strings to associate contacts with

Pitfalls:

  • SENDGRID_ADD_OR_UPDATE_A_CONTACT is asynchronous; returns 202 with job_id; contacts may take 10-30 seconds to appear
  • List IDs are UUIDs (e.g., "ca7a3796-e8a8-4029-9ccb-df8937940562"), not integers
  • List names must be unique; duplicate names cause 400 errors
  • SENDGRID_ADD_A_SINGLE_RECIPIENT_TO_A_LIST uses the legacy API; prefer SENDGRID_ADD_OR_UPDATE_A_CONTACT with list_ids
  • SENDGRID_REMOVE_LIST_AND_OPTIONAL_CONTACTS is irreversible; require explicit user confirmation
  • Email addresses are automatically lowercased by SendGrid

3. Manage Sender Identities

When to use: User wants to set up or view sender identities (From addresses) for sending emails.

Tool sequence:

  1. SENDGRID_GET_ALL_SENDER_IDENTITIES - List all existing sender identities [Required]
  2. SENDGRID_CREATE_A_SENDER_IDENTITY - Create a new sender identity [Optional]
  3. SENDGRID_VIEW_A_SENDER_IDENTITY - View details for a specific sender [Optional]
  4. SENDGRID_UPDATE_A_SENDER_IDENTITY - Update sender details [Optional]
  5. SENDGRID_CREATE_VERIFIED_SENDER_REQUEST - Create and verify a new sender [Optional]
  6. SENDGRID_AUTHENTICATE_A_DOMAIN - Set up domain authentication for auto-verification [Optional]

Key parameters for SENDGRID_CREATE_A_SENDER_IDENTITY:

  • from__email: From email address (required)
  • from__name: Display name (required)
  • reply__to__email: Reply-to address (required)
  • nickname: Internal identifier (required)
  • address, city, country: Physical address for CAN-SPAM compliance (required)

Pitfalls:

  • New senders must be verified before use; if domain is not authenticated, a verification email is sent
  • Up to 100 unique sender identities per account
  • Avoid using domains with strict DMARC policies (gmail.com, yahoo.com) as from addresses
  • SENDGRID_CREATE_VERIFIED_SENDER_REQUEST sends a verification email; sender is unusable until verified

4. View Email Statistics and Activity

When to use: User wants to review email delivery stats, bounce rates, open/click metrics, or message activity.

Tool sequence:

  1. SENDGRID_RETRIEVE_GLOBAL_EMAIL_STATISTICS - Get account-wide delivery metrics [Required]
  2. SENDGRID_GET_ALL_CATEGORIES - Discover available categories for filtering [Optional]
  3. SENDGRID_RETRIEVE_EMAIL_STATISTICS_FOR_CATEGORIES - Get stats broken down by category [Optional]
  4. SENDGRID_FILTER_ALL_MESSAGES - Search email activity feed by recipient, status, or date [Optional]
  5. SENDGRID_FILTER_MESSAGES_BY_MESSAGE_ID - Get detailed events for a specific message [Optional]
  6. SENDGRID_REQUEST_CSV - Export activity data as CSV for large datasets [Optional]
  7. SENDGRID_DOWNLOAD_CSV - Download the exported CSV file [Optional]

Key parameters for SENDGRID_RETRIEVE_GLOBAL_EMAIL_STATISTICS:

  • start_date: Start date YYYY-MM-DD (required)
  • end_date: End date YYYY-MM-DD
  • aggregated_by: "day", "week", or "month"
  • limit / offset: Pagination (default 500)

Key parameters for SENDGRID_FILTER_ALL_MESSAGES:

  • query: SQL-like query string, e.g., status="delivered", to_email="user@example.com", date ranges with BETWEEN TIMESTAMP
  • limit: 1-1000 (default 10)

Pitfalls:

  • SENDGRID_FILTER_ALL_MESSAGES requires the "30 Days Additional Email Activity History" paid add-on; returns 403 without it
  • Global statistics are nested under details[].stats[0].metrics, not a flat structure
  • Category statistics are only available for the previous 13 months
  • Maximum 10 categories per request in SENDGRID_RETRIEVE_EMAIL_STATISTICS_FOR_CATEGORIES
  • CSV export is limited to one request per 12 hours; link expires after 3 days

5. Manage Suppressions

When to use: User wants to check or manage unsubscribe groups for email compliance.

Tool sequence:

  1. SENDGRID_GET_SUPPRESSION_GROUPS - List all suppression groups [Required]
  2. SENDGRID_RETRIEVE_ALL_SUPPRESSION_GROUPS_FOR_AN_EMAIL_ADDRESS - Check suppression status for a specific email [Optional]

Pitfalls:

  • Suppressed addresses remain undeliverable even if present on marketing lists
  • Campaign send counts may be lower than list counts due to suppressions

Common Patterns

ID Resolution

Always resolve names to IDs before operations:

  • List name -> list_id: SENDGRID_RETRIEVE_ALL_LISTS and match by name
  • Sender name -> sender_id: SENDGRID_GET_ALL_SENDER_IDENTITIES and match
  • Contact email -> contact_id: SENDGRID_GET_CONTACTS_BY_EMAILS with email array
  • Template name -> template_id: Use the SendGrid UI or template endpoints

Pagination

  • SENDGRID_RETRIEVE_ALL_LISTS: Token-based with page_token and page_size (max 1000)
  • SENDGRID_RETRIEVE_GLOBAL_EMAIL_STATISTICS: Offset-based with limit (max 500) and offset
  • Always paginate list retrieval to avoid missing existing lists

Async Operations

Contact operations (ADD_OR_UPDATE_A_CONTACT, IMPORT_CONTACTS) are asynchronous:

  • Returns 202 with a job_id
  • Wait 10-30 seconds before verifying with GET_CONTACTS_BY_EMAILS
  • Use GET_LIST_CONTACT_COUNT to confirm list growth

Known Pitfalls

ID Formats

  • Marketing list IDs are UUIDs (e.g., "ca7a3796-e8a8-4029-9ccb-df8937940562")
  • Legacy list IDs are integers; do not mix with Marketing API endpoints
  • Sender identity IDs are integers
  • Template IDs: Dynamic templates start with "d-", legacy templates are UUIDs
  • Contact IDs are UUIDs

Rate Limits

  • SendGrid may return HTTP 429; respect Retry-After headers
  • CSV export limited to one request per 12 hours
  • Bulk contact upsert max: 30,000 contacts or 6MB per request

Parameter Quirks

  • Nested params use double-underscore: email__config__subject, from__email
  • send_at on CREATE_SINGLE_SEND only sets a UI default, does NOT schedule
  • SENDGRID_ADD_A_SINGLE_RECIPIENT_TO_A_LIST uses legacy API; recipient_id is Base64-encoded lowercase email
  • SENDGRID_RETRIEVE_ALL_LISTS and SENDGRID_GET_ALL_LISTS both exist; prefer RETRIEVE_ALL_LIS

Content truncated.

mobile-design

sickn33

Mobile-first design and engineering doctrine for iOS and Android apps. Covers touch interaction, performance, platform conventions, offline behavior, and mobile-specific decision-making. Teaches principles and constraints, not fixed layouts. Use for React Native, Flutter, or native mobile apps.

6338

unity-developer

sickn33

Build Unity games with optimized C# scripts, efficient rendering, and proper asset management. Masters Unity 6 LTS, URP/HDRP pipelines, and cross-platform deployment. Handles gameplay systems, UI implementation, and platform optimization. Use PROACTIVELY for Unity performance issues, game mechanics, or cross-platform builds.

9037

frontend-slides

sickn33

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

8733

fastapi-pro

sickn33

Build high-performance async APIs with FastAPI, SQLAlchemy 2.0, and Pydantic V2. Master microservices, WebSockets, and modern Python async patterns. Use PROACTIVELY for FastAPI development, async optimization, or API architecture.

7131

flutter-expert

sickn33

Master Flutter development with Dart 3, advanced widgets, and multi-platform deployment. Handles state management, animations, testing, and performance optimization for mobile, web, desktop, and embedded platforms. Use PROACTIVELY for Flutter architecture, UI implementation, or cross-platform features.

7030

threejs-skills

sickn33

Three.js skills for creating 3D elements and interactive experiences

8224

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

643969

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

591705

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

318398

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

339397

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

451339

fastapi-templates

wshobson

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

304231

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.