What This Workflow Does
This workflow takes scanned bank statement PDFs and changes them into clear markdown text with tables preserved.
It helps find deposit entries quickly without manual work.
The workflow pulls the PDF from Google Drive, turns each page into an image, then uses a special AI to read and write out the page as markdown.
Finally, it picks out all deposit rows from the markdown and gives a neat structured list.
Who Should Use This Workflow
Anyone with scanned bank PDFs that have complex layouts.
Perfect for accountants or finance workers who spend too much time copying data by hand.
This helps reduce mistakes and saves hours reviewing pages.
Tools and Services Used
- Google Drive API: Fetches bank statement PDFs.
- Stirling PDF service: Converts PDF pages to JPG images.
- Google Gemini Vision Language Model: Reads images and converts them to markdown keeping tables.
- n8n automation platform: Controls workflow logic and data flow.
Workflow Input → Process → Output
Inputs
- Bank statement PDF file stored on Google Drive.
Processing Steps
- Download PDF from Google Drive.
- Send PDF to Stirling PDF API to get images per page.
- Unzip the image files and sort them by filename.
- Resize images smaller to ease AI processing.
- For each image, run Google Gemini to transcribe the page to markdown.
- Collect all markdown pages and combine them.
- Extract deposit table rows from combined markdown using AI extraction prompt.
Output
- JSON list of deposits with date, description, and amount fields.
Beginner Step-By-Step: How to Use The Workflow in n8n
Import Workflow
- Download the workflow file using the Download button on this page.
- Open the n8n editor.
- Click on “Import from File” and select the downloaded workflow file.
Configure Credentials
- Add your Google Drive API credentials in the Get Bank Statement node.
- Add Google Gemini API Key or credentials in the Transcribe to Markdown and Extract All Deposit Table Rows nodes.
- Set the Stirling PDF API URL if self-hosted, or keep default if using public service.
Update File Inputs
- Change the
fileIdin the Get Bank Statement node to the actual Google Drive file ID with the bank PDF.
Test and Activate
- Run manual test by clicking “Execute Workflow”.
- Check that the workflow completes without errors.
- After successful tests, activate the workflow for production runs.
For self hosted options or better data privacy, learn about self-host n8n.
Handling Common Problems and Failures
- Permission errors: Check Google Drive sharing and OAuth scopes.
- PDF API unreachable: Use self-hosted Stirling PDF or other converter.
- Page order wrong: Make sure images are sorted by filename before transcription.
- AI output cut off: Resize images smaller and transcribe pages one by one.
Customization Ideas
- Change Google Drive file IDs to work with other bank statements.
- Switch AI model nodes to other APIs like GPT4o or Claude Sonnet.
- Adjust image resize values to balance speed with detail.
- Change extraction prompt to pick withdrawals or other data.
- Replace Stirling PDF API with private or self-hosted solution to keep data private.
Summary
→ Converts scanned bank PDFs to markdown with tables.
→ Extracts deposit entries automatically.
→ Saves hours of manual copy-pasting.
→ Produces structured JSON deposit data.
→ Runs fully in n8n with configurable services.
