Register users and authenticate with magic links using Google Sheets — n8n 工作流
概览
This workflow implements a lightweight authentication system for n8n web portals using Google Sheets as a simple user and session store. It supports email-based registration, username and password login, one-click magic link authentication, and cookie-based session management.
How it works Users register with an email address through a form. The workflow generates a password and a one-time authentication token. User credentials and token are stored in Google Sheets. An email is sent with login
使用的节点
Google SheetsGmailCode
工作流预览
Append or update row in …
Prepare sid
Generate token
I
If has token in DB
I
If has token
Search by token
⚡
O
On form register
Create password and token
Send username/password
N
Notice register success
⚡
O
On form login
Check username/password
I
If login success
R
Redirect to login form
R
Redirect to auth url
Add token to DB
R
Redirect to auth with ne…
⚡
A
Auth
⚡
I
Invalid token
I
If token valid
⚡
R
Redirect to login form1
Update sid
⚡
R
Redirect to profile and …
⚡
P
Profile
Check sid cookies header
Search sid
I
If has data with sid
⚡
R
Redirect to login
Prepare html
⚡
S
Show profile page
30 nodes26 edges
工作原理
- 1
触发器
工作流由 触发器 触发器启动。
- 2
处理
数据流经 30 个节点, connecting code, form, formtrigger。
- 3
输出
工作流完成自动化并将结果发送到配置的目标。
节点详情 (30)
GO#1
Google Sheets
googleSheets
GM#2
Gmail
gmail
CO#3
Code
code
如何导入此工作流
- 1点击右侧 下载 JSON 按钮保存工作流文件。
- 2打开你的 n8n 实例,依次点击 工作流 → 新建 → 从文件导入。
- 3选择下载的
register-users-and-authenticate-with-magic-links-using-google-sheets文件并点击导入。 - 4为每个服务节点配置 凭证(API 密钥、OAuth 等)。
- 5点击 测试工作流 验证一切正常,然后激活它。
或直接在 n8n → 从 JSON 导入 中粘贴:
{ "name": "Register users and authenticate with magic links using Google Sheets", "nodes": [...], ...}
集成
codeformformtriggergmailgooglesheetsifrespondtowebhookwebhook
创建者
ICTS Automation
@ictsautomation
标签
codeformformtriggergmailgooglesheetsifrespondtowebhookwebhook