Skip to main content

Detect duplicate invoice PDFs from Gmail with easybits and Google Sheets

Workflow preview

Workflow preview
100%
Detect duplicate invoice PDFs from Gmail with easybits and Google Sheets preview
Open on n8n.io

1. Workflow Overview

How It Works This workflow automatically detects duplicate invoices from Gmail. Incoming PDF attachments are scanned by the easybits AI Extractor, then checked against the Master Finance File in Go...

Best for

  • Invoice Processing automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.googlesheets, n8n-nodes-base.if, n8n-nodes-base.gmailtrigger, n8n-nodes-base.extractfromfile, n8n-nodes-base.set, n8n-nodes-base.httprequest, n8n-nodes-base.code, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Felix.

Original n8n.io source

1.1 Workflow description

Title
Detect duplicate invoice PDFs from Gmail with easybits and Google Sheets
Workflow name
Detect duplicate invoice PDFs from Gmail with easybits and Google Sheets

How It Works

This workflow automatically detects duplicate invoices from Gmail. Incoming PDF attachments are scanned by the easybits AI Extractor, then checked against the Master Finance File in Google Sheets. Duplicates trigger a Slack alert – new invoices get added to the sheet.

Flow overview:

  1. Gmail picks up new emails labeled as invoices (polls every minute)
  2. The PDF attachment is extracted and converted to base64
  3. easybits Extractor reads the document and returns structured data
  4. The invoice number is compared against all existing entries in Google Sheets
  5. If duplicate → Slack DM alert to felix.sattler
  6. If new → Invoice is appended to the Master Finance File

Step-by-Step Setup Guide

1. Set Up Your easybits Extractor Pipeline

Before connecting this workflow, you need a configured extraction pipeline on easybits.

  1. Go to extractor.easybits.tech and click "Create a Pipeline".
  2. Fill in the Pipeline Name and Description – describe the type of document you're processing (e.g. "Invoice / Receipt").
  3. Upload a sample receipt or invoice as your reference document.
  4. Click "Map Fields" and define the following fields to extract:
  • invoice_number (String) – Unique identifier of the invoice, e.g. IN-2026-0022514
  • total_amount (Number) – Total amount due on the invoice, e.g. 149.99
  1. Click "Save & Test Pipeline" in the Test tab to verify the extraction works correctly.
  2. Go to Pipeline Details → View Pipeline and copy your Pipeline ID and API Key.

2. Connect the easybits Node in n8n

  1. Open the HTTP Request node in the workflow.
  2. Replace the Pipeline ID in the URL with your own.
  3. Set up a Bearer Auth credential with your API Key.

> The node sends the PDF to your pipeline and receives the extracted fields back under json.data.


3. Connect Gmail

  1. Open the Gmail Trigger node.
  2. Connect your Gmail account via OAuth2.
  3. Create a label called invoice in Gmail (or use your preferred label).
  4. Update the label filter in the node to match your label.
  5. Make sure Download Attachments is enabled under Options.

> The trigger polls every minute for new emails matching the label.


4. Connect Google Sheets

  1. Open the Check Google Sheets and Add to Master List nodes.
  2. Connect your Google Sheets account via OAuth2.
  3. Select your target spreadsheet (Master Finance File) and sheet.
  4. Make sure your sheet has at least these columns: Invoice Number and Final Amount (EUR).

5. Connect Slack

  1. Go to api.slack.com/apps and create a new Slack App.
  2. Under OAuth & Permissions, add these Bot Token Scopes: chat:write, chat:write.public, channels:read, groups:read, users:read, users.profile:read.
  3. Install the app to your workspace via Settings → Install App.
  4. Copy the Bot User OAuth Token and add it as a Slack API credential in n8n.
  5. Open the Slack: Alert Finance node and select the user or channel to receive duplicate alerts.

6. Activate the Workflow

  1. Click the "Active" toggle in the top-right corner of n8n to enable the workflow.
  2. Label an email with an invoice attachment as invoice in Gmail to test it end to end.
  3. Check your Google Sheet – a new row with the invoice number and amount should appear.
  4. Send the same invoice again – you should receive a Slack DM alerting you to the duplicate.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Check Google Sheets

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4

Block 2 - Already Exists?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 1

Block 3 - Add to Master List

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4

Block 4 - Gmail Trigger

Type / Role
n8n-nodes-base.gmailTrigger - gmailTrigger
Config choices
Version 1.3

Block 5 - Extract from File

Type / Role
n8n-nodes-base.extractFromFile - extractFromFile
Config choices
Version 1.1

Block 6 - Edit Fields

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 7 - HTTP Request

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

Block 8 - Code in JavaScript

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 9 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 11 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - Slack: Alert Finance

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2

Block 13 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Detect duplicate invoice PDFs from Gmail with easybits and Google Sheets
Complexity advanced
Nodes 15
Categories Invoice Processing, AI Summarization
Author Felix
Published 19 Mar 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/14180/14180.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Detect duplicate invoice PDFs from Gmail with easybits and Google Sheets do?

How It Works This workflow automatically detects duplicate invoices from Gmail. Incoming PDF attachments are scanned by the easybits AI Extractor, then checked against the Master Finance File in Go...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Invoice Processing, AI Summarization use case.