Watch Step By Step Video Tutorial Below
1. Setting Up Pabbly Connect for Invoice Data Extraction
To automate invoice data extraction and save it into Google Sheets, we will use Pabbly Connect. Start by accessing the Pabbly Connect dashboard, where you can create a new workflow.
In this workflow, you will set Google Drive as the trigger application. This means that whenever a new invoice is uploaded, the automation will kick in. Select the trigger event as “New File in a Specific Folder” in Google Drive.
2. Connecting Google Drive to Pabbly Connect
After selecting Google Drive as the trigger application, you need to connect it to Pabbly Connect. If you have an existing connection, simply choose it. If not, click on “Add New Connection” and sign in with your Google account.
- Choose your Google account.
- Grant necessary permissions by clicking “Allow”.
- Enter the folder name where invoices are uploaded.
Once connected, click “Save and Send Test Request” to verify the connection. This will ensure that Pabbly Connect can access the folder and detect new files. Make sure to share the invoice file with anyone who has the link to avoid access issues.
3. Setting Up OpenAI with Pabbly Connect
With Google Drive connected to Pabbly Connect, the next step is to set OpenAI as the action application. Choose “Generate Structured JSON Schema” as the action event. This is essential for extracting the invoice data.
Connect to OpenAI by either selecting an existing connection or creating a new one. If creating a new one, you will need to provide an API token from OpenAI. To obtain this, go to your OpenAI account and create a new secret key.
4. Extracting Data from the PDF Invoice
Once OpenAI is set up, you will need to configure it to extract data from the PDF invoice. Enter the prompt specifying the fields you want to extract, such as invoice number, customer name, invoice date, and total amount.
This prompt should instruct OpenAI to create a valid JSON schema for these fields. After entering the prompt, click “Save and Send Request” to receive a structured response containing the extracted data.
- Ensure the fields are set as required in the JSON schema.
- Confirm the response format is correct for mapping.
After receiving the response, you can map the extracted fields to the next step in your workflow.
5. Saving Extracted Data to Google Sheets
The final step is to save the extracted data into Google Sheets using Pabbly Connect. Set Google Sheets as the action application and choose “Add New Row” as the action event. Connect to Google Sheets using an existing or new connection.
Once connected, select the spreadsheet where you want to save the invoice details. Map the fields you extracted from OpenAI to the corresponding columns in your Google Sheets document.
After mapping, click “Save and Send Test Request” to check if the data is saved correctly. If successful, you will see the new row added to your Google Sheets with the invoice details.
Conclusion
This tutorial demonstrated how to automate the extraction of invoice data and save it to Google Sheets using Pabbly Connect. By integrating Google Drive, OpenAI, and Google Sheets, you can streamline your invoicing process efficiently.
With Pabbly Connect, you can enhance your business operations by automating repetitive tasks, making data management easier and more efficient.



