AI Invoice Agent

Go to Workflow
0 views
Built by Rakin Jakaria Rakin Jakaria
Created on June 05, 2026

Description

πŸ“„ AI Invoice Agent

The AI Invoice Agent automates the invoice creation, email delivery, and status tracking process for client billing. It ensures invoices are generated, sent professionally, and updated in Google Sheets with minimal manual work.

πŸ”Ή How It Works

Trigger

Activated manually (Execute Workflow) when you want to process invoices.

Fetch Invoices

Reads client invoice data from a Google Sheet (Client Invoices).

Filter Pending Invoices

Passes through only invoices with Status = Pending.

Prepare Invoice Data

Collects and formats details:

Invoice ID
Client Name & Address
Project Name
Amount (USD)
Invoice Date (today’s date)
Due Date (7 days later)

Loop Over Invoices

Processes each invoice one by one.

AI Email Draft

Uses GPT-4.1-mini to generate a polite, professional email.
Tone: friendly but business-oriented.
Signed as Upward Engine Team.

Extract Email Parts

Separates subject and body from the AI output using an Information Extractor.

Generate Invoice PDF

Uses CraftMyPDF to create a formatted invoice PDF with:

Company details (Upward Engine)
Client details
Invoice ID, Date, Due Date
Amount due
Footer message

Send Email to Client

Sends invoice email via Gmail, attaching the PDF invoice.

Update Invoice Status

Updates Google Sheets to mark the invoice as Completed.
Saves Invoice ID, Date, Due Date, and updated status.

Loop Continuation

Continues until all pending invoices are processed.

πŸ”Ή Tools & Integrations

Google Sheets** β†’ Stores client & invoice data
Filter Node** β†’ Selects only Pending invoices
GPT-4.1-mini (OpenAI)** β†’ Generates professional emails
Information Extractor** β†’ Separates subject & body
CraftMyPDF** β†’ Creates PDF invoices
Gmail** β†’ Sends invoice emails with PDF attachments

πŸ”Ή Example Workflow

βœ… Google Sheets: Invoice marked as Pending
➑️ AI generates email β†’ β€œInvoice INV-1023 for Web Design Project – Due Sep 5”
➑️ PDF invoice created & attached
➑️ Email sent to client with subject + body
➑️ Status updated in Google Sheet β†’ Completed

⚑ This agent ensures zero missed invoices, professional client communication, and up-to-date tracking β€” fully automated for agencies and small businesses.

Nodes Used (5)

AI Agent
@n8n/n8n-nodes-langchain.agent
Gmail
n8n-nodes-base.gmail
Google Sheets
n8n-nodes-base.googleSheets
Information Extractor
@n8n/n8n-nodes-langchain.informationExtractor
OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi