← All N8N workflows
AI & researchChain LLMExtract From FileGmailGmail TriggerGoogle Drive

Attachments Gmail to drive and google sheets

Configured with Chain LLM, Extract From File, Gmail, Gmail Trigger, and additional nodes. Review the connections and setup before adapting this template.

Workflow preview
TriggerGmail Trigger1Gmail TriggerTransformSetup1Edit FieldsWeb / APIUpload PDF to Drive1HTTP RequestFiles / mediaRename file1Google DriveFiles / mediaMove to the correctfolder1Google DriveMessagingGmailGmailTransformExtract from File2Extract From FileFiles / mediaGoogle DriveGoogle DriveAI & modelsOpenAI ModelLM Open AiTransformStructured OutputParserOutput Parser StructuredData storeAppend toReconciliation SheetGoogle SheetsTransformMap OutputEdit FieldsAI & modelsApply Data ExtractionRulesChain LLMRoutingOnly invoice mails withattachmentsIf

Node categories in this workflow

  • Trigger
  • Transform
  • Web / API
  • Files / media
  • Messaging
  • AI & models
  • Data store
  • Routing

Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.

Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.

How it works

The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.

Workflow node names, types, and operations
NodeCategoryTypeOperation
Gmail Trigger1TriggerGmail TriggerSee node parameters
Setup1TransformEdit FieldsSee node parameters
Upload PDF to Drive1Web / APIHTTP RequestPOST
Rename file1Files / mediaGoogle Driveupdate
Move to the correct folder1Files / mediaGoogle Drivemove
GmailMessagingGmailmarkAsRead
Extract from File2TransformExtract From Filepdf
Google DriveFiles / mediaGoogle Drivedownload
OpenAI ModelAI & modelsLM Open AiSee node parameters
Structured Output ParserTransformOutput Parser StructuredSee node parameters
Append to Reconciliation SheetData storeGoogle Sheetsappend
Map OutputTransformEdit FieldsSee node parameters
Apply Data Extraction RulesAI & modelsChain LLMSee node parameters
Only invoice mails with attachmentsRoutingIfSee node parameters

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.

Requirements

An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.

Credential types declared in the source

  • gmailOAuth2
  • googleDriveOAuth2Api
  • googleSheetsOAuth2Api
  • openAiApi

Workflow notes

Setup

Setup

  1. Setup your Gmail and Google Drive credentials
  2. Setup your Google Sheets credentials
  3. Setup your Openai api key
3. Use LLMs to Extract Values from Data

3. Use LLMs to Extract Values from Data

Read more about Basic LLM Chain

Large language models are perfect for data extraction tasks as they can work across a range of document layouts without human intervention. The extracted data can then be sent to a variety of datastores such as spreadsheets, accounting systems and/or CRMs.

Tip: The "Structured Output Parser" ensures the AI output can be inserted to our spreadsheet without additional clean up and/or formatting.

Sticky Note6

Need more attributes? Change it here!

Attachments Gmail to drive and google sheets

Attachments Gmail to drive and google sheets

Purpose and structure

This folder contains the Attachments Gmail to drive and google sheets workflow. Its executable nodes use chainLlm, extractFromFile, gmail, gmailTrigger, googleDrive, googleSheets, httpRequest, if, lmOpenAi, outputParserStructured, set. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.

Setup

Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.

Entry points

Gmail Trigger1

Verification

Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.

Attribution

https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Extractfromfile/1764_Extractfromfile_HTTP_Automation_Webhook.json MIT; preserve source notices.

More in AI & research