AI Agents - Usecase on Extraction of Invoices Data from Gmail => Google Sheets

We all know about AI Agents and the benefits of them from the previous article in this blog: Click here. From this article, I am covering the sample AI Agent using a free site -> Relay This site is free for 30 days to create workflows for AI Agents. Their process is very easy to build the agent using GPT, Gemini, etc. models. The good part of this site is that they don't ask our API keys or configuration for any AI model selected. To work on this usecase, we only need our gmail id access credentials as prerequisite. Relay can take care of Google API calls internally to connect to Google sheets & Gmail Inbox.

Snapshot of the agent built in Relay:






























Here are the simple steps to create the agent using Relay:

1) Login/Signup into Relay.

2) Login into Google Sheets: Click here and create a simple sheet like below. This sheet is used to capture/store all the invoices data from Gmail later.







3) Create a instant trigger in Relay site by setting up the necessary configuration mentioned below. This step is basically looking for a Gmail with Sub: Invoice (or) Invoices and the body of the email with Invoice image pasted or Invoice file attached to the email.





















3) Extract the invoice data using GPT-4o-mini model and the data is same as in Step1.


 



















4) After finishing the extraction using GPT model, we need to add them to the sheet in row-by-row fashion. Here is the step to be defined from Relay.





















5) We need to make this agent execute (on) by clicking the radio button given in the Step3. 

6) Send an email to the Gmail with an invoice and allow the agent to pick the invoice to process all the above steps. Below is the snapshot with the attached invoice file.




















Here is the list of runs on the agent successfully:










Here is the final output after running the agent:















This is a very simple usecase to understand the AI agent functionality. I will cover another usecase in my next post and is not this simple :) :)

References:

1) https://google.com

2) https://relay.app

Popular posts from this blog

Connecting Claude to Pega Infinity 25.1.3 via MCP — Step-by-Step

Build Pega Applications with GitHub Copilot CLI, Pega Infinity AI Plugin & MCP — Branch-Based Agentic Authoring

itextpdf API to generate PDF doc from an image file using Pega PE