docusign-automation
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDocuSign Automation via Rube MCP
通过Rube MCP实现DocuSign自动化
Automate DocuSign e-signature workflows through Composio's DocuSign toolkit via Rube MCP.
Toolkit docs: composio.dev/toolkits/docusign
通过Composio的DocuSign工具包,借助Rube MCP自动化DocuSign电子签名工作流。
Prerequisites
前提条件
- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)
- Active DocuSign connection via with toolkit
RUBE_MANAGE_CONNECTIONSdocusign - Always call first to get current tool schemas
RUBE_SEARCH_TOOLS
- 必须已连接Rube MCP(需提供RUBE_SEARCH_TOOLS)
- 已通过激活DocuSign连接,且工具包为
RUBE_MANAGE_CONNECTIONSdocusign - 请始终先调用以获取最新的工具架构
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_CONNECTIONSdocusign - If connection is not ACTIVE, follow the returned auth link to complete DocuSign OAuth
- Confirm connection status shows ACTIVE before running any workflows
获取Rube MCP:在客户端配置中添加作为MCP服务器。无需API密钥 —— 只需添加端点即可使用。
https://rube.app/mcp- 确认可正常响应,以此验证Rube MCP是否可用
RUBE_SEARCH_TOOLS - 调用并指定工具包为
RUBE_MANAGE_CONNECTIONSdocusign - 如果连接状态未激活,请按照返回的授权链接完成DocuSign OAuth认证
- 在运行任何工作流之前,确认连接状态显示为已激活
Core Workflows
核心工作流
1. Browse and Select Templates
1. 浏览并选择模板
When to use: User wants to find available document templates for sending
Tool sequence:
- - List all available templates [Required]
DOCUSIGN_LIST_ALL_TEMPLATES - - Get detailed template information [Optional]
DOCUSIGN_GET_TEMPLATE
Key parameters:
- For listing: Optional search/filter parameters
- For details: (from list results)
templateId - Response includes template ,
templateId,name, roles, and fieldsdescription
Pitfalls:
- Template IDs are GUIDs (e.g., '12345678-abcd-1234-efgh-123456789012')
- Templates define recipient roles with signing tabs; understand roles before creating envelopes
- Large template libraries require pagination; check for continuation tokens
- Template access depends on account permissions
适用场景:用户想要查找可用于发送的可用文档模板
工具序列:
- - 列出所有可用模板【必填】
DOCUSIGN_LIST_ALL_TEMPLATES - - 获取模板详细信息【可选】
DOCUSIGN_GET_TEMPLATE
关键参数:
- 列出模板:可选的搜索/过滤参数
- 获取详情:(来自列表结果)
templateId - 响应内容包含模板的、
templateId、name、角色和字段description
注意事项:
- 模板ID为GUID格式(例如:'12345678-abcd-1234-efgh-123456789012')
- 模板定义了带有签名字段的收件人角色;创建信封前请先了解角色信息
- 大型模板库需要分页;请检查是否有续传令牌
- 模板访问权限取决于账户权限
2. Create and Send Envelopes from Templates
2. 从模板创建并发送信封
When to use: User wants to send documents for signature using a pre-built template
Tool sequence:
- - Find the template to use [Prerequisite]
DOCUSIGN_LIST_ALL_TEMPLATES - - Review template roles and fields [Optional]
DOCUSIGN_GET_TEMPLATE - - Create the envelope [Required]
DOCUSIGN_CREATE_ENVELOPE_FROM_TEMPLATE - - Send the envelope for signing [Required]
DOCUSIGN_SEND_ENVELOPE
Key parameters:
- For CREATE_ENVELOPE_FROM_TEMPLATE:
- : Template to use
templateId - : Array of role assignments with
templateRoles,roleName,nameemail - : 'created' (draft) or 'sent' (send immediately)
status - : Custom subject line for the signing email
emailSubject - : Custom message in the signing email
emailBlurb
- For SEND_ENVELOPE:
- : Envelope ID from creation response
envelopeId
Pitfalls:
- must match the role names defined in the template exactly (case-sensitive)
templateRoles - Setting to 'sent' during creation sends immediately; use 'created' for drafts
status - If status is 'sent' at creation, no need to call SEND_ENVELOPE separately
- Each role requires at minimum ,
roleName, andnameemail - overrides the template's default email subject
emailSubject
适用场景:用户想要使用预构建模板发送待签名文档
工具序列:
- - 找到要使用的模板【前提条件】
DOCUSIGN_LIST_ALL_TEMPLATES - - 查看模板角色和字段【可选】
DOCUSIGN_GET_TEMPLATE - - 创建信封【必填】
DOCUSIGN_CREATE_ENVELOPE_FROM_TEMPLATE - - 发送信封以待签名【必填】
DOCUSIGN_SEND_ENVELOPE
关键参数:
- 对于CREATE_ENVELOPE_FROM_TEMPLATE:
- :要使用的模板ID
templateId - :角色分配数组,包含
templateRoles、roleName、nameemail - :'created'(草稿)或'sent'(立即发送)
status - :签名邮件的自定义主题
emailSubject - :签名邮件中的自定义消息
emailBlurb
- 对于SEND_ENVELOPE:
- :创建响应中的信封ID
envelopeId
注意事项:
- 必须与模板中定义的角色名称完全匹配(区分大小写)
templateRoles - 创建时将设置为'sent'会立即发送邮件;使用'created'则保存为草稿
status - 如果创建时设为'sent',则无需单独调用SEND_ENVELOPE
status - 每个角色至少需要、
roleName和nameemail - 会覆盖模板的默认邮件主题
emailSubject
3. Monitor Envelope Status
3. 监控信封状态
When to use: User wants to check the status of sent envelopes or track signing progress
Tool sequence:
- - Get envelope details and status [Required]
DOCUSIGN_GET_ENVELOPE
Key parameters:
- : Envelope identifier (GUID)
envelopeId - Response includes ,
status,recipients,sentDateTimecompletedDateTime
Pitfalls:
- Envelope statuses: 'created', 'sent', 'delivered', 'signed', 'completed', 'declined', 'voided'
- 'delivered' means the email was opened, not that the document was signed
- 'completed' means all recipients have signed
- Recipients array shows individual signing status per recipient
- Envelope IDs are GUIDs; always resolve from creation or search results
适用场景:用户想要查看已发送信封的状态或跟踪签名进度
工具序列:
- - 获取信封详情和状态【必填】
DOCUSIGN_GET_ENVELOPE
关键参数:
- :信封标识符(GUID格式)
envelopeId - 响应内容包含、
status、recipients、sentDateTimecompletedDateTime
注意事项:
- 信封状态包括:'created'、'sent'、'delivered'、'signed'、'completed'、'declined'、'voided'
- 'delivered'表示邮件已被打开,而非文档已签名
- 'completed'表示所有收件人已完成签名
- 收件人数组显示每个收件人的单独签名状态
- 信封ID为GUID格式;请始终从创建或搜索结果中获取
4. Add Templates to Existing Envelopes
4. 向现有信封添加模板
When to use: User wants to add additional documents or templates to an existing envelope
Tool sequence:
- - Verify envelope exists and is in draft state [Prerequisite]
DOCUSIGN_GET_ENVELOPE - - Add template to envelope [Required]
DOCUSIGN_ADD_TEMPLATES_TO_DOCUMENT_IN_ENVELOPE
Key parameters:
- : Target envelope ID
envelopeId - : Document ID within the envelope
documentId - : Template to add
templateId
Pitfalls:
- Envelope must be in 'created' (draft) status to add templates
- Cannot add templates to already-sent envelopes
- Document IDs are sequential within an envelope (starting from '1')
- Adding a template merges its fields and roles into the existing envelope
适用场景:用户想要向现有信封添加额外文档或模板
工具序列:
- - 验证信封存在且处于草稿状态【前提条件】
DOCUSIGN_GET_ENVELOPE - - 向信封添加模板【必填】
DOCUSIGN_ADD_TEMPLATES_TO_DOCUMENT_IN_ENVELOPE
关键参数:
- :目标信封ID
envelopeId - :信封内的文档ID
documentId - :要添加的模板ID
templateId
注意事项:
- 信封必须处于'created'(草稿)状态才能添加模板
- 无法向已发送的信封添加模板
- 文档ID在信封内是连续的(从'1'开始)
- 添加模板会将其字段和角色合并到现有信封中
5. Manage Envelope Lifecycle
5. 管理信封生命周期
When to use: User wants to send, void, or manage draft envelopes
Tool sequence:
- - Check current envelope status [Prerequisite]
DOCUSIGN_GET_ENVELOPE - - Send a draft envelope [Optional]
DOCUSIGN_SEND_ENVELOPE
Key parameters:
- : Envelope to manage
envelopeId - For sending: envelope must be in 'created' status with all required recipients
Pitfalls:
- Only 'created' (draft) envelopes can be sent
- Sent envelopes cannot be unsent; they can only be voided
- Voiding an envelope notifies all recipients
- All required recipients must have valid email addresses before sending
适用场景:用户想要发送、作废或管理草稿信封
工具序列:
- - 检查当前信封状态【前提条件】
DOCUSIGN_GET_ENVELOPE - - 发送草稿信封【可选】
DOCUSIGN_SEND_ENVELOPE
关键参数:
- :要管理的信封ID
envelopeId - 发送信封:信封必须处于'created'状态,且所有必填收件人信息完整
注意事项:
- 只有'created'(草稿)状态的信封可以发送
- 已发送的信封无法撤回;只能作废
- 作废信封会通知所有收件人
- 发送前所有必填收件人必须拥有有效的邮箱地址
Common Patterns
常见模式
ID Resolution
ID解析
Template name -> Template ID:
1. Call DOCUSIGN_LIST_ALL_TEMPLATES
2. Find template by name in results
3. Extract templateId (GUID format)Envelope tracking:
1. Store envelopeId from CREATE_ENVELOPE_FROM_TEMPLATE response
2. Call DOCUSIGN_GET_ENVELOPE periodically to check status
3. Check recipient-level status for individual signing progress模板名称 -> 模板ID:
1. 调用DOCUSIGN_LIST_ALL_TEMPLATES
2. 在结果中按名称查找模板
3. 提取templateId(GUID格式)信封跟踪:
1. 存储CREATE_ENVELOPE_FROM_TEMPLATE响应中的envelopeId
2. 定期调用DOCUSIGN_GET_ENVELOPE以检查状态
3. 查看收件人级别的状态以了解单个签名进度Template Role Mapping
模板角色映射
When creating an envelope from a template:
1. Call DOCUSIGN_GET_TEMPLATE to see defined roles
2. Map each role to actual recipients:
{
"roleName": "Signer 1", // Must match template role name exactly
"name": "John Smith",
"email": "john@example.com"
}
3. Include ALL required roles in templateRoles array从模板创建信封时:
1. 调用DOCUSIGN_GET_TEMPLATE查看定义的角色
2. 将每个角色映射到实际收件人:
{
"roleName": "Signer 1", // 必须与模板角色名称完全匹配
"name": "John Smith",
"email": "john@example.com"
}
3. 在templateRoles数组中包含所有必填角色Envelope Status Flow
信封状态流转
created (draft) -> sent -> delivered -> signed -> completed
\-> declined
\-> voided (by sender)created(草稿)-> sent -> delivered -> signed -> completed
\\-> declined
\\-> voided(由发件人操作)Known Pitfalls
已知注意事项
Template Roles:
- Role names are case-sensitive; must match template definition exactly
- All required roles must be assigned when creating an envelope
- Missing role assignments cause envelope creation to fail
Envelope Status:
- 'delivered' means email opened, NOT document signed
- 'completed' is the final successful state (all parties signed)
- Status transitions are one-way; cannot revert to previous states
GUIDs:
- All DocuSign IDs (templates, envelopes) are GUID format
- Always resolve names to GUIDs via list/search endpoints
- Do not hardcode GUIDs; they are unique per account
Rate Limits:
- DocuSign API has per-account rate limits
- Bulk envelope creation should be throttled
- Polling envelope status should use reasonable intervals (30-60 seconds)
Response Parsing:
- Response data may be nested under key
data - Recipient information is nested within envelope response
- Date fields use ISO 8601 format
- Parse defensively with fallbacks for optional fields
模板角色:
- 角色名称区分大小写;必须与模板定义完全匹配
- 创建信封时必须分配所有必填角色
- 缺少角色分配会导致信封创建失败
信封状态:
- 'delivered'表示邮件已打开,而非文档已签名
- 'completed'是最终成功状态(所有相关方已签名)
- 状态流转是单向的;无法恢复到之前的状态
GUID:
- 所有DocuSign ID(模板、信封)均为GUID格式
- 请始终通过列表/搜索端点将名称解析为GUID
- 请勿硬编码GUID;它们在每个账户中都是唯一的
速率限制:
- DocuSign API对每个账户有速率限制
- 批量创建信封时应进行限流
- 轮询信封状态应使用合理的间隔(30-60秒)
响应解析:
- 响应数据可能嵌套在键下
data - 收件人信息嵌套在信封响应中
- 日期字段使用ISO 8601格式
- 解析时应带有防御性处理,为可选字段设置回退值
Quick Reference
快速参考
| Task | Tool Slug | Key Params |
|---|---|---|
| List templates | DOCUSIGN_LIST_ALL_TEMPLATES | (optional filters) |
| Get template | DOCUSIGN_GET_TEMPLATE | templateId |
| Create envelope | DOCUSIGN_CREATE_ENVELOPE_FROM_TEMPLATE | templateId, templateRoles, status |
| Send envelope | DOCUSIGN_SEND_ENVELOPE | envelopeId |
| Get envelope status | DOCUSIGN_GET_ENVELOPE | envelopeId |
| Add template to envelope | DOCUSIGN_ADD_TEMPLATES_TO_DOCUMENT_IN_ENVELOPE | envelopeId, documentId, templateId |
Powered by Composio
| 任务 | 工具标识 | 关键参数 |
|---|---|---|
| 列出模板 | DOCUSIGN_LIST_ALL_TEMPLATES | (可选过滤器) |
| 获取模板详情 | DOCUSIGN_GET_TEMPLATE | templateId |
| 创建信封 | DOCUSIGN_CREATE_ENVELOPE_FROM_TEMPLATE | templateId, templateRoles, status |
| 发送信封 | DOCUSIGN_SEND_ENVELOPE | envelopeId |
| 获取信封状态 | DOCUSIGN_GET_ENVELOPE | envelopeId |
| 向信封添加模板 | DOCUSIGN_ADD_TEMPLATES_TO_DOCUMENT_IN_ENVELOPE | envelopeId, documentId, templateId |
由Composio提供支持