8
n8n 中文网amn8n.com

使用Google Sheets、Slides

中级

这是一个Miscellaneous, Multimodal AI领域的自动化工作流,包含 8 个节点。主要使用 Gmail, GoogleDrive, GoogleSlides, GoogleSheetsTrigger 等节点。 使用Google Sheets、Slides、PDF和Gmail投递的自动证书生成器

前置要求
  • Google 账号和 Gmail API 凭证
  • Google Drive API 凭证
  • Google Sheets API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "name": "创建证书",
  "tags": [],
  "nodes": [
    {
      "id": "node1",
      "name": "Google Sheets触发器",
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "notes": "Getting data from sheets",
      "position": [
        0,
        0
      ],
      "parameters": {
        "event": "rowAdded",
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "YOUR_GOOGLE_SHEET_URL#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": "YOUR_GOOGLE_SHEET_URL"
        }
      },
      "credentials": {
        "googleSheetsTriggerOAuth2Api": {
          "id": "YOUR_CREDENTIAL_ID",
          "name": "Google Sheets Trigger account"
        }
      },
      "notesInFlow": true,
      "typeVersion": 1
    },
    {
      "id": "node2",
      "name": "复制文件",
      "type": "n8n-nodes-base.googleDrive",
      "notes": "Copy certificate template",
      "position": [
        208,
        0
      ],
      "parameters": {
        "name": "={{ $json.Name }} Certificate",
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "YOUR_SLIDES_TEMPLATE_ID"
        },
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "url",
          "value": "YOUR_TARGET_FOLDER_URL"
        },
        "operation": "copy",
        "sameFolder": false
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "YOUR_CREDENTIAL_ID",
          "name": "Google Drive account"
        }
      },
      "notesInFlow": true,
      "typeVersion": 3
    },
    {
      "id": "node3",
      "name": "替换演示文稿中的文本",
      "type": "n8n-nodes-base.googleSlides",
      "notes": "Change text",
      "position": [
        416,
        0
      ],
      "parameters": {
        "textUi": {
          "textValues": [
            {
              "text": "[NAME]",
              "replaceText": "={{ $('Google Sheets Trigger').item.json.Name }}",
              "pageObjectIds": [
                "p1"
              ]
            }
          ]
        },
        "options": {},
        "operation": "replaceText",
        "presentationId": "={{ $json.id }}"
      },
      "credentials": {
        "googleSlidesOAuth2Api": {
          "id": "YOUR_CREDENTIAL_ID",
          "name": "Google Slides account"
        }
      },
      "notesInFlow": true,
      "typeVersion": 2
    },
    {
      "id": "node4",
      "name": "下载文件",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        624,
        0
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.presentationId }}"
        },
        "options": {
          "fileName": "={{ $('Google Sheets Trigger').item.json.Name }} Certificate",
          "googleFileConversion": {
            "conversion": {
              "slidesToFormat": "application/pdf"
            }
          }
        },
        "operation": "download"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "YOUR_CREDENTIAL_ID",
          "name": "Google Drive account"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "node5",
      "name": "上传文件",
      "type": "n8n-nodes-base.googleDrive",
      "notes": "Saving PDFs",
      "position": [
        864,
        192
      ],
      "parameters": {
        "name": "={{ $('Google Sheets Trigger').item.json.Name }} Certificate.pdf",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "url",
          "value": "YOUR_FINAL_PDF_FOLDER_URL"
        }
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "YOUR_CREDENTIAL_ID",
          "name": "Google Drive account"
        }
      },
      "notesInFlow": true,
      "typeVersion": 3
    },
    {
      "id": "node6",
      "name": "删除文件",
      "type": "n8n-nodes-base.googleDrive",
      "notes": "Deleting temporary PPT",
      "position": [
        1152,
        176
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Replace text in a presentation').item.json.presentationId }}"
        },
        "options": {},
        "operation": "deleteFile"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "YOUR_CREDENTIAL_ID",
          "name": "Google Drive account"
        }
      },
      "notesInFlow": true,
      "typeVersion": 3
    },
    {
      "id": "node7",
      "name": "发送消息",
      "type": "n8n-nodes-base.gmail",
      "position": [
        864,
        16
      ],
      "parameters": {
        "sendTo": "={{ $('Google Sheets Trigger').item.json.Email }}",
        "message": "=Dear {{ $('Google Sheets Trigger').item.json.Name }},\nCongratulations on completing the program 🎉.\nPlease find your certificate attached.\n\nBest regards,\nYour Team",
        "options": {
          "attachmentsUi": {
            "attachmentsBinary": [
              {
                "property": "data"
              }
            ]
          }
        },
        "subject": "Your Certificate",
        "emailType": "text"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "YOUR_CREDENTIAL_ID",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "note1",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        784
      ],
      "parameters": {
        "width": 752,
        "height": 1008,
        "content": "## 工作流指南:自动证书生成器 🎓"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "connections": {
    "node2": {
      "main": [
        [
          {
            "node": "node3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "node5": {
      "main": [
        [
          {
            "node": "node6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "node4": {
      "main": [
        [
          {
            "node": "node7",
            "type": "main",
            "index": 0
          },
          {
            "node": "node5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "node1": {
      "main": [
        [
          {
            "node": "node2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "node3": {
      "main": [
        [
          {
            "node": "node4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 杂项, 多模态 AI

需要付费吗?

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

工作流信息
难度等级
中级
节点数量8
分类2
节点类型5
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

外部链接
在 n8n.io 查看

分享此工作流

分类

分类: 34