# Advanced usage of Forms with OpenAI and Gmail: n8n workflow

> Started by someone submitting a form, and works across Gmail and Notion. It hands the judgement calls to OpenAI.

Source: https://millionrounds.com/workflow/advanced-usage-of-forms-with-openai-and-gmail (Millionrounds; every figure on the page links to its filing or article)

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

# Advanced usage of Forms with OpenAI and Gmail

Started by someone submitting a form, and works across Gmail and Notion. It hands the judgement calls to OpenAI. 30 steps, 3 branches, 1 loop or waits: large, and worth reading before you trust it with anything live.

Large Calls a model: OpenAI

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fadvanced-usage-of-forms-with-openai-and-gmail)

**30 steps** Large: read it before trusting it with anything live

**3** Branches: places the flow splits

**1** Loop or waits

**2** Services it connects to

## The flow

Starts it 4 Model 1 Logic 18 Service 7

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

- 1 **On form submission** Form trigger *Starts it*
- 2 **Sub form trigger** Form trigger *Starts it*
- 3 **Sub form trigger1** Form trigger *Starts it*
- 4 **Sub form trigger2** Form trigger *Starts it*
- 5 **Set -> path** Set *Logic*
- 6 **Switch -> Create or update** Switch *Logic*
- 7 **Get -> Clients** Notion *Service*
- 8 **Link -> Form** Form *Service*
- 9 **other sub workflow** No Op *Logic*
- 10 **Get -> Items** Notion *Service*
- 11 **Set -> Options1** Set *Logic*
- 12 **Set -> Options** Set *Logic*
- 13 **Aggregate -> Options1** Aggregate *Logic*
- 14 **Merge** Merge *Logic*
- 15 **Aggregate -> Options** Aggregate *Logic*
- 16 **Merge 1** Merge *Logic*
- 17 **Merge 2** Merge *Logic*
- 18 **Set -> Form fields1** Set *Logic*
- 19 **Send a message** Gmail *Service*
- 20 **Set -> Form fields** Set *Logic*
- 21 **Switch 2** Switch *Logic*
- 22 **Loop Over Items** Split In Batches *Logic*
- 23 **Form1** Form *Service*
- 24 **Form** Form *Service*
- 25 **Filter first only** Filter *Logic*
- 26 **Filter -> Not updated only** Filter *Logic*
- 27 **Update** Open Ai *Model*
- 28 **If not -> Select which** If *Logic*
- 29 **Update -> Item** Notion *Service*
- 30 **Split Out -> Items** Split Out *Logic*

## How it's built

- **Starts on:** Someone submitting a form
- **Steps:** 30, with 3 branches, 1 loop or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Gmail, Notion
- **Model:** OpenAI

## Questions

What does it need to run?

An n8n account, plus your own Gmail and Notion accounts, and a key for OpenAI. 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?

Yes. It calls OpenAI. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 30 steps it is large: read it before trusting it with anything live.

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 30 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%2Fadvanced-usage-of-forms-with-openai-and-gmail)
- **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)[Notion](https://millionrounds.com/workflows?service=Notion#library)

## Workflows like it

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

- [**Create sprint goals from Google Sheets with Pega Agile Studio** 30 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/create-sprint-goals-from-google-sheets-with-pega-agile-studi)
- [**Register users and authenticate with Google Sheets** 30 steps · Gmail, Google Sheets](https://millionrounds.com/workflow/register-users-and-authenticate-with-google-sheets)
- [**Adaptive email auto-responder with OpenAI and Gmail** 29 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/adaptive-email-auto-responder-with-openai-and-gmail)
- [**Create structured Notion workspaces from notes & voice** 29 steps · calls a model · Google Drive, Notion](https://millionrounds.com/workflow/create-structured-notion-workspaces-from-notes-and-voice)
- [**Learn anything, write a book, design a curriculum** 32 steps · calls a model · Notion](https://millionrounds.com/workflow/learn-anything-write-a-book-design-a-curriculum)
- [**Track fitness class attendance and retention** 32 steps · calls a model · Discord, Gmail](https://millionrounds.com/workflow/track-fitness-class-attendance-and-retention)
