Register users and authenticate with magic links using Google Sheets — n8n Workflow

High complexity Trigger30 nodes🏷️ Miscellaneous👁 2 viewsby ICTS Automation

Overview

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

Nodes used

Google SheetsGmailCode

Workflow Preview

1. Login
Validate username and password against Google Sheets, t
0. Register
Collect an email address via form, generate credentials
2. Auth
Validate the one-time token via Google Sheets, generate
3. Profile
Read the sid cookie, look up the active session in Goog
Overview
This workflow provides a lightweight authentication flo
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

How it Works

  1. 1

    Trigger

    The workflow starts with a trigger trigger.

  2. 2

    Process

    Data flows through 30 nodes, connecting code, form, formtrigger.

  3. 3

    Output

    The workflow completes its automation and delivers the result to the configured destination.

Node Details (30)

GO

Google Sheets

googleSheets

#1
GM

Gmail

gmail

#2
CO

Code

code

#3

How to Import This Workflow

  1. 1Click Download JSON button on the right to save the workflow file.
  2. 2Open your n8n instance. Go to Workflows → New → Import from file.
  3. 3Select the downloaded register-users-and-authenticate-with-magic-links-using-google-sheets file and click Import.
  4. 4Set up credentials for each service node (API keys, OAuth, etc.).
  5. 5Click Test Workflow to verify everything works, then activate it.

Or paste directly in n8n → Import from JSON:

{ "name": "Register users and authenticate with magic links using Google Sheets", "nodes": [...], ...}

Integrations

codeformformtriggergmailgooglesheetsifrespondtowebhookwebhook

Get This Workflow

Download and import in one click

Download JSONView on n8n.io
Nodes30
Complexityhigh
Triggertrigger
Views2

Created by

ICTS Automation

ICTS Automation

@ictsautomation

Tags

codeformformtriggergmailgooglesheetsifrespondtowebhookwebhook

New to n8n?

n8n is a free, open-source workflow automation tool. Self-host it or use the cloud version.

Get n8n Free →

Related Miscellaneous Workflows