Invoice automation with ChatGPT

I’m trying to create a scenario to automate the invoices that suppliers send me to include them in a Google Sheet. The file they always send me is PDF, so I’ve been trying to create an integration scenario with ChatGPT following this thread: Create a JSON out of a pdf or jpg with chat gpt

I currently have the following scenario:

  1. Google Drive - Look at files in folder.
  2. Google Drive - Download file
  3. ChatGPT - Upload file
  4. Message to a Assistant (Here the problem as it tells me that the file may be empty or has no content to process)
  5. It would be to create a record in a GoogleSheet row with the extracted data.

Up to point 3 everything works correctly, as the file is correctly uploaded to the storage of my Openai account.

If I use the assitants section of the openai platform, and I indicate the ID of the PDF file that I have uploaded, the assistant chat with the prompt that I have indicated returns the data extraction correctly. The problem I have is with the Make widget to send a message to the wizard that does not let me read the document.

I leave screenshot of the configuration of the ChatGPT widget send message to the wizard, it has a model of gpt3.5-turbo, I have tried gpt4.0 and gpt4.0-turbo, getting the same result.

Someone can help me. Thanks!

Since you’re dealing with PDF files and need to extract data to insert into a Google Sheet, you might want to consider using a dedicated service like LlamaParse.

Here’s how we integrate LlamaParse:

  1. LlamaParse - Parse Document:
  • In this step, you provide the URL of the Example PDF file to LlamaParse. LlamaParse processes this document and prepares it for extraction into various formats. The configuration includes specifying the language and additional parsing instructions to ensure accurate data extraction.

  1. Output Formats (JSON, Markdown, Text):
  • JSON: The parsed data is structured into JSON format, which is ideal for integrations and further automated processing, such as updating databases or other applications.
  • Markdown: This format is useful for creating human-readable documents and reports. It’s structured yet simple, making it easy to read and use in content management systems.
  • Text: Extracting plain text is useful for simple logging, further text processing, or cases where the structure is less important than the raw data.

if you’re interested in a custom setup , feel free to reach out. I can help you tailor the solution to meet your specific business needs. Would you like to test out our custom LlamaParse application?

Hello, @Alvaro_Zaragoza
That thread was initiated by me and I can share with you the scenario I created with the help of other user.
The scenario goes until the creation of the json file, but I have not tested in a while. With all the changes in GPT it may not work anymore.
I hope it helps.
Best regards
Convert Invoice in json data.json (25.1 KB)

Thanks for the proposal, but I don’t want to use another third party integration to parse the PDF, when I have found scenarios that do it directly with ChatGPT.

1 Like

Hello @Natalia_Grech ,
Thanks for sharing your scenario with me, but I have a question about it.

In the latest ChatGPT widget in the content messages you deliver to ChatGPT the ‘18.URL’ field, can you tell me where you are mapping that field from?

I have tried giving the document ID of the upload to the ChatGPT storage, but it keeps telling me that it can’t read it.

Hello Alvaro_Zaragoza, offers the Document Parser tool, which allows you to automate the extraction of data from your invoices. By creating a template, you can easily extract the desired data from your PDF invoices. We have a tutorial guide available that demonstrates how to extract invoices and save the extracted data to Google Sheets at this link: Tutorial Guide

If you have any questions or need assistance, please let us know.

That file ID has to be a result of uploading the file to ChatGPT. But it looks like it is the fileID from step 2 the google drive upload? Or am I not understanding it correctly. A picture of the full scenario would help.

Alex Sirota
Director of NewPath Consulting - we are :superhero: Make Heroes! :woman_superhero:t4:

:heart_on_fire: Check out my series of videos and scenario walkthroughs for Make Newbies :heart_on_fire:

My Solutions on Make Community


Thanks for the proposal, but as I indicated I don’t want to use a third integration widget to do a job that ChatGpt can do.

Hey Alex,
thanks for your message.

I leave you an image of the scenario I have now, but it fails to read the document.

The ID I am currently giving it is from widget 8, which is associated with the upload of the file to the Openai storage. The problem is that the read command tells me that it does not have access to that document, but it is uploaded to the uploads folder.


I have followed the steps in this thread as well: Create a JSON out of a pdf or jpg with chat gpt but I can’t find a solution to read the PDF file on the upload openai folder.


I don’t think chat completion can access files like that. You should be able to do it with custom assistants.

For more information, see My OpenAI assistant via make don't use the existing uploaded files - #2 by samliew

samliewrequest private consultation

Join the unofficial Make Discord server to chat with us!