8
n8n 中文网amn8n.com

从 Google Calendar 发送今天的面试安排给每位面试官 via 邮件

中级

这是一个HR领域的自动化工作流,包含 6 个节点。主要使用 Code, Gmail, GoogleCalendar, ScheduleTrigger 等节点。 从Google日历自动发送今日面试安排到Gmail给每位面试官

前置要求
  • Google 账号和 Gmail API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "MvSVpfzaFUWELNTR",
  "meta": {
    "instanceId": "14e4c77104722ab186539dfea5182e419aecc83d85963fe13f6de862c875ebfa",
    "templateCredsSetupCompleted": true
  },
  "name": "从 Google Calendar 发送今天的面试安排给每位面试官 via 邮件",
  "tags": [],
  "nodes": [
    {
      "id": "1ad3eb39-d1e3-455c-ad06-3264c2b6ec91",
      "name": "关于此模板",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -180,
        720
      ],
      "parameters": {
        "width": 1220,
        "height": 240,
        "content": "## 描述"
      },
      "typeVersion": 1
    },
    {
      "id": "d25ce1fa-0914-4ec4-aca6-10b232a0e753",
      "name": "计划触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -100,
        420
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 8
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "e16e6483-873a-4184-84dc-67120fbcb4a3",
      "name": "HTML 表格",
      "type": "n8n-nodes-base.code",
      "position": [
        520,
        420
      ],
      "parameters": {
        "jsCode": "const events = $input.all().map(e => e.json);\n\n// Group events by organizer or creator email\nconst grouped = {};\n\nfor (const event of events) {\n  const interviewerEmail = event.organizer?.email || event.creator?.email;\n  if (!interviewerEmail) continue;\n\n  if (!grouped[interviewerEmail]) grouped[interviewerEmail] = [];\n\n  const attendees = (event.attendees || []).map(att => {\n    return `${att.email} (${att.responseStatus})`;\n  }).join('<br>');\n\n  grouped[interviewerEmail].push({\n    summary: event.summary || 'No Title',\n    start: event.start?.dateTime || event.start?.date || 'N/A',\n    end: event.end?.dateTime || event.end?.date || 'N/A',\n    description: event.description || 'No description',\n    htmlLink: event.htmlLink || '',\n    meetLink: event.conferenceData?.entryPoints?.[0]?.uri || event.hangoutLink || 'N/A',\n    attendees: attendees || 'No attendees'\n  });\n}\n\nconst output = [];\n\nfor (const [email, interviews] of Object.entries(grouped)) {\n  let html = `<h3>Your Interview Schedule for Today</h3>\n  <table border=\"1\" cellpadding=\"5\" cellspacing=\"0\">\n    <tr>\n      <th>Title</th>\n      <th>Start</th>\n      <th>End</th>\n      <th>Description</th>\n      <th>Meeting Link</th>\n      <th>Attendees (Status)</th>\n    </tr>`;\n\n  for (const iv of interviews) {\n    html += `<tr>\n      <td>${iv.summary}</td>\n      <td>${new Date(iv.start).toLocaleString('en-IN', { timeZone: 'Asia/Kolkata' })}</td>\n      <td>${new Date(iv.end).toLocaleString('en-IN', { timeZone: 'Asia/Kolkata' })}</td>\n      <td>${iv.description}</td>\n      <td><a href=\"${iv.meetLink}\" target=\"_blank\">Join</a></td>\n      <td>${iv.attendees}</td>\n    </tr>`;\n  }\n\n  html += `</table>`;\n\n  output.push({\n    json: {\n      interviewer_email: email,\n      subject: \"Today's Interview Schedule\",\n      htmlContent: html\n    }\n  });\n}\n\nreturn output;\n"
      },
      "typeVersion": 2
    },
    {
      "id": "33bd4e2d-fa01-42e4-9daa-c545763df3b9",
      "name": "Gmail",
      "type": "n8n-nodes-base.gmail",
      "position": [
        780,
        420
      ],
      "webhookId": "83f6fa30-5040-4cd7-8f80-8de32a34eef4",
      "parameters": {
        "sendTo": "={{ $json.interviewer_email }}",
        "message": "={{ $json.htmlContent }}",
        "options": {},
        "subject": "Interview Reminder"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "FtDjIC7F7A1YfkbR",
          "name": "Gmail account 6"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "e9103f86-7674-4b4f-856e-babae68f6c0f",
      "name": "Google Calendar(获取面试事件)",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        220,
        420
      ],
      "parameters": {
        "options": {},
        "calendar": {
          "__rl": true,
          "mode": "list",
          "value": "pythontech3.wli@gmail.com",
          "cachedResultName": "pythontech3.wli@gmail.com"
        },
        "operation": "getAll",
        "returnAll": true
      },
      "credentials": {
        "googleCalendarOAuth2Api": {
          "id": "xNOum1xp3mzYWwJr",
          "name": "Google Calendar Pythontech3"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "0b2f912b-19af-4c90-a42b-4f32daf6e73a",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -180,
        320
      ],
      "parameters": {
        "color": 7,
        "width": 1220,
        "height": 360,
        "content": "## 从 Google Calendar 发送今天的面试安排给每位面试官 via 邮件"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "61b63191-87b5-4974-99fa-7437035c1dcd",
  "connections": {
    "HTML Table": {
      "main": [
        [
          {
            "node": "Gmail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Google Calendar(Fetch Interview Events)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Calendar(Fetch Interview Events)": {
      "main": [
        [
          {
            "node": "HTML Table",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 人力资源

需要付费吗?

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

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

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

作者
WeblineIndia

WeblineIndia

@weblineindia

A Leading Software Engineering, Consulting & Outsourcing Services Company in USA & India serving Clients Globally since 1999.

外部链接
在 n8n.io 查看

分享此工作流