8
n8n 中文网amn8n.com

使用 Typeform、Google Docs 和 Gmail 生成并发送合同文档

初级

这是一个Document Extraction领域的自动化工作流,包含 5 个节点。主要使用 Set, Gmail, GoogleDocs, GoogleDrive, TypeformTrigger 等节点。 使用 Typeform、Google Docs 和 Gmail 生成并发送合同文档

前置要求
  • Google 账号和 Gmail API 凭证
  • Google Drive API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移

无法加载工作流预览

导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "nodes": [
    {
      "name": "Typeform触发器",
      "type": "n8n-nodes-base.typeformTrigger",
      "position": [
        100,
        300
      ],
      "parameters": {
        "formId": "your-form-id"
      },
      "credentials": {
        "typeformApi": "Typeform API"
      },
      "typeVersion": 1
    },
    {
      "name": "设置变量",
      "type": "n8n-nodes-base.set",
      "position": [
        300,
        300
      ],
      "parameters": {
        "values": {
          "string": [
            {
              "name": "client_name",
              "value": "={{$json[\"answers\"][0].text}}"
            },
            {
              "name": "project_scope",
              "value": "={{$json[\"answers\"][1].text}}"
            },
            {
              "name": "deadline",
              "value": "={{$json[\"answers\"][2].text}}"
            },
            {
              "name": "email",
              "value": "={{$json[\"answers\"][3].email}}"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "name": "填写合同模板",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        500,
        300
      ],
      "parameters": {
        "mode": "template",
        "fields": [
          {
            "name": "{{client_name}}",
            "value": "={{$json[\"client_name\"]}}"
          },
          {
            "name": "{{project_scope}}",
            "value": "={{$json[\"project_scope\"]}}"
          },
          {
            "name": "{{deadline}}",
            "value": "={{$json[\"deadline\"]}}"
          }
        ],
        "documentId": "your-template-id"
      },
      "credentials": {
        "googleApi": "Google API"
      },
      "typeVersion": 1
    },
    {
      "name": "导出为PDF",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        700,
        300
      ],
      "parameters": {
        "fileId": "={{$node[\"Fill Contract Template\"].json[\"documentId\"]}}",
        "mimeType": "application/pdf",
        "operation": "export"
      },
      "credentials": {
        "googleApi": "Google API"
      },
      "typeVersion": 1
    },
    {
      "name": "通过邮件发送",
      "type": "n8n-nodes-base.gmail",
      "position": [
        900,
        300
      ],
      "parameters": {
        "text": "Hi {{$json[\"client_name\"]}},\n\nPlease find attached your contract.\n\nRegards,\nYour Company",
        "subject": "Your Contract",
        "toEmail": "={{$json[\"email\"]}}",
        "fromEmail": "your-email@example.com",
        "attachments": [
          {
            "binaryPropertyName": "data"
          }
        ]
      },
      "credentials": {
        "gmailOAuth2": "Gmail OAuth"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Export as PDF": {
      "main": [
        [
          {
            "node": "Send via Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Variables": {
      "main": [
        [
          {
            "node": "Fill Contract Template",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Typeform Trigger": {
      "main": [
        [
          {
            "node": "Set Variables",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fill Contract Template": {
      "main": [
        [
          {
            "node": "Export as PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

初级 - 文档提取

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
初级
节点数量5
分类1
节点类型5
难度说明

适合 n8n 新手,包含 1-5 个节点的简单工作流

作者
Abbas Ali

Abbas Ali

@abbas12142

Automation Engineer passionate about building smart, scalable workflows with n8n. I specialize in API integrations, webhook handling, and streamlining business tasks using low-code tools. From AI-powered bots to real-time data pipelines, I love solving problems with automation. Let’s turn manual processes into efficient systems!

外部链接
在 n8n.io 查看

分享此工作流