Skip to main content

Send AI-written invoice emails and payment reminders with Google Sheets, Gmail, Telegram and Groq

Workflow preview

Workflow preview
100%
Send AI-written invoice emails and payment reminders with Google Sheets, Gmail, Telegram and Groq preview
Open on n8n.io

1. Workflow Overview

Quick overview This workflow automates invoicing and payment follow ups using Google Sheets, PDFShift, Groq (LLM), Gmail, and Telegram, sending initial invoices with PDF attachments, scheduling ove...

Best for

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

Tools used

n8n-nodes-base.scheduletrigger, n8n-nodes-base.googlesheets, n8n-nodes-base.if, n8n-nodes-base.code, n8n-nodes-base.switch, n8n-nodes-base.set, n8n-nodes-base.gmail, n8n-nodes-base.telegram

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Send AI-written invoice emails and payment reminders with Google Sheets, Gmail, Telegram and Groq
Workflow name
Send AI-written invoice emails and payment reminders with Google Sheets, Gmail, Telegram and Groq

Quick overview

This workflow automates invoicing and payment follow-ups using Google Sheets, PDFShift, Groq (LLM), Gmail, and Telegram, sending initial invoices with PDF attachments, scheduling overdue reminders at 9am, and letting you mark invoices as paid via a Telegram command with automatic thank-you emails and sheet updates.

How it works

  1. Triggers when a new row is added to a Google Sheets “Client Invoices” spreadsheet to start the invoice-sending flow.
  2. Generates an HTML invoice, converts it to a PDF via the PDFShift API, and uses Groq to draft a short invoice email.
  3. Sends the invoice email via Gmail with the generated PDF attached, then updates the Google Sheet to set Status to Unpaid and log the send date.
  4. Runs every morning at 9am, reads all invoices from Google Sheets, filters for Status = Unpaid, and calculates how many days each invoice is overdue.
  5. Routes each unpaid invoice to a 7-day, 14-day, or 30-day reminder track based on overdue days and whether prior reminders were already sent.
  6. Uses Groq to write the appropriate reminder email, sends it via Gmail, posts a notification to Telegram, and updates the Google Sheet to flag the reminder as sent.
  7. Triggers on incoming Telegram messages, parses commands starting with “paid”, looks up the matching client in Google Sheets, marks the invoice as Paid, emails the client a thank-you via Gmail, and confirms back on Telegram (or sends a “client not found” message).

Setup

  1. Connect credentials for Google Sheets (read/update and trigger), Gmail, Telegram, and Groq.
  2. Add PDFShift credentials as HTTP Basic Auth for the PDF conversion request (or replace the PDF generation step with your preferred PDF service).
  3. Create/confirm the Google Sheets columns used by the workflow, including Client Name, Client Email, Service, Amount, Invoice Date, Due Date, Status, Notes, First Reminder Sent, Second Reminder Sent, and Final Notice Sent (and optional Currency).
  4. Update the Google Sheets document ID/sheet tab, and set the Telegram chat ID(s) used for owner notifications and bot replies.
  5. Adjust the schedule trigger time (9am) and reminder thresholds (7/14/30 days) and email wording/subjects as needed for your billing policy.

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 - Every Morning at 9am1

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

Block 2 - Read All Invoices1

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

Block 3 - Filter Unpaid Invoices1

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

Block 4 - Calculate Days Overdue1

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

Block 5 - Route by Reminder Type1

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

Block 6 - Extract First Email1

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

Block 7 - Send First Reminder Email1

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.2

Block 8 - Telegram - First Reminder Sent1

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 9 - Update Sheet - First Reminder1

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

Block 10 - Extract Second Email1

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

Block 11 - Send Second Reminder Email1

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.2

Block 12 - Telegram - Second Reminder Sent1

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 13 - Update Sheet - Second Reminder1

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

Block 14 - Extract Final Email1

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

Block 15 - Send Final Notice Email1

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.2

Block 16 - Telegram - Final Notice Sent1

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 17 - Update Sheet - Final Notice1

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

Block 18 - Generate Invoice HTML

Type / Role
n8n-nodes-base.html - html
Config choices
Version 1.2

Block 19 - Send Initial Invoice

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.2

Block 20 - Update Sheet - Invoice Sent

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

Block 21 - Telegram - Mark as Paid

Type / Role
n8n-nodes-base.telegramTrigger - telegramTrigger
Config choices
Version 1.2

Block 22 - Check Paid Command

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

Block 23 - Extract Client Name

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

Block 24 - Find Client Invoice

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

Showing the first 24 of 51 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Send AI-written invoice emails and payment reminders with Google Sheets, Gmail, Telegram and Groq
Complexity advanced
Nodes 51
Categories Invoice Processing, AI Summarization
Author Harshil Khunt
Published 27 May 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/15973/15973.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 Send AI-written invoice emails and payment reminders with Google Sheets, Gmail, Telegram and Groq do?

Quick overview This workflow automates invoicing and payment follow ups using Google Sheets, PDFShift, Groq (LLM), Gmail, and Telegram, sending initial invoices with PDF attachments, scheduling ove...

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.