This is an automated archive made by the Lemmit Bot.

The original was posted on /r/opensource by /u/SunilKumarDash on 2024-09-04 11:39:44+00:00.


Hi, everyone.

So, I built an AI automation system that handles all the invoices from Gmail and logs essential attributes in a Google sheet.

My mum runs a small biz and usually gets a lot of Invoices, and manually managing them was getting tiring,

So, I created a Python script to automatically extract emails with invoices and update them in a Google sheet.

Tech stack

  • Composio - for Gmail and Google sheet integration.
  • Nanonet - for extracting data from PDF.
  • CrewAI - Agent orchestartion.
  • React +Vite - for frontend

Workflow Overview

  • First, add a few words that will be used to find potential emails with invoices. Then, create a JSON file or something similar. Also, name the attributes that need to be extracted from Invoices.
  • Next, Set up an event listener to poll emails from Gmail inbox. Fetch the emails that match the keywords.
  • Process the PDF attachments based on the names of the attributes provided using an agent built using GPT-4o and CrewAI.
  • Finally, we extract data points from invoice PDF using Nanonet and update them to a Google sheet using the Google Sheet integration.

It still has rough corners, and I need to figure out how to make it more reliable.

You can check the complete code here: .