使用Gmail提醒和Google表格自动化活动注册与跟进
中级
这是一个Social Media领域的自动化工作流,包含 14 个节点。主要使用 If, Set, Code, Wait, Gmail 等节点。 使用Gmail提醒和Google表格自动化活动注册与跟进
前置要求
- •Google 账号和 Gmail API 凭证
- •HTTP Webhook 端点(n8n 会自动生成)
- •Google Sheets API 凭证
分类
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"nodes": [
{
"id": "1",
"name": "事件注册 Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
240,
300
],
"parameters": {
"path": "event-registration",
"options": {},
"httpMethod": "POST"
},
"typeVersion": 1
},
{
"id": "2",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
140,
180
],
"parameters": {
"width": 240,
"height": 160,
"content": "## 事件管理配置"
},
"typeVersion": 1
},
{
"id": "3",
"name": "事件设置",
"type": "n8n-nodes-base.set",
"position": [
440,
300
],
"parameters": {
"values": {
"number": [
{
"name": "maxCapacity",
"value": 100
}
],
"string": [
{
"name": "eventDate",
"value": "2025-07-25T14:00:00Z"
},
{
"name": "eventEndDate",
"value": "2025-07-25T16:00:00Z"
}
]
}
},
"typeVersion": 1
},
{
"id": "4",
"name": "验证注册",
"type": "n8n-nodes-base.if",
"position": [
640,
300
],
"parameters": {
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"operator": {
"type": "string",
"operation": "isNotEmpty"
},
"leftValue": "={{ $json.email }}",
"rightValue": ""
},
{
"operator": {
"type": "string",
"operation": "isNotEmpty"
},
"leftValue": "={{ $json.name }}",
"rightValue": ""
},
{
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json.email }}",
"rightValue": "@"
}
]
}
},
"typeVersion": 2
},
{
"id": "5",
"name": "处理注册",
"type": "n8n-nodes-base.code",
"position": [
840,
300
],
"parameters": {
"jsCode": "// Process registration and generate unique details\nconst registration = $json;\nconst eventSettings = $node['Event Settings'].json;\n\n// Generate unique registration ID\nconst registrationId = `REG_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;\n\n// Calculate reminder dates\nconst eventDate = new Date(eventSettings.eventDate);\nconst reminderDates = {\n weekBefore: new Date(eventDate.getTime() - 7 * 24 * 60 * 60 * 1000).toISOString(),\n dayBefore: new Date(eventDate.getTime() - 24 * 60 * 60 * 1000).toISOString(),\n twoHoursBefore: new Date(eventDate.getTime() - 2 * 60 * 60 * 1000).toISOString()\n};\n\n// Generate calendar event data\nconst calendarEvent = {\n summary: eventSettings.eventTitle,\n start: eventSettings.eventDate,\n end: eventSettings.eventEndDate,\n location: eventSettings.eventLocation,\n description: `Vous êtes inscrit(e) à ${eventSettings.eventTitle}. Détails: ${eventSettings.eventLocation}`\n};\n\n// Create access credentials for online events\nconst accessCredentials = {\n meetingId: eventSettings.eventLocation.includes('zoom') ? 'ID: 123 456 789' : null,\n accessCode: Math.random().toString(36).substr(2, 8).toUpperCase()\n};\n\nreturn {\n ...registration,\n registrationId,\n eventDetails: eventSettings,\n reminderDates,\n calendarEvent,\n accessCredentials,\n registeredAt: new Date().toISOString(),\n status: 'confirmed'\n};"
},
"typeVersion": 1
},
{
"id": "6",
"name": "发送确认邮件",
"type": "n8n-nodes-base.gmail",
"position": [
1040,
300
],
"parameters": {
"sendTo": "={{ $json.email }}",
"message": "=<!DOCTYPE html>\n<html>\n<head>\n <style>\n body { font-family: Arial, sans-serif; margin: 20px; background-color: #f8f9fa; }\n .container { max-width: 600px; margin: 0 auto; background: white; padding: 30px; border-radius: 10px; }\n .header { text-align: center; margin-bottom: 30px; background: #007bff; color: white; padding: 20px; border-radius: 8px; }\n .event-details { background: #e8f4f8; padding: 20px; margin: 20px 0; border-radius: 8px; }\n .access-info { background: #d4edda; padding: 15px; margin: 15px 0; border-radius: 5px; border-left: 4px solid #28a745; }\n .calendar-button { background: #28a745; color: white; padding: 15px 30px; text-decoration: none; border-radius: 5px; display: inline-block; margin: 20px 0; }\n .next-steps { background: #fff3cd; padding: 15px; margin: 15px 0; border-radius: 5px; border-left: 4px solid #ffc107; }\n </style>\n</head>\n<body>\n <div class=\"container\">\n <div class=\"header\">\n <h2>🎉 Inscription Confirmée !</h2>\n <p>Merci {{ $json.name }}, votre place est réservée</p>\n </div>\n \n <div class=\"event-details\">\n <h3>📅 Détails de l'Événement</h3>\n <p><strong>Titre:</strong> {{ $json.eventDetails.eventTitle }}</p>\n <p><strong>Date:</strong> {{ new Date($json.eventDetails.eventDate).toLocaleDateString('fr-FR', { \n weekday: 'long', \n year: 'numeric', \n month: 'long', \n day: 'numeric', \n hour: '2-digit', \n minute: '2-digit' \n }) }}</p>\n <p><strong>Durée:</strong> 2 heures</p>\n <p><strong>Format:</strong> En ligne</p>\n <p><strong>Lieu:</strong> {{ $json.eventDetails.eventLocation }}</p>\n </div>\n \n {{#if $json.accessCredentials.meetingId}}\n <div class=\"access-info\">\n <h3>🔑 Informations d'Accès</h3>\n <p><strong>Lien de connexion:</strong> {{ $json.eventDetails.eventLocation }}</p>\n <p><strong>{{ $json.accessCredentials.meetingId }}</strong></p>\n <p><strong>Code d'accès:</strong> {{ $json.accessCredentials.accessCode }}</p>\n </div>\n {{/if}}\n \n <div style=\"text-align: center;\">\n <a href=\"data:text/calendar;charset=utf8,BEGIN:VCALENDAR\nVERSION:2.0\nBEGIN:VEVENT\nDTSTART:{{ $json.calendarEvent.start }}\nDTEND:{{ $json.calendarEvent.end }}\nSUMMARY:{{ $json.calendarEvent.summary }}\nLOCATION:{{ $json.calendarEvent.location }}\nDESCRIPTION:{{ $json.calendarEvent.description }}\nEND:VEVENT\nEND:VCALENDAR\" class=\"calendar-button\">\n 📅 Ajouter à mon calendrier\n </a>\n </div>\n \n <div class=\"next-steps\">\n <h3>📋 Prochaines Étapes</h3>\n <ul>\n <li>Vous recevrez un rappel 7 jours avant l'événement</li>\n <li>Un email de rappel sera envoyé la veille</li>\n <li>Les liens de connexion seront rappelés 2h avant</li>\n <li>Préparez vos questions pour la session Q&A</li>\n </ul>\n </div>\n \n <p style=\"color: #666; font-size: 14px; margin-top: 30px;\">\n ID de réservation: {{ $json.registrationId }}<br>\n Pour toute question: {{ $json.eventDetails.organizerEmail }}\n </p>\n </div>\n</body>\n</html>",
"options": {
"contentType": "html"
},
"subject": "✅ Confirmation d'inscription - {{ $json.eventDetails.eventTitle }}"
},
"typeVersion": 1
},
{
"id": "7",
"name": "等待至一周前",
"type": "n8n-nodes-base.wait",
"position": [
1240,
200
],
"parameters": {
"unit": "days",
"amount": 7,
"resume": "={{ $json.reminderDates.weekBefore }}"
},
"typeVersion": 1
},
{
"id": "8",
"name": "发送周提醒",
"type": "n8n-nodes-base.gmail",
"position": [
1440,
200
],
"parameters": {
"sendTo": "={{ $json.email }}",
"message": "=<!DOCTYPE html>\n<html>\n<head>\n <style>\n body { font-family: Arial, sans-serif; margin: 20px; background-color: #f8f9fa; }\n .container { max-width: 600px; margin: 0 auto; background: white; padding: 30px; border-radius: 10px; }\n .reminder-header { text-align: center; margin-bottom: 30px; background: #ffc107; color: #212529; padding: 20px; border-radius: 8px; }\n .countdown { background: #e9ecef; padding: 20px; margin: 20px 0; border-radius: 8px; text-align: center; }\n .agenda { background: #f8f9fa; padding: 15px; margin: 15px 0; border-radius: 5px; }\n .preparation { background: #d1ecf1; padding: 15px; margin: 15px 0; border-radius: 5px; border-left: 4px solid #17a2b8; }\n </style>\n</head>\n<body>\n <div class=\"container\">\n <div class=\"reminder-header\">\n <h2>⏰ Rappel - Plus qu'une semaine !</h2>\n <p>{{ $json.eventDetails.eventTitle }}</p>\n </div>\n \n <div class=\"countdown\">\n <h3>🗓️ Dans 7 jours</h3>\n <p>{{ new Date($json.eventDetails.eventDate).toLocaleDateString('fr-FR', { \n weekday: 'long', \n year: 'numeric', \n month: 'long', \n day: 'numeric', \n hour: '2-digit', \n minute: '2-digit' \n }) }}</p>\n </div>\n \n <div class=\"agenda\">\n <h3>📋 Programme de la Session</h3>\n <ul>\n <li>14h00 - 14h15 : Accueil et présentation</li>\n <li>14h15 - 15h00 : Présentation principale</li>\n <li>15h00 - 15h15 : Pause</li>\n <li>15h15 - 15h45 : Démonstration pratique</li>\n <li>15h45 - 16h00 : Questions & réponses</li>\n </ul>\n </div>\n \n <div class=\"preparation\">\n <h3>🎯 Comment bien se préparer</h3>\n <ul>\n <li>Testez votre connexion internet</li>\n <li>Préparez vos questions à l'avance</li>\n <li>Ayez un carnet pour prendre des notes</li>\n <li>Rejoignez-nous 5 minutes avant le début</li>\n </ul>\n </div>\n \n <p style=\"color: #666; font-size: 14px; margin-top: 30px;\">\n Lien de connexion: {{ $json.eventDetails.eventLocation }}<br>\n Code d'accès: {{ $json.accessCredentials.accessCode }}\n </p>\n </div>\n</body>\n</html>",
"options": {
"contentType": "html"
},
"subject": "📅 Rappel - {{ $json.eventDetails.eventTitle }} dans 7 jours"
},
"typeVersion": 1
},
{
"id": "9",
"name": "等待至前一天",
"type": "n8n-nodes-base.wait",
"position": [
1640,
200
],
"parameters": {
"unit": "days",
"amount": 6,
"resume": "={{ $json.reminderDates.dayBefore }}"
},
"typeVersion": 1
},
{
"id": "10",
"name": "发送前一天提醒",
"type": "n8n-nodes-base.gmail",
"position": [
1840,
200
],
"parameters": {
"sendTo": "={{ $json.email }}",
"message": "=<!DOCTYPE html>\n<html>\n<head>\n <style>\n body { font-family: Arial, sans-serif; margin: 20px; background-color: #f8f9fa; }\n .container { max-width: 600px; margin: 0 auto; background: white; padding: 30px; border-radius: 10px; }\n .urgent-reminder { text-align: center; margin-bottom: 30px; background: #dc3545; color: white; padding: 20px; border-radius: 8px; }\n .quick-access { background: #d4edda; padding: 20px; margin: 20px 0; border-radius: 8px; border-left: 4px solid #28a745; }\n .final-details { background: #fff3cd; padding: 15px; margin: 15px 0; border-radius: 5px; border-left: 4px solid #ffc107; }\n </style>\n</head>\n<body>\n <div class=\"container\">\n <div class=\"urgent-reminder\">\n <h2>🚨 C'est demain !</h2>\n <p>{{ $json.eventDetails.eventTitle }}</p>\n <h3>{{ new Date($json.eventDetails.eventDate).toLocaleDateString('fr-FR', { \n hour: '2-digit', \n minute: '2-digit' \n }) }}</h3>\n </div>\n \n <div class=\"quick-access\">\n <h3>🔗 Accès Rapide</h3>\n <p><strong>Lien direct:</strong> <a href=\"{{ $json.eventDetails.eventLocation }}\">Cliquez ici pour rejoindre</a></p>\n <p><strong>Code d'accès:</strong> {{ $json.accessCredentials.accessCode }}</p>\n <p><strong>Sauvegardez ce lien</strong> pour un accès rapide demain</p>\n </div>\n \n <div class=\"final-details\">\n <h3>✅ Checklist Finale</h3>\n <ul>\n <li>📱 Notifications activées</li>\n <li>🎧 Audio/micro testés</li>\n <li>📝 Questions préparées</li>\n <li>☕ Café/thé prêt</li>\n <li>🚪 Rejoindre 5 min avant</li>\n </ul>\n </div>\n \n <p style=\"color: #666; font-size: 14px; margin-top: 30px;\">\n Vous recevrez un dernier rappel 2h avant l'événement.<br>\n Hâte de vous voir demain ! 🎉\n </p>\n </div>\n</body>\n</html>",
"options": {
"contentType": "html"
},
"subject": "🚨 Demain - {{ $json.eventDetails.eventTitle }} - Dernières infos"
},
"typeVersion": 1
},
{
"id": "11",
"name": "等待至 2 小时前",
"type": "n8n-nodes-base.wait",
"position": [
2040,
200
],
"parameters": {
"unit": "hours",
"amount": 22,
"resume": "={{ $json.reminderDates.twoHoursBefore }}"
},
"typeVersion": 1
},
{
"id": "12",
"name": "发送最终提醒",
"type": "n8n-nodes-base.gmail",
"position": [
2240,
200
],
"parameters": {
"sendTo": "={{ $json.email }}",
"message": "=<!DOCTYPE html>\n<html>\n<head>\n <style>\n body { font-family: Arial, sans-serif; margin: 20px; background-color: #f8f9fa; }\n .container { max-width: 600px; margin: 0 auto; background: white; padding: 30px; border-radius: 10px; }\n .final-call { text-align: center; margin-bottom: 30px; background: #28a745; color: white; padding: 20px; border-radius: 8px; }\n .join-now { background: #007bff; color: white; padding: 20px 40px; text-decoration: none; border-radius: 5px; display: inline-block; margin: 20px 0; font-size: 18px; font-weight: bold; }\n </style>\n</head>\n<body>\n <div class=\"container\">\n <div class=\"final-call\">\n <h2>🏁 C'est l'heure !</h2>\n <p>{{ $json.eventDetails.eventTitle }}</p>\n <h3>Dans 2 heures</h3>\n </div>\n \n <div style=\"text-align: center;\">\n <a href=\"{{ $json.eventDetails.eventLocation }}\" class=\"join-now\">\n 🚀 Rejoindre maintenant\n </a>\n </div>\n \n <p style=\"text-align: center; color: #666; font-size: 14px; margin-top: 30px;\">\n Code d'accès: {{ $json.accessCredentials.accessCode }}<br>\n À tout de suite ! 🎉\n </p>\n </div>\n</body>\n</html>",
"options": {
"contentType": "html"
},
"subject": "🏁 MAINTENANT - {{ $json.eventDetails.eventTitle }} commence dans 2h"
},
"typeVersion": 1
},
{
"id": "13",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
2140,
60
],
"parameters": {
"width": 240,
"height": 160,
"content": "## 活动后跟进"
},
"typeVersion": 1
},
{
"id": "14",
"name": "追踪注册",
"type": "n8n-nodes-base.googleSheets",
"position": [
1040,
450
],
"parameters": {
"values": {
"values": [
"={{ $json.registrationId }}",
"={{ $json.name }}",
"={{ $json.email }}",
"={{ $json.company }}",
"={{ $json.eventDetails.eventTitle }}",
"={{ $json.registeredAt }}",
"={{ $json.status }}"
]
},
"resource": "sheet",
"operation": "appendRow",
"sheetName": "Event Registrations",
"documentId": "your-google-sheet-id"
},
"typeVersion": 1
}
],
"connections": {
"1": {
"main": [
[
{
"node": "3",
"type": "main",
"index": 0
}
]
]
},
"3": {
"main": [
[
{
"node": "4",
"type": "main",
"index": 0
}
]
]
},
"4": {
"main": [
[
{
"node": "5",
"type": "main",
"index": 0
}
]
]
},
"5": {
"main": [
[
{
"node": "6",
"type": "main",
"index": 0
},
{
"node": "14",
"type": "main",
"index": 0
}
]
]
},
"6": {
"main": [
[
{
"node": "7",
"type": "main",
"index": 0
}
]
]
},
"7": {
"main": [
[
{
"node": "8",
"type": "main",
"index": 0
}
]
]
},
"8": {
"main": [
[
{
"node": "9",
"type": "main",
"index": 0
}
]
]
},
"9": {
"main": [
[
{
"node": "10",
"type": "main",
"index": 0
}
]
]
},
"10": {
"main": [
[
{
"node": "11",
"type": "main",
"index": 0
}
]
]
},
"11": {
"main": [
[
{
"node": "12",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 社交媒体
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
使用Gmail和Google表格分析的废弃购物车恢复功能
使用Gmail和Google表格分析的废弃购物车恢复功能
If
Set
Code
+
If
Set
Code
13 节点Rodrigue
社交媒体
使用AI评分和Gmail推广管理社交媒体影响者活动
使用AI评分和Gmail推广管理社交媒体影响者活动
If
Set
Code
+
If
Set
Code
15 节点Rodrigue
社交媒体
使用GPT-4评分和Gmail通知自动化候选人评估
使用GPT-4评分和Gmail通知自动化候选人评估
If
Set
Code
+
If
Set
Code
12 节点Rodrigue
人力资源
供应商风险评分自动化
使用D&B、NewsAPI和Gmail提醒自动化供应商风险评分
If
Set
Code
+
If
Set
Code
16 节点Rodrigue
杂项
为 HubSpot 联系人和 SharePoint 生成 AI 撰写的新闻稿和素材
使用 GPT-4o、AI 图像和视频为 HubSpot 和 SharePoint 创建双语新闻稿
If
Set
Code
+
If
Set
Code
49 节点plemeo
社交媒体
潜在客户开发与邮件工作流
使用Google Maps、SendGrid和AI自动化B2B潜在客户开发与邮件营销
If
Set
Code
+
If
Set
Code
141 节点Ezema Kingsley Chibuzo
潜在客户开发