Automation library · Documents and files

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.

LargeCalls a model: Gemini

22 stepsLarge: read it before trusting it with anything live
1Branch: places the flow splits
2Loops or waits
3Services it connects to

The flow

Starts it 1Model 2Logic 11Service 8

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

  1. 1Receive Supplier Submission (Webhook Trigger)WebhookStarts it
  2. 2Split Documents ArraySplit OutLogic
  3. 3Process Documents LoopSplit In BatchesLogic
  4. 4Aggregate All Processed DocumentsAggregateLogic
  5. 5Download Document FileHttp RequestService
  6. 6Validate Supplier DocumentsCodeLogic
  7. 7Extract Text from PDFExtract From FileService
  8. 8Check Validation StatusIfLogic
  9. 9AI Extract Structured Data (Gemini)Google GeminiModel
  10. 10Build Supplier Master RecordCodeLogic
  11. 11Generate Validation FeedbackCodeLogic
  12. 12Parse & Normalize AI ResponseCodeLogic
  13. 13Edit FieldsSetLogic
  14. 14AI Improve Feedback MessageGoogle GeminiModel
  15. 15Batch Processing Delay (Loop Control)WaitLogic
  16. 16Save Supplier to Google SheetsGoogle SheetsService
  17. 17Send Rejection Email to SupplierGmailService
  18. 18Create Supplier Folder (Drive)Google DriveService
  19. 19Prepare Files for UploadCodeLogic
  20. 20Upload Documents to DriveGoogle DriveService
  21. 21Notify Internal Team (New Supplier)GmailService
  22. 22Send Approval Email to SupplierGmailService

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.