Mindket

Payment transactions from PDFs and images exported to CSV

Newversion 1 · updated

Overview

An n8n workflow that watches a Google Drive folder for PDFs and images of payment transactions. An AI model reads each one, adds a category to every line and saves a CSV file in another Drive folder.

Payment transactions from PDFs and images exported to CSV is an n8n workflow in the Finance & accounting category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

At a glance

Runs in
  • n8n Cloud or your own server: every node in it is one that n8n ships
  • Your Google Drive: one folder for the files to read and one for the CSV files
  • Another model: swap the model name in the OpenRouter request, or swap the Gemini node for another chat model that reads images
  • Another place to save: replace the two upload nodes with a Google Sheets or a file node

Platform

Connects 3 apps

How it works

Trigger

A new file in a Drive folder

It checks the input folder every minute and starts for each new file, and it reads:

  • A PDF or an image of payment transactions in a Google Drive folder

Actions

  1. A router sends a PDF down one path and an image down the other, and ignores other files
  2. For a PDF, the text is read from the file and sent to OpenRouter
  3. The model lists every transaction as CSV and adds a category column
  4. For an image, the picture goes to Google’s Gemini with a similar instruction
  5. The CSV text is saved as a file
  6. The file is uploaded to the output folder under the day’s date

Result

A CSV file of the transactions, with a category on each line, in a second Google Drive folder

Integrations

What you need before you start.

Google Drive

Source and storage

Triggers on a new file, downloads it and stores the CSV file in a second folder.

NeedsA Google service account and two folders shared with it

OpenRouter

Model for PDFs

Reads the text of a PDF and returns the transactions as CSV with a category column.

NeedsOpenRouter API key with some credit

Google Gemini

Model for images

Reads the transactions in a picture and returns them as CSV with a category column.

NeedsA Google Gemini API key

Workflow check

Checked by Mindket on 13 Nov 2026

Steps
11 steps, starting on a Google Drive event
AI
1 step calls an AI model: Gemini extract text from image
Sign-ins
Signs in to: Google service account, openrouter.ai and Google Gemini
API keys
No API key is left in the file
Step types
Mindket’s checker reads all 7 of its step types

Read from the workflow’s file, not from a run.

About

What it is

This n8n workflow turns a statement into a CSV file. It watches a Google Drive folder, and when a PDF or an image of payment transactions lands there, an AI model reads it. The model lists every transaction and adds a category column. A PDF goes through OpenRouter and an image goes through Google’s Gemini. The workflow saves the CSV text as a file in a second Drive folder, so a pile of statements becomes tables you can open in a spreadsheet. Twelve nodes run the flow.

Who it suits

Anyone who keeps payment records as PDFs or screenshots and wants them as rows. It suits a small business, a freelancer or a household that tracks spending by hand. Skip it if you cannot send statements to an outside AI service.

Who uses it, and how
IndustryWho uses itHow they use itExample
FinanceBookkeepersTurn client statements into rows before they enter them in the booksA bookkeeper drops in a bank statement PDF and opens the CSV to check the lines.
BusinessSmall business ownersSort the month’s card payments into categoriesAn owner photographs a card slip and finds it as a row with a category.
Personal financeHouseholdsMove a budget out of PDFs and into one tableA household drops in each month’s statement and merges the files in a spreadsheet.
FreelancingFreelancersCollect expenses for a tax returnA freelancer saves receipts from the year as images and gets one file per image.

You need some n8n for this one: a Google service account, two Drive folders, an OpenRouter key and a Gemini key. The file gives no setup time.

Where to use it

n8n Cloud or a self-hosted n8n will run it, with your own Google Drive folders and accounts at OpenRouter and Google AI.

  • n8n Cloud or your own server: every node in it is one that n8n ships
  • Your Google Drive: one folder for the files to read and one for the CSV files
  • Another model: swap the model name in the OpenRouter request, or swap the Gemini node for another chat model that reads images
  • Another place to save: replace the two upload nodes with a Google Sheets or a file node

Setup

Download saves a zip with workflow.json and Mindket’s setup notes in your downloads folder. Four credentials and three folder values cover every step.

What you need first
NeedDetail
n8nAn account on n8n Cloud or a server of your own
Google service accountWith the Google Drive API on, and its key
Google DriveAn input folder and an output folder, both shared with that account
OpenRouterAn API key with some credit, for the PDFs
Google GeminiAn API key, for the images
  1. In n8n, create a workflow, open its menu, choose Import from File and pick workflow.json.
  2. Add a Google Service Account credential and select it in Get PDF or Images, Download PDF, Download Image, Upload to Google Drive and Upload to Google Drive1.
  3. In Get PDF or Images, replace <YOUR_INPUT_FOLDER_ID> with the id of the folder to watch. In both upload nodes, replace <YOUR_OUTPUT_FOLDER_ID> with the id of the CSV folder.
  4. Add a Header Auth credential with the name Authorization and the value Bearer <YOUR_OPENROUTER_API_KEY>. Select it in Send data to A.I..
  5. Add a Google Gemini(PaLM) API credential with your key and select it in Google Gemini Chat Model.
  6. Click Test workflow, drop a PDF with a few transactions into the input folder, wait for the next poll and open the CSV folder. Then save and press Publish at the top of the canvas (or Shift+P).

How to use it

Publish the workflow and leave it. Drop a PDF or an image of payment transactions into the input folder. Within a minute or so a CSV file named with the day’s date appears in the output folder. Open it in a spreadsheet, check the figures against the original and fix any line the model got wrong.

What to change for a different result
To changeWhere
The foldersGet PDF or Images and the two upload nodes
The instructions for PDFsThe message in Send data to A.I.
The instructions for imagesThe two messages in Gemini extract text from image
The modelsThe model in Send data to A.I. and Google Gemini Chat Model
The file nameThe Name in the two upload nodes
How often it checksThe poll time in Get PDF or Images

Example

A bookkeeper drops a three-page bank statement PDF and a photo of a card slip into the input folder.

Two files appear in the output folder. The first holds a header row and one row per transaction, each with a category such as groceries or transport. The second holds the one transaction on the slip. The bookkeeper opens both and checks them against the originals.

For newcomers and experts

If you are new. n8n draws a workflow as boxes joined by lines, and each box, a node, does one job. Here a router box sends PDFs one way and images the other. One path reads the text of a PDF and asks a model for the CSV. The other path shows the picture to a model. Click Test workflow, drop in a file and open each box’s output to follow it.

For experts. The PDF path is a plain HTTP request to OpenRouter, and the image path is a Basic LLM Chain with a Gemini chat model and a binary image message.

Where to look closer
NodeWhat it doesWhat to know
Get PDF or ImagesGoogle Drive Trigger for new files in one folder, polling every minuteUses a service account, so the folder must be shared with it
Route based on PDF or ImageSwitch on the file’s mime typeAn exact match for application/pdf and a contains match for image/. Other types stop here
Send data to A.I.HTTP Request to OpenRouter’s chat completions routeThe body is built with JSON.stringify, and the answer is read from choices[0].message.content
Gemini extract text from imageBasic LLM Chain with an image from the data fieldThe chain returns its answer in a field named text
Save CSV text as fileConvert to File, text operationWrites the answer into transactions.csv as plain text
Upload to Google DriveUploads the file to the output folderThe name is the day’s date and .csv, so two files from one day share a name

Good to know

The workflow sends statements to AI services and trusts what a model writes, so read each file before you rely on it.

  • Not run: Mindket made no call to Google Drive, OpenRouter or Gemini. It ran the changed request expression on its own machine and read n8n’s source for the file nodes
  • OpenRouter model: the file named meta-llama/llama-3.1-70b-instruct:free, which OpenRouter’s model list no longer shows. It now names meta-llama/llama-3.1-70b-instruct, a paid model, so each PDF costs a little
  • Gemini model: the file named models/gemini-1.5-pro-latest, which Google no longer lists. It now names models/gemini-3.6-flash
  • Converting: the original made a CSV from the model’s whole answer object, which left the transactions in one cell. It now writes the answer text, which is already CSV, into a file
  • Accuracy: a model writes the CSV, so it can miss a line, misread a figure or add a remark before the header
  • Scans: Extract data from PDF reads the text inside a PDF, so a scan with no text gives nothing. Save those pages as images
  • Length: the whole text goes in one request, and the model’s context is 131072 tokens on OpenRouter’s list, so a longer statement can fail
  • File name: the file goes to Drive as plain text with a .csv name
  • Triggering: only files created in the folder after the workflow starts are picked up
  • Your data: the text of a PDF goes to OpenRouter and the provider behind it, and an image goes to Google. Statements hold account numbers, so check both terms first
  • Credentials: the JSON holds none

README and files

README

Payment transactions from PDFs and images exported to CSV

An n8n workflow that watches a Google Drive folder. When a PDF or an image lands there, an AI model reads the payment transactions in it
and adds a category to each one. The result is saved as a CSV file in another Drive folder. PDFs go through OpenRouter, and images go
through Google's Gemini.

What is inside

  • workflow.json: the workflow as n8n exports it, 16 nodes. 12 of them run and four are sticky notes. It holds no credential.
  • README.md: these notes.

What we changed from the original copy

  • Send data to A.I. named meta-llama/llama-3.1-70b-instruct:free. OpenRouter's public model list, read on 12 November 2026, no longer
    shows that name. The node now names meta-llama/llama-3.1-70b-instruct, which the list shows with a price per token.
  • Google Gemini Chat Model named models/gemini-1.5-pro-latest, which Google's model and deprecation pages no longer list. It now
    names models/gemini-3.6-flash.
  • The PDF text went into the request through encodeURIComponent, which turns it into percent codes. It now goes in with
    JSON.stringify, so the model reads plain text and a quote mark in a statement cannot break the request.
  • The two Convert to CSV nodes made a CSV from the model's whole answer object, so the transactions ended up in one cell. They are now
    Save CSV text as file and Save CSV text as file from image. They write the answer text, which is already CSV, into a file.
  • The upload name was {{$today}}. It is now the day's date followed by .csv.
  • The author's two folder ids are now <YOUR_INPUT_FOLDER_ID> and <YOUR_OUTPUT_FOLDER_ID>.
  • Vertex A.I. extract text is now Gemini extract text from image. The node it uses calls Google's Gemini API with a Google
    Gemini(PaLM) API key, not Vertex AI, and its note said otherwise.
  • The sticky notes lost a link to the author's blog and an example service account email, which is now <YOUR_SERVICE_ACCOUNT_EMAIL>.
  • Every credential link is gone. Select your own.
  • Nothing else. The prompts, the routing and the polling are as they were.

Before you start

  • An n8n instance, on n8n Cloud or your own server.
  • A Google service account with the Google Drive API turned on, and its key.
  • Two Google Drive folders, one for the PDFs and images and one for the CSV files, both shared with the service account.
  • An OpenRouter account with an API key and some credit, for the PDFs.
  • A Google Gemini API key, for the images.

Set it up

  1. In n8n, create a workflow, open its menu and choose Import from File. Pick workflow.json.
  2. Add a Google Service Account credential and select it in Get PDF or Images, Download PDF, Download Image,
    Upload to Google Drive and Upload to Google Drive1.
  3. In Get PDF or Images, replace <YOUR_INPUT_FOLDER_ID> with the id of the folder to watch. It is the last part of the folder's address
    in Drive. In both upload nodes, replace <YOUR_OUTPUT_FOLDER_ID> with the id of the CSV folder.
  4. Add a Header Auth credential with the name Authorization and the value Bearer <YOUR_OPENROUTER_API_KEY>. Select it in
    Send data to A.I..
  5. Add a Google Gemini(PaLM) API credential with your key and select it in Google Gemini Chat Model.
  6. Click Test workflow, then drop a PDF with a few transactions into the input folder. Wait for the next poll and open the CSV folder.
    Then save and press Publish at the top of the canvas (or Shift+P).

How a run goes

  1. Get PDF or Images checks the input folder every minute for a new file.
  2. Route based on PDF or Image sends a PDF down its first output and any file whose type contains image/ down its second. Other
    files stop there.
  3. For a PDF, Download PDF fetches the file and Extract data from PDF reads its text.
  4. Send data to A.I. posts the text to OpenRouter and asks for all the transactions as CSV, with a column called category.
  5. Save CSV text as file writes the answer into a file named transactions.csv, and Upload to Google Drive stores it in the output
    folder under the day's date.
  6. For an image, Download Image fetches the file, and Gemini extract text from image sends it to Google Gemini Chat Model with a
    similar instruction.
  7. Save CSV text as file from image and Upload to Google Drive1 do the same for the image's answer.

Change the look

  • The folders: Get PDF or Images and the two upload nodes.
  • The instructions: the message in Send data to A.I. for PDFs, and the two messages in Gemini extract text from image for images.
  • The models: the model in the request of Send data to A.I., and Google Gemini Chat Model.
  • The name of the saved file: the Name in the two upload nodes.
  • How often it checks: the poll time in Get PDF or Images.

Good to know

  • Not run: Mindket made no call to Google Drive, OpenRouter or Gemini. It ran the changed request expression on its own machine and
    read n8n's source for the file nodes.
  • A model writes the CSV, so it can miss a line, misread a figure or add a remark before the header. Open each file and check the numbers.
  • Extract data from PDF reads the text inside a PDF. A scan with no text in it gives nothing, so save those pages as images.
  • The whole text goes in one request. The model's context is 131072 tokens on OpenRouter's list, and a longer statement can fail.
  • The model is now a paid one, so each PDF costs a little on OpenRouter.
  • The file goes to Drive as plain text with a .csv name. Two files made on one day get the same name.
  • Only files that are created in the folder after the workflow starts are picked up.
  • Your data: the text of a PDF goes to OpenRouter and the provider behind it, and an image goes to Google. Statements hold account
    numbers, so check both services' terms first. The CSV files stay in your Drive.
  • Credentials: the JSON holds none.
Files
NOTICE.md  686 B
README.md  6 KB
workflow.json  12 KB

3 files, 18 KB, downloaded as a zip.

What’s new

  • Version 1 · 2026-11-12

Reviews

No ratings yet

Write a review

No reviews yet.

More from Mindket

See all from Mindket

Bonsai-27B-GGUF

lmstudio-community · Kit

A GGUF conversion of the 27B Bonsai model for LM Studio, with a 3.80 GB Q1_0 language file and a 0.93 GB BF16 vision projector. Tested for text, vision and par…

New

Runs DeepSeek-V4.1-Flash-1017 as a 2.9 bits-per-weight EXL3 quantization, a 196 GiB copy for people serving large models on their own hardware. Perplexity stay…

New

MusicGen Small

facebook · Kit

Generates short music clips from a text description or an audio prompt, in the small checkpoint of facebook's MusicGen. It suits developers and music hobbyists…

New

Similar in Finance & accounting

See all in Finance & accounting

Kronos-mini

NeoQuasar · Kit

Forecasts financial candlestick series with a 4.1M-parameter foundation model trained on data from over 45 exchanges. For quant researchers and developers who…

New