docusign-automation

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

DocuSign Automation via Rube MCP

通过Rube MCP实现DocuSign自动化

Automate DocuSign e-signature workflows through Composio's DocuSign toolkit via Rube MCP.
通过Composio的DocuSign工具包,借助Rube MCP自动化DocuSign电子签名工作流。

Prerequisites

前提条件

  • Rube MCP must be connected (RUBE_SEARCH_TOOLS available)
  • Active DocuSign connection via
    RUBE_MANAGE_CONNECTIONS
    with toolkit
    docusign
  • Always call
    RUBE_SEARCH_TOOLS
    first to get current tool schemas
  • 必须已连接Rube MCP(需提供RUBE_SEARCH_TOOLS)
  • 已通过
    RUBE_MANAGE_CONNECTIONS
    激活DocuSign连接,且工具包为
    docusign
  • 请始终先调用
    RUBE_SEARCH_TOOLS
    以获取最新的工具架构

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
    docusign
  3. If connection is not ACTIVE, follow the returned auth link to complete DocuSign OAuth
  4. Confirm connection status shows ACTIVE before running any workflows
获取Rube MCP:在客户端配置中添加
https://rube.app/mcp
作为MCP服务器。无需API密钥 —— 只需添加端点即可使用。
  1. 确认
    RUBE_SEARCH_TOOLS
    可正常响应,以此验证Rube MCP是否可用
  2. 调用
    RUBE_MANAGE_CONNECTIONS
    并指定工具包为
    docusign
  3. 如果连接状态未激活,请按照返回的授权链接完成DocuSign OAuth认证
  4. 在运行任何工作流之前,确认连接状态显示为已激活

Core Workflows

核心工作流

1. Browse and Select Templates

1. 浏览并选择模板

When to use: User wants to find available document templates for sending
Tool sequence:
  1. DOCUSIGN_LIST_ALL_TEMPLATES
    - List all available templates [Required]
  2. DOCUSIGN_GET_TEMPLATE
    - Get detailed template information [Optional]
Key parameters:
  • For listing: Optional search/filter parameters
  • For details:
    templateId
    (from list results)
  • Response includes template
    templateId
    ,
    name
    ,
    description
    , roles, and fields
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
适用场景:用户想要查找可用于发送的可用文档模板
工具序列
  1. DOCUSIGN_LIST_ALL_TEMPLATES
    - 列出所有可用模板【必填】
  2. 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:
  1. DOCUSIGN_LIST_ALL_TEMPLATES
    - Find the template to use [Prerequisite]
  2. DOCUSIGN_GET_TEMPLATE
    - Review template roles and fields [Optional]
  3. DOCUSIGN_CREATE_ENVELOPE_FROM_TEMPLATE
    - Create the envelope [Required]
  4. DOCUSIGN_SEND_ENVELOPE
    - Send the envelope for signing [Required]
Key parameters:
  • For CREATE_ENVELOPE_FROM_TEMPLATE:
    • templateId
      : Template to use
    • templateRoles
      : Array of role assignments with
      roleName
      ,
      name
      ,
      email
    • status
      : 'created' (draft) or 'sent' (send immediately)
    • emailSubject
      : Custom subject line for the signing email
    • emailBlurb
      : Custom message in the signing email
  • For SEND_ENVELOPE:
    • envelopeId
      : Envelope ID from creation response
Pitfalls:
  • templateRoles
    must match the role names defined in the template exactly (case-sensitive)
  • Setting
    status
    to 'sent' during creation sends immediately; use 'created' for drafts
  • If status is 'sent' at creation, no need to call SEND_ENVELOPE separately
  • Each role requires at minimum
    roleName
    ,
    name
    , and
    email
  • emailSubject
    overrides the template's default email subject
适用场景:用户想要使用预构建模板发送待签名文档
工具序列
  1. DOCUSIGN_LIST_ALL_TEMPLATES
    - 找到要使用的模板【前提条件】
  2. DOCUSIGN_GET_TEMPLATE
    - 查看模板角色和字段【可选】
  3. DOCUSIGN_CREATE_ENVELOPE_FROM_TEMPLATE
    - 创建信封【必填】
  4. DOCUSIGN_SEND_ENVELOPE
    - 发送信封以待签名【必填】
关键参数
  • 对于CREATE_ENVELOPE_FROM_TEMPLATE:
    • templateId
      :要使用的模板ID
    • templateRoles
      :角色分配数组,包含
      roleName
      name
      email
    • status
      :'created'(草稿)或'sent'(立即发送)
    • emailSubject
      :签名邮件的自定义主题
    • emailBlurb
      :签名邮件中的自定义消息
  • 对于SEND_ENVELOPE:
    • envelopeId
      :创建响应中的信封ID
注意事项
  • templateRoles
    必须与模板中定义的角色名称完全匹配(区分大小写)
  • 创建时将
    status
    设置为'sent'会立即发送邮件;使用'created'则保存为草稿
  • 如果创建时
    status
    设为'sent',则无需单独调用SEND_ENVELOPE
  • 每个角色至少需要
    roleName
    name
    email
  • emailSubject
    会覆盖模板的默认邮件主题

3. Monitor Envelope Status

3. 监控信封状态

When to use: User wants to check the status of sent envelopes or track signing progress
Tool sequence:
  1. DOCUSIGN_GET_ENVELOPE
    - Get envelope details and status [Required]
Key parameters:
  • envelopeId
    : Envelope identifier (GUID)
  • Response includes
    status
    ,
    recipients
    ,
    sentDateTime
    ,
    completedDateTime
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
适用场景:用户想要查看已发送信封的状态或跟踪签名进度
工具序列
  1. DOCUSIGN_GET_ENVELOPE
    - 获取信封详情和状态【必填】
关键参数
  • envelopeId
    :信封标识符(GUID格式)
  • 响应内容包含
    status
    recipients
    sentDateTime
    completedDateTime
注意事项
  • 信封状态包括:'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:
  1. DOCUSIGN_GET_ENVELOPE
    - Verify envelope exists and is in draft state [Prerequisite]
  2. DOCUSIGN_ADD_TEMPLATES_TO_DOCUMENT_IN_ENVELOPE
    - Add template to envelope [Required]
Key parameters:
  • envelopeId
    : Target envelope ID
  • documentId
    : Document ID within the envelope
  • templateId
    : Template to add
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
适用场景:用户想要向现有信封添加额外文档或模板
工具序列
  1. DOCUSIGN_GET_ENVELOPE
    - 验证信封存在且处于草稿状态【前提条件】
  2. DOCUSIGN_ADD_TEMPLATES_TO_DOCUMENT_IN_ENVELOPE
    - 向信封添加模板【必填】
关键参数
  • envelopeId
    :目标信封ID
  • documentId
    :信封内的文档ID
  • templateId
    :要添加的模板ID
注意事项
  • 信封必须处于'created'(草稿)状态才能添加模板
  • 无法向已发送的信封添加模板
  • 文档ID在信封内是连续的(从'1'开始)
  • 添加模板会将其字段和角色合并到现有信封中

5. Manage Envelope Lifecycle

5. 管理信封生命周期

When to use: User wants to send, void, or manage draft envelopes
Tool sequence:
  1. DOCUSIGN_GET_ENVELOPE
    - Check current envelope status [Prerequisite]
  2. DOCUSIGN_SEND_ENVELOPE
    - Send a draft envelope [Optional]
Key parameters:
  • envelopeId
    : Envelope to manage
  • 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
适用场景:用户想要发送、作废或管理草稿信封
工具序列
  1. DOCUSIGN_GET_ENVELOPE
    - 检查当前信封状态【前提条件】
  2. DOCUSIGN_SEND_ENVELOPE
    - 发送草稿信封【可选】
关键参数
  • envelopeId
    :要管理的信封ID
  • 发送信封:信封必须处于'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
    data
    key
  • 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

快速参考

TaskTool SlugKey Params
List templatesDOCUSIGN_LIST_ALL_TEMPLATES(optional filters)
Get templateDOCUSIGN_GET_TEMPLATEtemplateId
Create envelopeDOCUSIGN_CREATE_ENVELOPE_FROM_TEMPLATEtemplateId, templateRoles, status
Send envelopeDOCUSIGN_SEND_ENVELOPEenvelopeId
Get envelope statusDOCUSIGN_GET_ENVELOPEenvelopeId
Add template to envelopeDOCUSIGN_ADD_TEMPLATES_TO_DOCUMENT_IN_ENVELOPEenvelopeId, documentId, templateId

Powered by Composio
任务工具标识关键参数
列出模板DOCUSIGN_LIST_ALL_TEMPLATES(可选过滤器)
获取模板详情DOCUSIGN_GET_TEMPLATEtemplateId
创建信封DOCUSIGN_CREATE_ENVELOPE_FROM_TEMPLATEtemplateId, templateRoles, status
发送信封DOCUSIGN_SEND_ENVELOPEenvelopeId
获取信封状态DOCUSIGN_GET_ENVELOPEenvelopeId
向信封添加模板DOCUSIGN_ADD_TEMPLATES_TO_DOCUMENT_IN_ENVELOPEenvelopeId, documentId, templateId

Composio提供支持