brevo-automation
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBrevo Automation via Rube MCP
通过Rube MCP实现Brevo自动化
Automate Brevo (formerly Sendinblue) email marketing operations through Composio's Brevo toolkit via Rube MCP.
通过Composio的Brevo工具包,借助Rube MCP自动化Brevo(原Sendinblue)的电子邮件营销操作。
Prerequisites
前提条件
- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)
- Active Brevo connection via with toolkit
RUBE_MANAGE_CONNECTIONSbrevo - Always call first to get current tool schemas
RUBE_SEARCH_TOOLS
- 必须已连接Rube MCP(需确保RUBE_SEARCH_TOOLS可用)
- 通过并使用工具包
RUBE_MANAGE_CONNECTIONS建立有效的Brevo连接brevo - 请始终先调用以获取最新的工具架构
RUBE_SEARCH_TOOLS
Setup
设置步骤
Get Rube MCP: Add as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.
https://rube.app/mcp- Verify Rube MCP is available by confirming responds
RUBE_SEARCH_TOOLS - Call with toolkit
RUBE_MANAGE_CONNECTIONSbrevo - If connection is not ACTIVE, follow the returned auth link to complete Brevo authentication
- Confirm connection status shows ACTIVE before running any workflows
获取Rube MCP:在客户端配置中添加作为MCP服务器。无需API密钥,只需添加端点即可使用。
https://rube.app/mcp- 确认可响应,以此验证Rube MCP是否可用
RUBE_SEARCH_TOOLS - 调用并指定工具包
RUBE_MANAGE_CONNECTIONSbrevo - 如果连接状态不是ACTIVE,请按照返回的认证链接完成Brevo认证
- 在运行任何工作流之前,确认连接状态显示为ACTIVE
Core Workflows
核心工作流
1. Manage Email Campaigns
1. 管理电子邮件营销活动
When to use: User wants to list, review, or update email campaigns
Tool sequence:
- - List all campaigns with filters [Required]
BREVO_LIST_EMAIL_CAMPAIGNS - - Update campaign content or settings [Optional]
BREVO_UPDATE_EMAIL_CAMPAIGN
Key parameters for listing:
- : Campaign type ('classic' or 'trigger')
type - : Campaign status ('suspended', 'archive', 'sent', 'queued', 'draft', 'inProcess', 'inReview')
status - /
startDate: Date range filter (YYYY-MM-DDTHH:mm:ss.SSSZ format)endDate - : Stats type to include ('globalStats', 'linksStats', 'statsByDomain')
statistics - : Results per page (max 100, default 50)
limit - : Pagination offset
offset - : Sort order ('asc' or 'desc')
sort - : Set
excludeHtmlContentto reduce response sizetrue
Key parameters for update:
- : Numeric campaign ID (required)
campaign_id - : Campaign name
name - : Email subject line
subject - : HTML email body (mutually exclusive with
htmlContent)htmlUrl - : URL to HTML content
htmlUrl - : Sender object with
sender,name, oremailid - : Object with
recipientsandlistIdsexclusionListIds - : Scheduled send time (YYYY-MM-DDTHH:mm:ss.SSSZ)
scheduledAt
Pitfalls:
- and
startDateare mutually required; provide both or neitherendDate - Date filters only work when is not passed or set to 'sent'
status - and
htmlContentare mutually exclusivehtmlUrl - Campaign email must be a verified sender in Brevo
sender - A/B testing fields (,
subjectA,subjectB,splitRule) requirewinnerCriteriaabTesting: true - uses full ISO 8601 format with timezone
scheduledAt
适用场景:用户需要列出、查看或更新电子邮件营销活动
工具执行序列:
- - 筛选列出所有营销活动 [必填]
BREVO_LIST_EMAIL_CAMPAIGNS - - 更新营销活动内容或设置 [可选]
BREVO_UPDATE_EMAIL_CAMPAIGN
列出活动的关键参数:
- : 营销活动类型('classic'或'trigger')
type - : 营销活动状态('suspended'、'archive'、'sent'、'queued'、'draft'、'inProcess'、'inReview')
status - /
startDate: 日期范围筛选(格式为YYYY-MM-DDTHH:mm:ss.SSSZ)endDate - : 要包含的统计数据类型('globalStats'、'linksStats'、'statsByDomain')
statistics - : 每页结果数量(最大100,默认50)
limit - : 分页偏移量
offset - : 排序顺序('asc'或'desc')
sort - : 设置为
excludeHtmlContent以减小响应体大小true
更新活动的关键参数:
- : 营销活动数字ID(必填)
campaign_id - : 营销活动名称
name - : 邮件主题
subject - : 邮件HTML内容(与
htmlContent互斥)htmlUrl - : HTML内容的URL地址
htmlUrl - : 发件人对象,包含
sender、name或emailid - : 收件人对象,包含
recipients和listIdsexclusionListIds - : 定时发送时间(格式为YYYY-MM-DDTHH:mm:ss.SSSZ)
scheduledAt
注意事项:
- 和
startDate必须同时提供或都不提供endDate - 仅当未传入或
status设为'sent'时,日期筛选才生效status - 与
htmlContent不可同时使用htmlUrl - 营销活动的发件人邮箱必须是Brevo中已验证的发件人
- A/B测试字段(、
subjectA、subjectB、splitRule)需要先设置winnerCriteriaabTesting: true - 需使用带时区的完整ISO 8601格式
scheduledAt
2. Create and Manage Email Templates
2. 创建与管理邮件模板
When to use: User wants to create, edit, list, or delete email templates
Tool sequence:
- - List all templates [Required]
BREVO_GET_ALL_EMAIL_TEMPLATES - - Create a new template or update existing [Required]
BREVO_CREATE_OR_UPDATE_EMAIL_TEMPLATE - - Delete an inactive template [Optional]
BREVO_DELETE_EMAIL_TEMPLATE
Key parameters for listing:
- : Filter active (
templateStatus) or inactive (true) templatesfalse - : Results per page (max 1000, default 50)
limit - : Pagination offset
offset - : Sort order ('asc' or 'desc')
sort
Key parameters for create/update:
- : Include to update; omit to create new
templateId - : Template display name (required for creation)
templateName - : Email subject line (required for creation)
subject - : HTML template body (min 10 characters; use this or
htmlContent)htmlUrl - : Sender object with
senderandname, oremail(required for creation)id - : Reply-to email address
replyTo - : Activate or deactivate the template
isActive - : Category tag for the template
tag
Pitfalls:
- When is provided, the tool updates; when omitted, it creates
templateId - For creation, ,
templateName, andsubjectare requiredsender - must be at least 10 characters
htmlContent - Template personalization uses syntax
{{contact.ATTRIBUTE}} - Only inactive templates can be deleted
- and
htmlContentare mutually exclusivehtmlUrl
适用场景:用户需要创建、编辑、列出或删除邮件模板
工具执行序列:
- - 列出所有模板 [必填]
BREVO_GET_ALL_EMAIL_TEMPLATES - - 创建新模板或更新现有模板 [必填]
BREVO_CREATE_OR_UPDATE_EMAIL_TEMPLATE - - 删除非活跃模板 [可选]
BREVO_DELETE_EMAIL_TEMPLATE
列出模板的关键参数:
- : 筛选活跃(
templateStatus)或非活跃(true)模板false - : 每页结果数量(最大1000,默认50)
limit - : 分页偏移量
offset - : 排序顺序('asc'或'desc')
sort
创建/更新模板的关键参数:
- : 传入该参数则更新模板;不传入则创建新模板
templateId - : 模板显示名称(创建时必填)
templateName - : 邮件主题(创建时必填)
subject - : 模板HTML内容(至少10个字符;与
htmlContent二选一)htmlUrl - : 发件人对象,包含
sender和name,或email(创建时必填)id - : 回复邮箱地址
replyTo - : 激活或停用模板
isActive - : 模板分类标签
tag
注意事项:
- 传入时工具执行更新操作;不传入则执行创建操作
templateId - 创建模板时,、
templateName和subject为必填项sender - 长度至少为10个字符
htmlContent - 模板个性化需使用语法
{{contact.ATTRIBUTE}} - 仅非活跃模板可被删除
- 与
htmlContent不可同时使用htmlUrl
3. Manage Senders
3. 管理发件人
When to use: User wants to view authorized sender identities
Tool sequence:
- - List all verified senders [Required]
BREVO_GET_ALL_SENDERS
Key parameters: (none required)
Pitfalls:
- Senders must be verified before they can be used in campaigns or templates
- Sender verification is done through the Brevo web interface, not via API
- Sender IDs can be used in fields for campaigns and templates
sender.id
适用场景:用户需要查看已授权的发件人身份
工具执行序列:
- - 列出所有已验证的发件人 [必填]
BREVO_GET_ALL_SENDERS
关键参数: 无必填参数
注意事项:
- 发件人必须先经过验证,才能用于营销活动或模板
- 发件人验证需通过Brevo网页界面完成,无法通过API操作
- 发件人ID可用于营销活动和模板的字段
sender.id
4. Configure A/B Testing Campaigns
4. 配置A/B测试营销活动
When to use: User wants to set up or modify A/B test settings on a campaign
Tool sequence:
- - Find the target campaign [Prerequisite]
BREVO_LIST_EMAIL_CAMPAIGNS - - Configure A/B test settings [Required]
BREVO_UPDATE_EMAIL_CAMPAIGN
Key parameters:
- : Campaign to configure
campaign_id - : Set to
abTestingto enable A/B testingtrue - : Subject line for variant A
subjectA - : Subject line for variant B
subjectB - : Percentage split for the test (1-99)
splitRule - : 'open' or 'click' for determining the winner
winnerCriteria - : Hours to wait before selecting winner (1-168)
winnerDelay
Pitfalls:
- A/B testing must be enabled () before setting variant fields
abTesting: true - is the percentage of contacts that receive variant A
splitRule - defines how long to test before sending the winner to remaining contacts
winnerDelay - Only works with 'classic' campaign type
适用场景:用户需要为营销活动设置或修改A/B测试配置
工具执行序列:
- - 找到目标营销活动 [前置步骤]
BREVO_LIST_EMAIL_CAMPAIGNS - - 配置A/B测试设置 [必填]
BREVO_UPDATE_EMAIL_CAMPAIGN
关键参数:
- : 要配置的营销活动ID
campaign_id - : 设置为
abTesting以启用A/B测试true - : 变体A的邮件主题
subjectA - : 变体B的邮件主题
subjectB - : 测试流量分配比例(1-99)
splitRule - : 获胜判定标准('open'或'click')
winnerCriteria - : 等待选择获胜变体的时长(1-168小时)
winnerDelay
注意事项:
- 必须先启用A/B测试(),才能设置变体相关字段
abTesting: true - 是接收变体A的联系人占比
splitRule - 定义测试持续时长,之后会向剩余联系人发送获胜变体
winnerDelay - 仅适用于'classic'类型的营销活动
Common Patterns
通用模式
Campaign Lifecycle
营销活动生命周期
1. Create campaign (status: draft)
2. Set recipients (listIds)
3. Configure content (htmlContent or htmlUrl)
4. Optionally schedule (scheduledAt)
5. Send or schedule via Brevo UI (API update can set scheduledAt)1. 创建营销活动(状态:draft)
2. 设置收件人列表(listIds)
3. 配置活动内容(htmlContent 或 htmlUrl)
4. 可选:设置定时发送时间(scheduledAt)
5. 通过Brevo界面发送或设置定时(API更新也可设置scheduledAt)Pagination
分页处理
- Use (page size) and
limit(starting index)offset - Default limit is 50; max varies by endpoint (100 for campaigns, 1000 for templates)
- Increment by
offseteach pagelimit - Check in response to determine total available
count
- 使用(每页数量)和
limit(起始索引)实现分页offset - 默认每页数量为50;不同端点的最大值不同(营销活动为100,模板为1000)
- 每次分页将增加
offsetlimit - 通过响应中的字段判断总结果数
count
Template Personalization
模板个性化语法
- First name: {{contact.FIRSTNAME}}
- Last name: {{contact.LASTNAME}}
- Custom attribute: {{contact.CUSTOM_ATTRIBUTE}}
- Mirror link: {{mirror}}
- Unsubscribe link: {{unsubscribe}}- 名字:{{contact.FIRSTNAME}}
- 姓氏:{{contact.LASTNAME}}
- 自定义属性:{{contact.CUSTOM_ATTRIBUTE}}
- 镜像链接:{{mirror}}
- 退订链接:{{unsubscribe}}Known Pitfalls
已知注意事项
Date Formats:
- All dates use ISO 8601 with milliseconds: YYYY-MM-DDTHH:mm:ss.SSSZ
- Pass timezone in the date-time format for accurate results
- and
startDatemust be used togetherendDate
Sender Verification:
- All sender emails must be verified in Brevo before use
- Unverified senders cause campaign creation/update failures
- Use GET_ALL_SENDERS to check available verified senders
Rate Limits:
- Brevo API has rate limits per account plan
- Implement backoff on 429 responses
- Template operations have lower limits than read operations
Response Parsing:
- Response data may be nested under or
datadata.data - Parse defensively with fallback patterns
- Campaign and template IDs are numeric integers
日期格式:
- 所有日期均使用带毫秒的ISO 8601格式:YYYY-MM-DDTHH:mm:ss.SSSZ
- 日期时间格式中需包含时区以保证结果准确
- 和
startDate必须同时使用endDate
发件人验证:
- 所有用于营销活动或模板的发件人邮箱必须先在Brevo中完成验证
- 未验证的发件人会导致营销活动创建/更新失败
- 可使用GET_ALL_SENDERS查看已验证的发件人列表
速率限制:
- Brevo API根据账户套餐设置速率限制
- 收到429响应时需实现重试退避机制
- 模板操作的速率限制低于读取类操作
响应解析:
- 响应数据可能嵌套在或
data下data.data - 需采用防御式解析并设置回退逻辑
- 营销活动和模板ID均为数字整数
Quick Reference
快速参考
| Task | Tool Slug | Key Params |
|---|---|---|
| List campaigns | BREVO_LIST_EMAIL_CAMPAIGNS | type, status, limit, offset |
| Update campaign | BREVO_UPDATE_EMAIL_CAMPAIGN | campaign_id, subject, htmlContent |
| List templates | BREVO_GET_ALL_EMAIL_TEMPLATES | templateStatus, limit, offset |
| Create template | BREVO_CREATE_OR_UPDATE_EMAIL_TEMPLATE | templateName, subject, htmlContent, sender |
| Update template | BREVO_CREATE_OR_UPDATE_EMAIL_TEMPLATE | templateId, htmlContent |
| Delete template | BREVO_DELETE_EMAIL_TEMPLATE | templateId |
| List senders | BREVO_GET_ALL_SENDERS | (none) |
| 任务 | 工具标识 | 关键参数 |
|---|---|---|
| 列出营销活动 | BREVO_LIST_EMAIL_CAMPAIGNS | type, status, limit, offset |
| 更新营销活动 | BREVO_UPDATE_EMAIL_CAMPAIGN | campaign_id, subject, htmlContent |
| 列出邮件模板 | BREVO_GET_ALL_EMAIL_TEMPLATES | templateStatus, limit, offset |
| 创建邮件模板 | BREVO_CREATE_OR_UPDATE_EMAIL_TEMPLATE | templateName, subject, htmlContent, sender |
| 更新邮件模板 | BREVO_CREATE_OR_UPDATE_EMAIL_TEMPLATE | templateId, htmlContent |
| 删除邮件模板 | BREVO_DELETE_EMAIL_TEMPLATE | templateId |
| 列出发件人 | BREVO_GET_ALL_SENDERS | 无 |