Skip to main content

Send milestone billing invoices with Google Sheets, GPT-4o mini, Gmail and Slack

Workflow preview

Workflow preview
100%
Send milestone billing invoices with Google Sheets, GPT-4o mini, Gmail and Slack preview
Open on n8n.io

1. Workflow Overview

Quick Overview This workflow polls a Google Sheets milestone tracker every 15 minutes, calculates milestone based invoice amounts, uses OpenAI (gpt 4o mini) to draft invoice messaging, emails the i...

Best for

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

Tools used

n8n-nodes-base.errortrigger, n8n-nodes-base.slack, n8n-nodes-base.stickynote, n8n-nodes-base.scheduletrigger, n8n-nodes-base.googlesheets, n8n-nodes-base.code, n8n-nodes-base.if, @n8n/n8n-nodes-langchain.openai

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Send milestone billing invoices with Google Sheets, GPT-4o mini, Gmail and Slack
Workflow name
Send milestone billing invoices with Google Sheets, GPT-4o mini, Gmail and Slack

Quick Overview

This workflow polls a Google Sheets milestone tracker every 15 minutes, calculates milestone-based invoice amounts, uses OpenAI (gpt-4o-mini) to draft invoice messaging, emails the invoice via Gmail with an approval link, then records approval in Google Sheets and notifies an accounts Slack channel.

How it works

  1. Runs every 15 minutes and reads milestone rows from a Google Sheets “Milestones” tab.
  2. Filters for milestones where % Complete is at or above the Invoice Trigger % and the Invoice Status is Pending.
  3. Calculates the billable amount, generates an invoice ID, and asks OpenAI (gpt-4o-mini) to return a JSON invoice narrative, payment terms, email subject, and HTML email body.
  4. Builds an approval URL token, generates a styled HTML invoice document, and sends the invoice email to the client via Gmail with an Approve Invoice button.
  5. After the email step returns an approval result, updates the milestone status to Sent, appends a record to the Google Sheets “Invoice Log” tab, and stamps the approval timestamp in the Milestones tab.
  6. Posts a Slack message to the accounts team with the milestone ID and approval timestamp, and sends a Slack alert if the workflow errors.

Setup

  1. Add Google Sheets OAuth2 credentials and replace the spreadsheet document ID and sheet tabs for both the “Milestones” and “Invoice Log” operations.
  2. Add an OpenAI credential (used with the gpt-4o-mini model) and adjust the prompt/model if you want different invoice wording.
  3. Add a Gmail OAuth2 credential and update the recipient address in the Gmail node ([email protected]) to your client email field or target address.
  4. Add Slack OAuth2 credentials and replace both Slack channel IDs (error alerts and accounts notifications) with your workspace channels.
  5. Replace YOUR_N8N_WEBHOOK_BASE_URL in the approval URL builder with your live n8n base URL and ensure your Milestones sheet includes the required columns (Milestone ID, Contract ID, Client Name, % Complete, Invoice Trigger %, Contract Value ($), Invoice Status, Currency).

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 - On Workflow Error

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

Block 2 - Slack – Send Error Alert

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

Block 3 - Section: Error Handler

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

Block 4 - Overview – Invoice Bridge

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

Block 5 - Section: Trigger & Filter

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

Block 6 - Section: Billing & AI Narrative

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

Block 7 - Section: Invoice Delivery

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

Block 8 - Section: Approval & Logging

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

Block 9 - Section: Slack Notification

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

Block 10 - Credentials & Security

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

Block 11 - Schedule – Poll Milestones1

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

Block 12 - Sheets – Read Milestones1

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

Block 13 - Filter – Ready to Invoice1

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

Block 14 - IF – Skip if None Ready1

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

Block 15 - Code – Calculate Billable Amount1

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

Block 16 - GPT-4o – Write Invoice Narrative1

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1

Block 17 - Code – Merge GPT + Build Approval URL1

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

Block 18 - Code – Generate HTML Invoice1

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

Block 19 - Gmail – Send Invoice to Client1

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

Block 20 - Sheets – Mark Invoice as Sent1

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

Block 21 - Sheets – Log Invoice1

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

Block 22 - Sheets – Update Approval Status1

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

Block 23 - Slack – Notify Accounts Team1

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

Block 24 - If1

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

3. Summary Table

Workflow Send milestone billing invoices with Google Sheets, GPT-4o mini, Gmail and Slack
Complexity advanced
Nodes 24
Categories Invoice Processing, Multimodal AI
Author Rahul Joshi
Published 15 Jun 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/16377/16377.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 milestone billing invoices with Google Sheets, GPT-4o mini, Gmail and Slack do?

Quick Overview This workflow polls a Google Sheets milestone tracker every 15 minutes, calculates milestone based invoice amounts, uses OpenAI (gpt 4o mini) to draft invoice messaging, emails the i...

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, Multimodal AI use case.