Sanitize Google Drive markdown text with a local Ollama model
Ready for 3.0What this workflow does
This AI workflow has 15 nodes and runs on Google Drive events (folder created). Along the way it connects Google Drive, Ollama Model and Google Sheets.
How it runs
Trigger: On Google Drive events (folder created).
- return_files_in_folder (HTTP Request): calls an HTTP API
- split_files_item (Split Out): splits a list into separate items
- select_markdown_files (Filter): keeps only the items that match a condition
- download_drive_files (Google Drive): download
- text_from_markdown (Extract from File): extracts data from a file (text)
- combine_all_text (Aggregate): combines items into one
- chunk_text_for_local_llm (Code): runs custom Python code
- Basic LLM Chain: sends a prompt to an LLM, with model: Ollama Model
- parse_json_text_with_flag (Edit Fields (Set)): sets 1 field: output
- log_text_with_pii_flag (optional) (Google Sheets): append
…plus 3 more steps. See the full node list below.
Services it uses
Other Google Drive + Google Sheets templates (720) · Other Google Sheets + Ollama templates (27) · Other Google Drive + Ollama templates (14)
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (12)
- HTTP Request
n8n-nodes-base.httpRequest - Split Out
n8n-nodes-base.splitOut - Filter
n8n-nodes-base.filter - Google Drive
n8n-nodes-base.googleDrive - Extract from File
n8n-nodes-base.extractFromFile - Aggregate
n8n-nodes-base.aggregate - Code
n8n-nodes-base.code - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Ollama Model
@n8n/n8n-nodes-langchain.lmOllama - Edit Fields (Set)
n8n-nodes-base.set - Google Drive Trigger
n8n-nodes-base.googleDriveTrigger - Google Sheets
n8n-nodes-base.googleSheets
From the author
How it works - Downloads markdown documents from a Google Drive folder containing private information, uses the Ollama model to identify and extract sensitive data, and stores the sanitized text in a single combined markdown document. Setup Steps - Google…