How To Use OpenAI Agent Builder with PDFs
Quick Overview
The video demonstrates how to build an AI agent workflow in OpenAI Agent Builder that successfully extracts specific data (Company Address, Total USD, Invoice #) from a PDF invoice and automatically writes that structured data into corresponding columns in a Google Sheet using Zapier integration via an MCP server.
Key Points: The workflow uses a three-step agent sequence: Start -> PDF DATA Agent -> USE DATA Agent. The first agent, 'PDF DATA', is instructed to extract specific data points: Company Address, Total (USD), and Invoice # from the input PDF file. The 'PDF DATA' agent is configured to output structured JSON data, which is then passed to the next step. The second agent, 'USE DATA', is configured to use the Zapier tool (connected via an MCP server) to place the extracted data into specific columns ('Invoice #', 'Company Address', 'Total USD') in a Google Sheet named 'Easy Data'. The 'USE DATA' agent's instructions explicitly map the parsed JSON outputs (e.g., input.outputparsed.invoice#) to the correct Google Sheet columns. The reasoning effort for the second agent is set to 'High' to ensure reliable tool execution, and Zapier tool approval is set to 'Never require approval' for automation. The final result shows the invoice data (Invoice #7, Address, $262.50) successfully written into the Google Sheet in a structured row.
Context: The video is a technical tutorial demonstrating advanced automation capabilities within the OpenAI Agent Builder environment, specifically focusing on handling file inputs (PDFs) and integrating with external services like Google Sheets via Zapier. This process relies on setting up an intermediary structure called an MCP (Multi-Client Platform) server to bridge the Agent Builder environment with third-party tools like Zapier, allowing the AI agent to perform actions outside the builder interface.
Detailed Analysis
The tutorial constructs an AI agent workflow designed to ingest a PDF invoice, extract key financial and identifying details, and then input that data into a Google Sheet. The workflow begins with a 'Start' node, leading to a 'PDF DATA' agent responsible for extraction. This agent is explicitly instructed to look at the invoice PDF and extract the Company Address, Total (USD), and Invoice #, outputting this information in a structured JSON format defined by a custom JSON schema named 'invoicedata'. Following this, the 'USE DATA' agent takes the parsed JSON output from the previous step and uses the Zapier tool, connected through an MCP server, to write the data to a Google Sheet titled 'Easy Data'. The instructions in the 'USE DATA' agent precisely map the extracted JSON fields (like input.outputparsed.companyaddress) to the respective column headers in the spreadsheet. The reasoning effort for the final agent is set to 'High' to maximize reliability, and the Zapier tool is configured to run without requiring manual approval for each execution. The demonstration concludes by showing the successful execution where Invoice #7, the company address, and the total amount ($262.50) are correctly populated as a new row in the designated Google Sheet.