# Validate supplier onboarding documents with Gemini and Gmail: n8n workflow

> Started by another system calling it, and works across Gmail, Google Drive and Google Sheets. It hands the judgement calls to Gemini.

Source: https://millionrounds.com/workflow/validate-supplier-onboarding-documents-with-gemini-and-gmail (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Documents and files](https://millionrounds.com/workflows?category=Documents+and+files#library)

# Validate supplier onboarding documents with Gemini and Gmail

Started by another system calling it, and works across Gmail, Google Drive and Google Sheets. It hands the judgement calls to Gemini. 22 steps, 1 branch, 2 loops or waits: large, and worth reading before you trust it with anything live.

Large Calls a model: Gemini

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fvalidate-supplier-onboarding-documents-with-gemini-and-gmail)

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

**1** Branch: places the flow splits

**2** Loops or waits

**3** Services it connects to

## The flow

Starts it 1 Model 2 Logic 11 Service 8

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

- 1 **Receive Supplier Submission (Webhook Trigger)** Webhook *Starts it*
- 2 **Split Documents Array** Split Out *Logic*
- 3 **Process Documents Loop** Split In Batches *Logic*
- 4 **Aggregate All Processed Documents** Aggregate *Logic*
- 5 **Download Document File** Http Request *Service*
- 6 **Validate Supplier Documents** Code *Logic*
- 7 **Extract Text from PDF** Extract From File *Service*
- 8 **Check Validation Status** If *Logic*
- 9 **AI Extract Structured Data (Gemini)** Google Gemini *Model*
- 10 **Build Supplier Master Record** Code *Logic*
- 11 **Generate Validation Feedback** Code *Logic*
- 12 **Parse & Normalize AI Response** Code *Logic*
- 13 **Edit Fields** Set *Logic*
- 14 **AI Improve Feedback Message** Google Gemini *Model*
- 15 **Batch Processing Delay (Loop Control)** Wait *Logic*
- 16 **Save Supplier to Google Sheets** Google Sheets *Service*
- 17 **Send Rejection Email to Supplier** Gmail *Service*
- 18 **Create Supplier Folder (Drive)** Google Drive *Service*
- 19 **Prepare Files for Upload** Code *Logic*
- 20 **Upload Documents to Drive** Google Drive *Service*
- 21 **Notify Internal Team (New Supplier)** Gmail *Service*
- 22 **Send Approval Email to Supplier** Gmail *Service*

## How it's built

- **Starts on:** Another system calling it
- **Steps:** 22, with 1 branch, 2 loops or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Gmail, Google Drive, Google Sheets
- **Model:** Gemini

## Questions

What does it need to run?

An n8n account, plus your own Gmail, Google Drive and Google Sheets accounts, and a key for Gemini. You connect your own accounts after importing it; none are included.

What starts it?

It starts on another system calling it.

Does it use AI?

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

How long does it take to set up?

Take your time. At 22 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 22 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%2Fvalidate-supplier-onboarding-documents-with-gemini-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)[Google Drive](https://millionrounds.com/workflows?service=Google+Drive#library)[Google Sheets](https://millionrounds.com/workflows?service=Google+Sheets#library)

## Workflows like it

Also documents and files, with the same services where possible, closest in size first.

- [**Automate legal lien documents with Gemini and Apify** 22 steps · calls a model · Gmail, Google Docs](https://millionrounds.com/workflow/automate-legal-lien-documents-with-gemini-and-apify)
- [**Classify and file email PDF documents with Gmail and Drive** 22 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/classify-and-file-email-pdf-documents-with-gmail-and-drive)
- [**Chat with Supabase** 23 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/chat-with-supabase)
- [**Extract timesheet data with Mistral and Gmail** 23 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/extract-timesheet-data-with-mistral-and-gmail)
- [**Multilingual YouTube metadata translator with Gemini** 21 steps · calls a model · Google Sheets, YouTube](https://millionrounds.com/workflow/multilingual-youtube-metadata-translator-with-gemini)
- [**Process documents & build semantic search with OpenAI** 23 steps · calls a model · Google Drive, Qdrant](https://millionrounds.com/workflow/process-documents-and-build-semantic-search-with-openai)
