# Invoice automation with ChatGPT

**URL:** <https://community.make.com/t/invoice-automation-with-chatgpt/37549>\
**Category:** Questions\
**Tags:** chatgpt\
**Created:** [May 15, 2024, 2:45pm UTC](https://community.make.com/t/invoice-automation-with-chatgpt/37549 "2024-05-15T14:45:27Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alvaro\_Zaragoza](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@Alvaro\_Zaragoza](https://community.make.com/u/Alvaro_Zaragoza)\
**Post date:** [May 15, 2024, 2:45pm UTC](https://community.make.com/t/invoice-automation-with-chatgpt/37549/1 "2024-05-15T14:45:27Z")

</div>

Hello,  
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](https://community.make.com/t/create-a-json-out-of-a-pdf-or-jpg-with-chat-gpt/22337)

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.

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/4/b/4b8a407e1822a1dbfc9b93f252517416bf5a1934.png)

Someone can help me. Thanks!

---

<div class="post-metadata">

**Author:** ![Bilal\_Mansouri](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/bilal_mansouri/32/34065_2.png) [@Bilal\_Mansouri](https://community.make.com/u/Bilal_Mansouri)\
**Post date:** [May 15, 2024, 4:17pm UTC](https://community.make.com/t/invoice-automation-with-chatgpt/37549/2 "2024-05-15T16:17:11Z")

</div>

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](https://slicedinvoices.com/pdf/wordpress-pdf-invoice-plugin-sample.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.

 ![Screenshot 2024-05-15 at 5.11.41 PM](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/9/a/9a953966e8c0e49ea1d4cdef32680fd2b70fcea0.jpeg)

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.

 ![Screenshot 2024-05-15 at 5.13.03 PM](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/9/a/9ae465618e59b61883f24e0c4fd59aa5a21579e4.jpeg)

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?

---

<div class="post-metadata">

**Author:** ![Natalia\_Grech](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/natalia_grech/32/20246_2.png) [@Natalia\_Grech](https://community.make.com/u/Natalia_Grech)\
**Post date:** [May 16, 2024, 10:15am UTC](https://community.make.com/t/invoice-automation-with-chatgpt/37549/3 "2024-05-16T10:15:42Z")

</div>

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](https://community.make.com/uploads/short-url/tCEzixloVT5c360grvoou388DA0.json) (25.1 KB)

---

<div class="post-metadata">

**Author:** ![Alvaro\_Zaragoza](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@Alvaro\_Zaragoza](https://community.make.com/u/Alvaro_Zaragoza)\
**Post date:** [May 16, 2024, 12:54pm UTC](https://community.make.com/t/invoice-automation-with-chatgpt/37549/4 "2024-05-16T12:54:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Alvaro\_Zaragoza](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@Alvaro\_Zaragoza](https://community.make.com/u/Alvaro_Zaragoza)\
**Post date:** [May 16, 2024, 12:59pm UTC](https://community.make.com/t/invoice-automation-with-chatgpt/37549/5 "2024-05-16T12:59:24Z")

</div>

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?

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/6/d/6d693f64e631db292e43baea8239cf7c349e2c71.png)

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.

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/d/1/d1060d37fee7a31ee449a81f37c3fb0dd0a7022e.png)

---

<div class="post-metadata">

**Author:** ![PDF.co](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/pdf.co/32/28447_2.png) [@PDF.co](https://community.make.com/u/PDF.co)\
**Post date:** [May 16, 2024, 9:59pm UTC](https://community.make.com/t/invoice-automation-with-chatgpt/37549/6 "2024-05-16T21:59:38Z")

</div>

Hello [Alvaro\_Zaragoza](https://community.make.com/u/Alvaro_Zaragoza),

[PDF.co](http://PDF.co) 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](https://pdf.co/tutorials/parse-all-pdf-invoices-from-google-drive-to-google-sheets-make)

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

---

<div class="post-metadata">

**Author:** ![alex.newpath](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/alex.newpath/32/84_2.png) [@alex.newpath](https://community.make.com/u/alex.newpath)\
**Post date:** [May 17, 2024, 12:20am UTC](https://community.make.com/t/invoice-automation-with-chatgpt/37549/7 "2024-05-17T00:20:15Z")

</div>

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](https://community.make.com/u/alex.newpath/summary)  
Director of NewPath Consulting - we are 🦸 [Make Heroes](https://newpathconsulting.com/make-hero)! 🦸🏽‍♀️

❤️‍🔥 [Check out my series of videos and scenario walkthroughs for Make Newbies](https://community.make.com/t/make-for-make-newbies-video-series/37733) ❤️‍🔥

[My Solutions on Make Community](https://community.make.com/u/alex.newpath/activity/solved)

---

<div class="post-metadata">

**Author:** ![Alvaro\_Zaragoza](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@Alvaro\_Zaragoza](https://community.make.com/u/Alvaro_Zaragoza)\
**Post date:** [May 17, 2024, 10:08am UTC](https://community.make.com/t/invoice-automation-with-chatgpt/37549/8 "2024-05-17T10:08:51Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Alvaro\_Zaragoza](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@Alvaro\_Zaragoza](https://community.make.com/u/Alvaro_Zaragoza)\
**Post date:** [May 17, 2024, 10:14am UTC](https://community.make.com/t/invoice-automation-with-chatgpt/37549/9 "2024-05-17T10:14:20Z")

</div>

Hey Alex,  
thanks for your message.

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

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/d/a/dab3a158aa7dccd13b2a8871340f75a2f8c5864e.png)

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.

![image](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/d/9/d9b97b1e86c8b0db25396c480ce72e56555b0a9b.png)

I have followed the steps in this thread as well: [Create a JSON out of a pdf or jpg with chat gpt](https://community.make.com/t/create-a-json-out-of-a-pdf-or-jpg-with-chat-gpt/22337) but I can’t find a solution to read the PDF file on the upload openai folder.

Thanks

---

<div class="post-metadata">

**Author:** ![samliew](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/samliew/32/13327_2.png) [@samliew](https://community.make.com/u/samliew)\
**Post date:** [May 17, 2024, 1:00pm UTC](https://community.make.com/t/invoice-automation-with-chatgpt/37549/11 "2024-05-17T13:00:01Z")

</div>

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](https://community.make.com/t/my-openai-assistant-via-make-dont-use-the-existing-uploaded-files/34928/2)

[samliew](https://samliew.com/services) – [request private consultation](https://samliew.com/request-quote?ServiceType=Automation%20Consultation&Referrer=Make)

> Join the unofficial [Make Discord server](https://samliew.com/make-discord-invite) to chat with us!

---

<div class="post-metadata">

**Author:** ![Make\_Bot](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/make_bot/32/14661_2.png) [@Make\_Bot](https://community.make.com/u/Make_Bot)\
**Post date:** [August 15, 2024, 1:04pm UTC](https://community.make.com/t/invoice-automation-with-chatgpt/37549/12 "2024-08-15T13:04:09Z")

</div>


