workflows.fit
Back to n8n workflows
n8n templateFreeBy Hugues Stock

Load and aggregate files from a Google Drive folder into a key-value dictionary

What does this template do? This workflow automates the process of retrieving all Google Docs from a specified Google Drive folder, extracting their content, and structuring the data into a unified key-value dictionar...

Data & StorageMiscellaneousDevelopmentCore NodesExecute Workflow TriggerCodeSticky NoteGoogle Drive
Loading interactive preview...

Template notes

What does this template do?

This workflow automates the process of retrieving all Google Docs from a specified Google Drive folder, extracting their content, and structuring the data into a unified key-value dictionary, where: - Key = The file name - Value = The content of the document (with normalized newlines)

This is ideal for use cases such as knowledge ingestion, prompt context preparation, or populating a RAG (Retrieval-Augmented Generation) system with reference documents.

Use Case

Perfect for teams or individuals who maintain prompts, content, or reference material in Google Docs and want to integrate that data dynamically into automation or AI workflows.

What the Workflow Does

- โšก Triggered via Execute Workflow Trigger from another workflow - ๐Ÿ“ Retrieves all files from a specified Google Drive folder - ๐Ÿ“„ Downloads the full content of each Google Docs file - ๐Ÿงฉ Maps each file name to its content using a Set node - ๐Ÿง  Aggregates all entries into a single dictionary with Code node - ๐Ÿงพ Outputs a JSON object like: json { "Doc1": "content of doc 1", "Doc2": "content of doc 2" }

Apps & Services Used - Google Drive - Google Docs - n8n Code node