Onboard Nextcloud users with Gmail approvals, PostgreSQL, and Google Sheets
Ready for 3.0Ready 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)
- n8n Form Trigger
n8n-nodes-base.formTrigger - Postgres
n8n-nodes-base.postgres - Google Sheets
n8n-nodes-base.googleSheets - If
n8n-nodes-base.if - Gmail
n8n-nodes-base.gmail - SSH
n8n-nodes-base.ssh - Code
n8n-nodes-base.code - HTTP Request
n8n-nodes-base.httpRequest
What it does
Quick overview This workflow collects account requests via an n8n form, checks PostgreSQL for existing users, and routes new requests to Gmail for admin approval. Approved users are provisioned in Nextcloud, synced to Google Sheets and PostgreSQL, and emailed credentials with a mobile login QR code. How it works 1. Receives a new account request from an n8n form with the user’s full name and email address. 2. Logs the request as “Pending Approval” in Google Sheets and checks PostgreSQL to see whether the email already exists. 3. If the user already exists, sends an “account already exists” notification to the requester via Gmail. 4. If the user is new, sends an approval email to an admin via Gmail (send-and-wait) and branches based on the admin’s approve/reject decision. 5. If rejected, writes the rejection to the PostgreSQL usersrejected table and emails the requester a rejection notice via Gmail. 6. If approved, creates a storage directory via SSH, generates a temporary password, saves the approved user to PostgreSQL, and updates the user’s status in Google Sheets. 7. Provisions the user in Nextcloud via the OCS API, generates and downloads a QR code for the Nextcloud mobile login deep link, and emails the requester their credentials with the QR image attached via Gmail. Setup 1. Configure credentials for PostgreSQL, Google Sheets OAuth2, Gmail OAuth2, Nextcloud API, and SSH (password-based) to match your environment. 2. Replace YOURSPREADSHEETID, the sheet/tab reference, and ensure the sheet has the expected columns (USER NAME, EMAIL ADDR., DATE, STATUS, and PASSWORD). 3. Update the admin email address, support contact details, and any email copy as needed in the Gmail steps. 4. Update the Nextcloud base URL/host headers and ensure the Nextcloud OCS provisioning endpoint is reachable with an account permitted to create users. 5. Adjust the SSH command path for the user storage directory to match your server filesystem and permissions.