postmark-automation
通过Rube MCP(Composio)自动化Postmark邮件发送任务:发送模板邮件、管理模板、监控投递统计与退信情况。务必先搜索工具以获取最新架构信息。
Postmark Automation via Rube MCP
Automate Postmark transactional email operations through Composio's Postmark toolkit via Rube MCP.
Prerequisites
RUBE_MANAGE_CONNECTIONS with toolkit postmarkRUBE_SEARCH_TOOLS first to get current tool schemasSetup
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.
RUBE_SEARCH_TOOLS respondsRUBE_MANAGE_CONNECTIONS with toolkit postmarkCore Workflows
1. Send Templated Batch Emails
When to use: User wants to send templated emails to multiple recipients in one call
Tool sequence:
POSTMARK_LIST_TEMPLATES - Find available templates and their IDs [Prerequisite]POSTMARK_VALIDATE_TEMPLATE - Validate template with model data before sending [Optional]POSTMARK_SEND_BATCH_WITH_TEMPLATES - Send batch emails using a template [Required]Key parameters:
TemplateId or TemplateAlias: Identifier for the template to useMessages: Array of message objects with From, To, TemplateModelTemplateModel: Key-value pairs matching template variablesPitfalls:
TemplateId or TemplateAlias is required, not bothTemplateModel keys must match template variable names exactly (case-sensitive)2. Manage Email Templates
When to use: User wants to create, edit, or inspect email templates
Tool sequence:
POSTMARK_LIST_TEMPLATES - List all templates with IDs and names [Required]POSTMARK_GET_TEMPLATE - Get full template details including HTML/text body [Optional]POSTMARK_EDIT_TEMPLATE - Update template content or settings [Optional]POSTMARK_VALIDATE_TEMPLATE - Test template rendering with sample data [Optional]Key parameters:
TemplateId: Numeric template ID for GET/EDIT operationsName: Template display nameSubject: Email subject line (supports template variables)HtmlBody: HTML content of the templateTextBody: Plain text fallback contentTemplateType: 'Standard' or 'Layout'Pitfalls:
3. Monitor Delivery Statistics
When to use: User wants to check email delivery health, open/click rates, or outbound overview
Tool sequence:
POSTMARK_GET_DELIVERY_STATS - Get bounce counts by type [Required]POSTMARK_GET_OUTBOUND_OVERVIEW - Get sent/opened/clicked/bounced summary [Required]POSTMARK_GET_TRACKED_EMAIL_COUNTS - Get tracked email volume over time [Optional]Key parameters:
fromdate: Start date for filtering stats (YYYY-MM-DD)todate: End date for filtering stats (YYYY-MM-DD)tag: Filter stats by message tagmessagestreamid: Filter by message stream (e.g., 'outbound', 'broadcast')Pitfalls:
messagestreamid defaults to all streams if not specified4. Manage Bounces and Complaints
When to use: User wants to review bounced emails or spam complaints
Tool sequence:
POSTMARK_GET_BOUNCES - List bounced messages with details [Required]POSTMARK_GET_SPAM_COMPLAINTS - List spam complaint records [Optional]POSTMARK_GET_DELIVERY_STATS - Get bounce summary counts [Optional]Key parameters:
count: Number of records to return per pageoffset: Pagination offset for resultstype: Bounce type filter (e.g., 'HardBounce', 'SoftBounce', 'SpamNotification')fromdate/todate: Date range filtersemailFilter: Filter by recipient email addressPitfalls:
count and offset, not page tokens5. Configure Server Settings
When to use: User wants to view or modify Postmark server configuration
Tool sequence:
POSTMARK_GET_SERVER - Retrieve current server settings [Required]POSTMARK_EDIT_SERVER - Update server configuration [Optional]Key parameters:
Name: Server display nameSmtpApiActivated: Enable/disable SMTP API accessBounceHookUrl: Webhook URL for bounce notificationsInboundHookUrl: Webhook URL for inbound email processingTrackOpens: Enable/disable open trackingTrackLinks: Link tracking mode ('None', 'HtmlAndText', 'HtmlOnly', 'TextOnly')Pitfalls:
SmtpApiActivated affects SMTP relay access immediatelyCommon Patterns
Template Variable Resolution
1. Call POSTMARK_GET_TEMPLATE with TemplateId
Inspect HtmlBody/TextBody for {{variable}} placeholders
Build TemplateModel dict with matching keys
Call POSTMARK_VALIDATE_TEMPLATE to verify rendering Pagination
count for results per page (varies by endpoint)offset to skip previously fetched resultsKnown Pitfalls
Authentication:
Rate Limits:
Response Parsing:
data or data.dataQuick Reference
| Task | Tool Slug | Key Params |
|---|---|---|
| Send batch templated emails | POSTMARK_SEND_BATCH_WITH_TEMPLATES | Messages, TemplateId/TemplateAlias |
| List templates | POSTMARK_LIST_TEMPLATES | Count, Offset, TemplateType |
| Get template details | POSTMARK_GET_TEMPLATE | TemplateId |
| Edit template | POSTMARK_EDIT_TEMPLATE | TemplateId, Name, Subject, HtmlBody |
| Validate template | POSTMARK_VALIDATE_TEMPLATE | TemplateId, TemplateModel |
| Delivery stats | POSTMARK_GET_DELIVERY_STATS | (none or date filters) |
| Outbound overview | POSTMARK_GET_OUTBOUND_OVERVIEW | fromdate, todate, tag |
| Get bounces | POSTMARK_GET_BOUNCES | count, offset, type, emailFilter |
| Get spam complaints | POSTMARK_GET_SPAM_COMPLAINTS | count, offset, fromdate, todate |
| Tracked email counts | POSTMARK_GET_TRACKED_EMAIL_COUNTS | fromdate, todate, tag |
| Get server config | POSTMARK_GET_SERVER | (none) |
| Edit server config | POSTMARK_EDIT_SERVER | Name, TrackOpens, TrackLinks |