Automation library · Documents and files

Automate legal lien documents with Gemini and Apify

Started by a change in a Google Sheet, and works across Gmail, Google Docs, Google Drive and Google Sheets. It hands the judgement calls to Gemini. 22 steps, 1 branch: 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
0Loops or waits
4Services it connects to

The flow

Starts it 2Model 2Logic 1Service 17

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

  1. 1Google Gemini Chat Model1Lm Chat Google GeminiModel
  2. 2Intermediate data receivedGoogle Sheets triggerStarts it
  3. 3Form submitted triggerGoogle Sheets triggerStarts it
  4. 4Property Information ExtractorInformation ExtractorModel
  5. 5IfIfLogic
  6. 6Apify Playwright script to find property infoHttp RequestService
  7. 7Add Intermediate Info to Google SheetsGoogle SheetsService
  8. 8Create folder For Output FilesGoogle DriveService
  9. 9Get file for propertyHttp RequestService
  10. 10Playwright error informGmailService
  11. 11Approve Through EmailGmailService
  12. 12Make Copy of TemplateGoogle DriveService
  13. 13Transform to base64Extract From FileService
  14. 14Change Custom VariablesGoogle DocsService
  15. 15Upload legal docGoogle DriveService
  16. 16Generate PDFGoogle DriveService
  17. 17Call Gemini API for legal descHttp RequestService
  18. 18Add PDF To DriveGoogle DriveService
  19. 19Property metadataHttp RequestService
  20. 20Move file in Google DriveGoogle DriveService
  21. 21Update CreationGoogle SheetsService
  22. 22Notify completeGmailService

How it's built

Starts on
A change in a Google Sheet
Steps
22, with 1 branch
Size
Large: read it before trusting it with anything live
Connects to
Gmail, Google Docs, Google Drive, Google Sheets
Model
Gemini

Questions

What does it need to run?

An n8n account, plus your own Gmail, Google Docs, 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 a change in a Google Sheet.

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.