通过 Composio 的 Canva 工具包,借助 Rube MCP 自动化 Canva 设计操作。
前提条件
- 必须连接 Rube MCP(
RUBE_SEARCH_TOOLS 可用)
- 通过
RUBE_MANAGE_CONNECTIONS 使用 canva 工具包建立活跃的 Canva 连接
- 始终先调用
RUBE_SEARCH_TOOLS 获取当前工具架构
设置
获取 Rube MCP:在客户端配置中将 https://rube.app/mcp 添加为 MCP 服务器。无需 API 密钥 — 只需添加端点即可工作。
- 通过确认
RUBE_SEARCH_TOOLS 响应来验证 Rube MCP 是否可用
- 使用工具包
canva 调用 RUBE_MANAGE_CONNECTIONS
- 如果连接未激活,按照返回的授权链接完成 Canva OAuth
- 在运行任何工作流之前确认连接状态显示为 ACTIVE
核心工作流
1. 列出和浏览设计
使用场景:用户想要查找现有设计或浏览他们的 Canva 库
工具序列:
CANVA_LIST_USER_DESIGNS - 列出所有设计,可选过滤条件 [必需]
关键参数:
query: 按名称过滤设计的搜索词
continuation: 来自上一次响应的分页令牌
ownership: 按 'owned'(拥有)、'shared'(共享)或 'any'(任意)过滤
sort_by: 排序字段(例如 'modified_at'、'title')
注意事项:
- 结果是分页的;跟随
continuation 令牌直到不存在
- 删除的设计可能仍会短暂显示;检查设计状态
- 搜索是基于子字符串的,不是模糊匹配
2. 创建和设计
使用场景:用户想要从头创建新的 Canva 设计或从模板创建
工具序列:
CANVA_ACCESS_USER_SPECIFIC_BRAND_TEMPLATES_LIST - 浏览可用的品牌模板 [可选]
CANVA_CREATE_CANVA_DESIGN_WITH_OPTIONAL_ASSET - 创建新设计 [必需]
关键参数:
design_type: 设计类型(例如 'Presentation'、'Poster'、'SocialMedia')
title: 新设计的名称
asset_id: 可选要包含在设计中的资源
width / height: 自定义尺寸(像素)
注意事项:
- 设计类型必须完全匹配 Canva 的预定义类型
- 自定义尺寸有最小和最大限制
- 资源必须先通过 CANVA_CREATE_ASSET_UPLOAD_JOB 上传,然后才能引用
3. 上传资源
使用场景:用户想要上传图像或文件到 Canva 以用于设计
工具序列:
CANVA_CREATE_ASSET_UPLOAD_JOB - 启动资源上传 [必需]
CANVA_FETCH_ASSET_UPLOAD_JOB_STATUS - 轮询直到上传完成 [必需]
关键参数:
name: 资源的显示名称
url: 要上传文件的公共 URL(基于 URL 的上传)
job_id: 步骤 1 返回的上传作业 ID(用于状态轮询)
注意事项:
- 上传是异步的;您必须轮询作业状态直到完成
- 支持的格式包括 PNG、JPG、SVG、MP4、GIF
- 文件大小有限制;大文件可能需要更长时间处理
- CREATE 返回的
job_id 是状态轮询所需的 ID
- 状态值:'in_progress'(进行中)、'success'(成功)、'failed'(失败)
4. 导出设计
使用场景:用户想要下载或导出 Canva 设计为 PDF、PNG 或其他格式
工具序列:
CANVA_LIST_USER_DESIGNS - 找到要导出的设计 [前提条件]
CANVA_CREATE_CANVA_DESIGN_EXPORT_JOB - 启动导出过程 [必需]
CANVA_GET_DESIGN_EXPORT_JOB_RESULT - 轮询直到导出完成并获取下载 URL [必需]
关键参数:
design_id: 要导出的设计 ID
format: 导出格式('pdf'、'png'、'jpg'、'svg'、'mp4'、'gif'、'pptx')
pages: 要导出的特定页码(数组)
quality: 导出质量('regular'、'high')
job_id: 用于轮询状态的导出作业 ID
注意事项:
- 导出是异步的;您必须轮询作业结果直到完成
- 完成导出后的下载 URL 在有限时间后过期
- 包含许多页面的大型设计需要更长时间导出
- 并非所有格式都支持所有设计类型(例如 MP4 仅适用于动画)
- 轮询间隔:状态检查之间等待 2-3 秒
5. 使用文件夹组织
使用场景:用户想要创建文件夹或将设计组织到文件夹中
工具序列:
CANVA_POST_FOLDERS - 创建新文件夹 [必需]
CANVA_MOVE_ITEM_TO_SPECIFIED_FOLDER - 将设计移动到文件夹中 [可选]
关键参数:
name: 文件夹名称
parent_folder_id: 用于嵌套组织的父文件夹
item_id: 要移动的设计或资源的 ID
folder_id: 目标文件夹 ID
注意事项:
- 文件夹名称在同一父文件夹内必须唯一
- 在文件夹之间移动项目会立即更新其位置
- 根级别文件夹没有 parent_folder_id
6. 从品牌模板自动填充
使用场景:用户想要通过用数据填充品牌模板占位符来生成设计
工具序列:
CANVA_ACCESS_USER_SPECIFIC_BRAND_TEMPLATES_LIST - 列出可用的品牌模板 [必需]
CANVA_INITIATE_CANVA_DESIGN_AUTOFILL_JOB - 使用数据启动自动填充 [必需]
关键参数:
brand_template_id: 要使用的品牌模板 ID
title: 生成设计的标题
data: 占位符名称到替换值的键值映射
注意事项:
- 模板占位符必须完全匹配(区分大小写)
- 自动填充是异步的;轮询完成状态
- 只有品牌模板支持自动填充,常规设计不支持
- 数据值必须与每个占位符的预期类型匹配(文本、图像 URL)
常见模式
异步作业模式
许多 Canva 操作是异步的:
1. 启动作业(上传、导出、自动填充)-> 获取 job_id
- 每 2-3 秒使用 job_id 轮询状态端点
- 检查 'success' 或 'failed' 状态
- 成功时提取结果(asset_id、download_url、design_id)
ID 解析
设计名称 -> 设计 ID:
1. 使用 query=design_name 调用 CANVA_LIST_USER_DESIGNS
品牌模板名称 -> 模板 ID:
1. 调用 CANVA_ACCESS_USER_SPECIFIC_BRAND_TEMPLATES_LIST
- 按名称查找模板
- 提取 brand_template_id
分页
- 检查响应中的
continuation 令牌
- 在下次请求的
continuation 参数中传递令牌
- 继续直到
continuation 不存在或为空
已知注意事项
异步操作:
- 上传、导出和自动填充都是异步的
- 始终轮询作业状态;不要假设立即完成
- 导出的下载 URL 会过期;及时使用它们
资源管理:
- 资源必须先上传才能在设计中使用
- 上传作业必须达到 'success' 状态后 asset_id 才有效
- 支持的格式各不相同;查看 Canva 文档了解当前限制
速率限制:
- Canva API 对每个端点有限制
- 对批量操作实施指数退避
- 尽可能批量操作以减少 API 调用
响应解析:
- 响应数据可能嵌套在
data 键下
- 作业状态响应根据完成状态包含不同的字段
- 使用可选字段的回退进行防御性解析
快速参考
| 任务 | 工具标识 | 关键参数 |
|---|
| 列出设计 | CANVA_LIST_USER_DESIGNS | query, continuation |
| 创建设计 | CANVA_CREATE_CANVA_DESIGN_WITH_OPTIONAL_ASSET | design_type, title |
| 上传资源 | CANVA_CREATE_ASSET_UPLOAD_JOB | name, url |
| 检查上传 | CANVA_FETCH_ASSET_UPLOAD_JOB_STATUS | job_id |
| 导出设计 | CANVA_CREATE_CANVA_DESIGN_EXPORT_JOB | design_id, format |
| 获取导出 | CANVA_GET_DESIGN_EXPORT_JOB_RESULT | job_id |
| 创建文件夹 | CANVA_POST_FOLDERS | name, parent_folder_id |
| 移动到文件夹 | CANVA_MOVE_ITEM_TO_SPECIFIED_FOLDER | item_id, folder_id |
| 列出模板 | CANVA_ACCESS_USER_SPECIFIC_BRAND_TEMPLATES_LIST | (无) |
| 自动填充模板 | CANVA_INITIATE_CANVA_DESIGN_AUTOFILL_JOB | brand_template_id, data |
Automate Canva design operations through Composio's Canva toolkit via Rube MCP.
Prerequisites
- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)
- Active Canva connection via
RUBE_MANAGE_CONNECTIONS with toolkit canva
- 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.
- Verify Rube MCP is available by confirming
RUBE_SEARCH_TOOLS responds
- Call
RUBE_MANAGE_CONNECTIONS with toolkit canva
- If connection is not ACTIVE, follow the returned auth link to complete Canva OAuth
- Confirm connection status shows ACTIVE before running any workflows
Core Workflows
1. List and Browse Designs
When to use: User wants to find existing designs or browse their Canva library
Tool sequence:
CANVA_LIST_USER_DESIGNS - List all designs with optional filters [Required]
Key parameters:
query: Search term to filter designs by name
continuation: Pagination token from previous response
ownership: Filter by 'owned', 'shared', or 'any'
sort_by: Sort field (e.g., 'modified_at', 'title')
Pitfalls:
- Results are paginated; follow
continuation token until absent
- Deleted designs may still appear briefly; check design status
- Search is substring-based, not fuzzy matching
2. Create and Design
When to use: User wants to create a new Canva design from scratch or from a template
Tool sequence:
CANVA_ACCESS_USER_SPECIFIC_BRAND_TEMPLATES_LIST - Browse available brand templates [Optional]
CANVA_CREATE_CANVA_DESIGN_WITH_OPTIONAL_ASSET - Create a new design [Required]
Key parameters:
design_type: Type of design (e.g., 'Presentation', 'Poster', 'SocialMedia')
title: Name for the new design
asset_id: Optional asset to include in the design
width / height: Custom dimensions in pixels
Pitfalls:
- Design type must match Canva's predefined types exactly
- Custom dimensions have minimum and maximum limits
- Asset must be uploaded first via CANVA_CREATE_ASSET_UPLOAD_JOB before referencing
3. Upload Assets
When to use: User wants to upload images or files to Canva for use in designs
Tool sequence:
CANVA_CREATE_ASSET_UPLOAD_JOB - Initiate the asset upload [Required]
CANVA_FETCH_ASSET_UPLOAD_JOB_STATUS - Poll until upload completes [Required]
Key parameters:
name: Display name for the asset
url: Public URL of the file to upload (for URL-based uploads)
job_id: Upload job ID returned from step 1 (for status polling)
Pitfalls:
- Upload is asynchronous; you MUST poll the job status until it completes
- Supported formats include PNG, JPG, SVG, MP4, GIF
- File size limits apply; large files may take longer to process
- The
job_id from CREATE returns the ID needed for status polling
- Status values: 'in_progress', 'success', 'failed'
4. Export Designs
When to use: User wants to download or export a Canva design as PDF, PNG, or other format
Tool sequence:
CANVA_LIST_USER_DESIGNS - Find the design to export [Prerequisite]
CANVA_CREATE_CANVA_DESIGN_EXPORT_JOB - Start the export process [Required]
CANVA_GET_DESIGN_EXPORT_JOB_RESULT - Poll until export completes and get download URL [Required]
Key parameters:
design_id: ID of the design to export
format: Export format ('pdf', 'png', 'jpg', 'svg', 'mp4', 'gif', 'pptx')
pages: Specific page numbers to export (array)
quality: Export quality ('regular', 'high')
job_id: Export job ID for polling status
Pitfalls:
- Export is asynchronous; you MUST poll the job result until it completes
- Download URLs from completed exports expire after a limited time
- Large designs with many pages take longer to export
- Not all formats support all design types (e.g., MP4 only for animations)
- Poll interval: wait 2-3 seconds between status checks
5. Organize with Folders
When to use: User wants to create folders or organize designs into folders
Tool sequence:
CANVA_POST_FOLDERS - Create a new folder [Required]
CANVA_MOVE_ITEM_TO_SPECIFIED_FOLDER - Move designs into folders [Optional]
Key parameters:
name: Folder name
parent_folder_id: Parent folder for nested organization
item_id: ID of the design or asset to move
folder_id: Target folder ID
Pitfalls:
- Folder names must be unique within the same parent folder
- Moving items between folders updates their location immediately
- Root-level folders have no parent_folder_id
6. Autofill from Brand Templates
When to use: User wants to generate designs by filling brand template placeholders with data
Tool sequence:
CANVA_ACCESS_USER_SPECIFIC_BRAND_TEMPLATES_LIST - List available brand templates [Required]
CANVA_INITIATE_CANVA_DESIGN_AUTOFILL_JOB - Start autofill with data [Required]
Key parameters:
brand_template_id: ID of the brand template to use
title: Title for the generated design
data: Key-value mapping of placeholder names to replacement values
Pitfalls:
- Template placeholders must match exactly (case-sensitive)
- Autofill is asynchronous; poll for completion
- Only brand templates support autofill, not regular designs
- Data values must match the expected type for each placeholder (text, image URL)
Common Patterns
Async Job Pattern
Many Canva operations are asynchronous:
1. Initiate job (upload, export, autofill) -> get job_id
- Poll status endpoint with job_id every 2-3 seconds
- Check for 'success' or 'failed' status
- On success, extract result (asset_id, download_url, design_id)
ID Resolution
Design name -> Design ID:
1. Call CANVA_LIST_USER_DESIGNS with query=design_name
- Find matching design in results
- Extract id field
Brand template name -> Template ID:
1. Call CANVA_ACCESS_USER_SPECIFIC_BRAND_TEMPLATES_LIST
- Find template by name
- Extract brand_template_id
Pagination
- Check response for
continuation token
- Pass token in next request's
continuation parameter
- Continue until
continuation is absent or empty
Known Pitfalls
Async Operations:
- Uploads, exports, and autofills are all asynchronous
- Always poll job status; do not assume immediate completion
- Download URLs from exports expire; use them promptly
Asset Management:
- Assets must be uploaded before they can be used in designs
- Upload job must reach 'success' status before the asset_id is valid
- Supported formats vary; check Canva documentation for current limits
Rate Limits:
- Canva API has rate limits per endpoint
- Implement exponential backoff for bulk operations
- Batch operations where possible to reduce API calls
Response Parsing:
- Response data may be nested under
data key
- Job status responses include different fields based on completion state
- Parse defensively with fallbacks for optional fields
Quick Reference
| Task | Tool Slug | Key Params |
|---|
| List designs | CANVA_LIST_USER_DESIGNS | query, continuation |
| Create design | CANVA_CREATE_CANVA_DESIGN_WITH_OPTIONAL_ASSET | design_type, title |
| Upload asset | CANVA_CREATE_ASSET_UPLOAD_JOB | name, url |
| Check upload | CANVA_FETCH_ASSET_UPLOAD_JOB_STATUS | job_id |
| Export design | CANVA_CREATE_CANVA_DESIGN_EXPORT_JOB | design_id, format |
| Get export | CANVA_GET_DESIGN_EXPORT_JOB_RESULT | job_id |
| Create folder | CANVA_POST_FOLDERS | name, parent_folder_id |
| Move to folder | CANVA_MOVE_ITEM_TO_SPECIFIED_FOLDER | item_id, folder_id |
| List templates | CANVA_ACCESS_USER_SPECIFIC_BRAND_TEMPLATES_LIST | (none) |
| Autofill template | CANVA_INITIATE_CANVA_DESIGN_AUTOFILL_JOB | brand_template_id, data |