# Onboard Nextcloud users with Gmail and PostgreSQL: n8n workflow

> Started by someone submitting a form, and works across Gmail, Google Sheets and Postgres. 18 steps, 2 branches: a working afternoon to understand properly.

Source: https://millionrounds.com/workflow/onboard-nextcloud-users-with-gmail-and-postgresql (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Content](https://millionrounds.com/workflows?category=Content#library)

# Onboard Nextcloud users with Gmail and PostgreSQL

Started by someone submitting a form, and works across Gmail, Google Sheets and Postgres. 18 steps, 2 branches: a working afternoon to understand properly.

Medium

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fonboard-nextcloud-users-with-gmail-and-postgresql)

**18 steps** Medium: a working afternoon

**2** Branches: places the flow splits

**0** Loops or waits

**3** Services it connects to

## The flow

Starts it 1 Logic 5 Service 12

The steps in the order they run, from what starts it.

- 1 **When Form Submitted** Form trigger *Starts it*
- 2 **Verify User in PostgreSQL** Postgres *Service*
- 3 **Log to Google Sheets** Google Sheets *Service*
- 4 **If User Exists** If *Logic*
- 5 **Notify User Exists** Gmail *Service*
- 6 **Request Admin Approval** Gmail *Service*
- 7 **If Admin Approved** If *Logic*
- 8 **Create Directory via SSH** Ssh *Service*
- 9 **Log Rejection in DB** Postgres *Service*
- 10 **Create Temp Password** Code *Logic*
- 11 **Notify Request Rejected** Gmail *Service*
- 12 **Add User to DB** Postgres *Service*
- 13 **Update Google Sheets Status** Google Sheets *Service*
- 14 **Post to Nextcloud API** Http Request *Service*
- 15 **Create QR Login URL** Code *Logic*
- 16 **Fetch QR Code Image** Http Request *Service*
- 17 **Prepare Email Attachment** Code *Logic*
- 18 **Send Welcome Email** Gmail *Service*

## How it's built

- **Starts on:** Someone submitting a form
- **Steps:** 18, with 2 branches
- **Size:** Medium: a working afternoon
- **Connects to:** Gmail, Google Sheets, Postgres
- **Model:** None. This is plumbing, not judgement

## Questions

What does it need to run?

An n8n account, plus your own Gmail, Google Sheets and Postgres accounts. You connect your own accounts after importing it; none are included.

What starts it?

It starts on someone submitting a form.

Does it use AI?

No. Every step is fixed logic or a call to a service, so it does the same thing every time.

How long does it take to set up?

Plan an afternoon. 18 steps is enough that you should read each one before running it.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 18 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fonboard-nextcloud-users-with-gmail-and-postgresql)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Gmail](https://millionrounds.com/workflows?service=Gmail#library)[Google Sheets](https://millionrounds.com/workflows?service=Google+Sheets#library)[Postgres](https://millionrounds.com/workflows?service=Postgres#library)

## Workflows like it

Also content, with the same services where possible, closest in size first.

- [**Post images and text from Google Drive and Sheets to LinkedIn** 18 steps · Google Sheets, LinkedIn](https://millionrounds.com/workflow/post-images-and-text-from-google-drive-and-sheets-to-linkedi)
- [**Sync YouTube channel videos to Google Sheets for content database** 18 steps · Google Sheets](https://millionrounds.com/workflow/sync-youtube-channel-videos-to-google-sheets-for-content-dat)
- [**Track SEO keyword position in Google SERP with Google Sheets** 18 steps · Gmail, Google Sheets](https://millionrounds.com/workflow/track-seo-keyword-position-in-google-serp-with-google-sheets)
- [**AI-powered content factory: RSS to blog, Instagram & TikTok** 18 steps · calls a model · Google Sheets, Slack](https://millionrounds.com/workflow/ai-powered-content-factory-rss-to-blog-instagram-and-tiktok)
- [**Analyze Facebook post comment sentiment with OpenAI** 18 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/analyze-facebook-post-comment-sentiment-with-openai)
- [**Analyze Reddit posts with OpenAI and Gmail** 18 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/analyze-reddit-posts-with-openai-and-gmail)
