← All N8N workflows
Automation & utilitiesExtract From FileGoogle DriveHTTP RequestManual TriggerEdit Fields

Workflow: Extract data from PDF with Claude 3.5 Sonnet or Gemini 2.0 Flash

Configured with Extract From File, Google Drive, HTTP Request. Review the connections and setup before adapting this template.

Workflow preview
TriggerWhen clicking 'Testworkflow'Manual TriggerTransformExtract from FileExtract From FileFiles / mediaGoogle DriveGoogle DriveWeb / APICall Gemini 2.0 Flashwith PDF CapabilitiesHTTP RequestWeb / APICall Claude 3.5 Sonnetwith PDF CapabilitiesHTTP RequestTransformDefine PromptEdit Fields

Node categories in this workflow

  • Trigger
  • Transform
  • Files / media
  • Web / API

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
When clicking 'Test workflow'TriggerManual TriggerSee node parameters
Extract from FileTransformExtract From FilebinaryToPropery
Google DriveFiles / mediaGoogle Drivedownload
Call Gemini 2.0 Flash with PDF CapabilitiesWeb / APIHTTP RequestPOST
Call Claude 3.5 Sonnet with PDF CapabilitiesWeb / APIHTTP RequestPOST
Define PromptTransformEdit FieldsSee 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

  • anthropicApi
  • googleDriveOAuth2Api
  • googlePalmApi

Workflow notes

Workflow: Extract data from PDF with Claude 3.5 Sonnet or Gemini 2.0 Flash

Workflow: Extract data from PDF with Claude 3.5 Sonnet or Gemini 2.0 Flash

Overview

  • This workflow helps you compare Claude 3.5 Sonnet and Gemini 2.0 Flash when extracting data from a PDF
  • This workflow extracts and processes the data within a PDF in one single step, instead of calling an OCR and then an LLM”

How it works

  • The initial 2 steps download the PDF and convert it to base64.
  • This base64 string is then sent to both Claude 3.5 Sonnet and Gemini 2.0 Flash to extract information.
  • This workflow is made to let you compare results, latency, and cost (in their dedicated dashboard).

How to use it

  • Set up your Google Drive if not already done
  • Select a document on your Google Drive
  • Modify the prompt in "Define Prompt" to extract the information you need and transform it as wanted.
  • Get a Claude API key and/or Gemini API key
  • Note that you can deactivate one of the 2 API calls if you don't want to try both
  • Test the Workflow
Sticky Note

You can output the result as JSON by adding the following:

"generationConfig": {
 "responseMimeType": "application/json"

or even use a structured output. Check the documentation

Sticky Note2

You can force Claude to output JSON with Prefill response format

Sticky Note3

These 2 steps first download the PDF file, and then convert it to base64. This is required by both APIs to process the file.

Sticky Note4

This prompt is used in both Gemini’s and Claude’s calls to define what information should be extracted and processed.

Workflow: Extract data from PDF with Claude 3.5 Sonnet or Gemini 2.0 Flash

Workflow: Extract data from PDF with Claude 3.5 Sonnet or Gemini 2.0 Flash

Purpose and structure

This folder contains the Workflow: Extract data from PDF with Claude 3.5 Sonnet or Gemini 2.0 Flash workflow. Its executable nodes use extractFromFile, googleDrive, httpRequest, manualTrigger, 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

When clicking 'Test workflow'

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/1438_Extractfromfile_Manual_Process_Webhook.json MIT; preserve source notices.

More in Automation & utilities