๐Ÿงพ Convert emailed timesheets into QuickBooks invoices with OCR, AI, Gmail and Sheets

โšก 43 views ยท ๐Ÿงพ Invoice Processing

Description

AI-Powered Timesheet โ†’ Invoice Automation (Gmail + OCR + AI + Google Sheets + QuickBooks)

> Note: This workflow uses sticky notes extensively to document each logical section of the automation. Sticky notes are mandatory and already included to explain OCR, AI parsing, folder logic, duplicate handling, and QuickBooks steps.

This workflow automates the full lifecycle of timesheet-based invoicing โ€” from emailed timesheets to structured Google Sheets records and finalized invoices in QuickBooks Online.

It is designed for real-world billing scenarios, including split weeks across months, zero-hour months, duplicate prevention, and first-week-of-year edge cases.


What This Workflow Does


High-Level Workflow Stages

  1. Gmail Intake and Attachment Loop
  2. OCR Text Extraction
  3. AI-Based Timesheet Parsing
  4. Month Normalization and Validation
  5. Customer & PO Lookup
  6. Drive Folder Discovery and Creation
  7. Invoice Sheet Reuse or Creation
  8. Duplicate and Edge-Case Handling
  9. Append Invoice Rows to Google Sheets
  10. Create / Update Customers in QuickBooks
  11. Create Invoices in QuickBooks

Each of these stages is clearly documented with sticky notes inside the workflow canvas.


Quick Setup Instructions

  1. Import the workflow JSON into your n8n instance
  2. Configure credentials for:
    • Gmail
    • Google Drive
    • Google Sheets
    • OpenAI or Google Gemini
    • QuickBooks Online
  3. Verify the OCR HTTP node:
    • Default URL: https://universal-file-to-text-extractor.vercel.app/extract
    • No hardcoded API keys are used
  4. Configure Get Customer Info From PO Sheet:
    • Spreadsheet ID
    • Sheet name and column mappings
  5. Ensure the Client Invoices root folder exists in Google Drive
  6. Send a test timesheet email
  7. Execute the workflow once manually
  8. Activate the workflow

Who This Workflow Is For


Requirements


How It Works (Detailed)

1. Email Intake and Attachment Loop


2. OCR Extraction


3. AI Timesheet Parsing (Month-Wise)

Special handling included:


4. Month Normalization and Validation


5. Customer and PO Lookup


6. Google Drive Folder Structure

The workflow enforces a strict hierarchy:

Client Invoices โ””โ”€โ”€ Client โ””โ”€โ”€ Employee โ””โ”€โ”€ Year

Missing folders are created automatically.



8. Duplicate Prevention and Edge Cases


9. Google Sheets Invoice Rows

Each appended row includes:


10. QuickBooks Integration

All QuickBooks logic is documented with sticky notes.


How To Customize


Common Use Cases


Troubleshooting

IssueLikely Cause
No invoices createdGmail filter mismatch or email already read
OCR output emptyUnsupported file or OCR endpoint issue
Wrong month splitReview AI prompt and month logic
Duplicate rowsDuplicate detection conditions
Invoice missing in QuickBooksCustomer or item configuration issue

Notes on Community Guidelines


Need Help or Customization?

Digital Biz Tech can help tailor this workflow to your business.

We offer free setup support, including credential configuration and deployment.

Contact: rajeet.nair@digitalbiz.tech
Website: https://www.digitalbiz.tech
LinkedIn: https://www.linkedin.com/company/digital-biz-tech/
You can also DM us on LinkedIn for any help.

You can also DM us on LinkedIn.

๐Ÿ”— Nodes Used

Google Sheets, HTTP Request, Google Drive, QuickBooks Online, Gmail Trigger, AI Agent

๐Ÿ“ฅ Import

Download workflow.json and import into n8n: Workflow menu โ†’ Import from File

๐Ÿ“– Importing guide ยท ๐Ÿ”‘ Credential setup