Templates / Register users and authenticate with magic links using Google Sheets

Register users and authenticate with magic links using Google Sheets

Ready for 3.0

by ICTS Automation · 84 views · created 2026-02-25 · Miscellaneous

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

Nodes used (8)

Google SheetsGmail

What it does

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 1. Users register with an email address through a form. 2. The workflow generates a password and a one-time authentication token. 3. User credentials and token are stored in Google Sheets. 4. An email is sent with login credentials and a magic link. 5. Users can log in with username and password or click the magic link. 6. The /auth endpoint validates the token, creates a session id (sid), sets it as an HttpOnly cookie, and invalidates the token. 7. The /profile endpoint reads the sid cookie, verifies the session in Google Sheets, and displays a protected profile page. Set up steps - Create a Google Sheet with columns: username, password, role, token, sid. - Replace YOURSPREADSHEETID with your Google Sheet ID in all Google Sheets nodes. - Replace YOURDOMAIN with your n8n instance domain in redirect URLs and email links. - Configure Gmail or SMTP credentials in the email node. - Ensure your n8n instance is served over HTTPS so Secure cookies function correctly. This template is suitable for small internal portals, admin dashboards, or proof-of-concept authentication systems built entirely within n8n.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.