0

我正在使用 Power Automate 将文档从共享点列表传递到 Docusign,以便通过以下文档的 API 进行签名:https ://www.docusign.com.au/blog/get-the-flow-sending-docusign-envelopes-microsoft -动力自动化. 这些文件不是标准模板,文件可以包含任何内容,除了用于姓名、头衔和公司详细信息的标准“签名栏”,以及签署人的签名和日期。其中每一个在传递给 Docusign 的文档中都有一个 Autoplace 占位符(标签)。我已将 DocuSign 中“名称”、“标题”和“公司”字段的“文档自定义字段”配置为“文本字段”,其中定义了与正在传递的文档中的 AutoPlace 标签对齐的 AutoPlace 标签。在查看文档以在 DocuSign 中签名时,这些字段会出现在 DocuSign 文档中,但不会填充。

如何使用 API 为这些字段传递数据值?

这是 Power Automate 自定义连接器中 Swagger 代码的收件人部分。

        schema:
          type: object
          properties:
            documents:
              type: array
              items:
                type: object
                properties:
                  documentBase64: {type: string, description: documentBase64}
                  documentId: {type: string, description: documentId}
                  fileExtension: {type: string, description: fileExtension}
                  name: {type: string, description: name}
                  order: {type: string, description: order}
              description: documents
            emailSubject: {type: string, description: emailSubject}
            emailBlurb: {type: string, description: emailBlurb}
            recipients:
              type: object
              properties:
                signers:
                  type: array
                  items:
                    type: object
                    properties:
                      email: {type: string, description: email}
                      name: {type: string, description: name}
                      title: {type: string, description: title}
                      company: {type: string, description: company}
                      recipientId: {type: string, description: recipientId}
                      roleName: {type: string, description: roleName}
                      routingOrder: {type: string, description: routingOrder}
                  description: signers
              description: recipients
            status: {type: string, description: status}
4

1 回答 1

0

答案是使用 textTabs,而不是自定义字段。textTabs 是“选项卡”的属性,它是“收件人”的属性,而不是“文档”的属性。遵循此文档:https ://developers.docusign.com/docs/esign-rest-api/how-to/set-envelope-tab-values/我能够为 DocuSign 自定义连接器创建一个招摇的“收件人”架构,它提供了对选项卡的相当重要的控制,包括字体样式、锚点偏移等。然后在 Power Automate (Flow) 中,您可以根据需要使用尽可能多的 textTabs(字段)构建 JSON。只需确保文档中的占位符与 json 中的“anchorString”属性匹配(这让我追了一段时间的错误!)。

新架构:

            recipients:
              type: object
              properties:
                signers:
                  type: array
                  items:
                    type: object
                    properties:
                      email: {type: string, description: email}
                      name: {type: string, description: name}
                      recipientId: {type: string, description: recipientId}
                      roleName: {type: string, description: roleName}
                      routingOrder: {type: string, description: routingOrder}
                      tabs:
                        type: object
                        properties:
                          textTabs:
                            type: array
                            items:
                              type: object
                              properties:
                                anchorString: {type: string, description: anchorString}
                                anchorUnits: {type: string, description: anchorUnits}
                                anchorXOffset: {type: string, description: anchorXOffset}
                                anchorYOffset: {type: string, description: anchorYOffset}
                                bold: {type: string, description: bold}
                                font: {type: string, description: font}
                                fontSize: {type: string, description: fontSize}
                                locked: {type: string, description: locked}
                                tabId: {type: string, description: tabId}
                                tabLabel: {type: string, description: tabLabel}
                                value: {type: string, description: value}
                            description: textTabs
                        description: tabs
                  description: signers
              description: recipients

使用 DocuSign 指南创建连接器时,在“定义”选项卡上的“从样本导入”中导入 DocuSign 自定义连接器:https ://www.docusign.com.au/blog/get-the-flow-sending -docusign-envelopes-microsoft-power-automate,您可以将以下内容导入'body:

{
    "documents": [
      {
        "documentBase64": "[variable]",
        "documentId": "1",
        "fileExtension": "txt",
        "name": "Doc1",
        "order": "1"
      }
    ],
    "emailSubject": "Test Envelope 1",
    "emailBlurb": "This is the email body",
    "recipients": {
      "signers": [
        {
          "email": "[enter signer email address]",
          "name": "[enter signer name]",
          "title": "[enter signer title]",
          "company": "[enter signer company name]",
          "recipientId": "1",
          "roleName": "Signer 1",
          "routingOrder": "1",
            "tabs": {
              "textTabs": [
                {
                "anchorString": "/sn1/",
                "anchorUnits": "pixels",
                "anchorXOffset": "5",
                "anchorYOffset": "-9",
                "bold": "true",
                "font": "helvetica",
                "fontSize": "size11",
                "locked": "false",
                "tabId": "signer1_name",
                "tabLabel": "Signer1 Name",
                "value": ""
              }
            ]
          }
        }
      ]
    },
    "status": "sent"
  }
于 2022-01-18T00:47:13.393 回答