Loading...

We're setting up your new app...

Template

Invoice Tracker

Industry: n/a
Function: Planning_and_Project_Management
Tired of manually processing invoices? This demo automates this tedious task using the power of Gemini, AppSheet's new Gmail integration, and a custom Apps Script library, GeminiApp. * Gmail Integration: AppSheet's new Gmail integration allows you to trigger automations based on incoming emails. I've set it up to monitor a specific Gmail label called "Invoices". * Apps Script Library: Using the "GeminiApp" (available on Github) that simplifies the interaction with Google's Gemini AI models directly from Apps Script. This library handles the heavy lifting of making API calls and managing responses. * Controlled Generation: Gemini's "Controlled Generation" feature lets me define a JSON schema that structures the AI's output. This is key for extracting invoice data in a consistent, machine-readable format. To set this demo up you will either need a Google AI Studio API key or a Google Cloud project with Vertex AI enabled. Information on both these setups is included in the [GeminiApp Setup Instructions](https://github.com/mhawksey/GeminiApp/blob/main/README.md#setup). Once you have these you can follow these steps: 1. click ‘**Copy and Customize**’, then click **OK** on the Error Creating App: Apps Script function is invalid error 2. Navigate to appsheet.com and from your ‘recent’ apps open the ‘Invoice Tracker’ app 3. Open **Automations** and for the **‘New Invoices’** event under the **Gmail Event Source**, click **Authorize** 4. In the **‘Add a new data source**’ enter a name e.g. Invoices Trigger, click the **Gmail** button and follow the authentication steps 5. Once complete in the AppSheet **Automation** settings select your **Gmail account** and a **Label to watch** 6. In the **Process** section click on the GeminiApp task and click on the blue file icon to select your copy of the GeminiApp Controlled Generation Apps Script project file, then click **Authorize** 8. Once Authorize, from the Function Name select `jsonControlledGeneration`
Loading...

How we built this app

See https://www.linkedin.com/pulse/automating-data-extraction-gemini-api-controlled-new-gmail-hawksey-v2ese/
Start for free