Describe the problem/error/question
I’m trying to extract information from a picture (some invoices) from my Drive however I’m having some errors when i run the workflow, especially the last node (HTTP request). I used ChatGPT to create this workflow and coding so I dont know if the process/coding is correct. I asked many ways but I’m still the same issue.
Can someone help me with the last part please?
Thanks
What is the error message (if any)?
Please share your workflow
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
{
“nodes”: [
{
“parameters”: {
“authentication”: “predefinedCredentialType”,
“nodeCredentialType”: “googleApi”,
“requestMethod”: “POST”,
“url”: “https://vision.googleapis.com/v1/images:annotate”,
“jsonParameters”: true,
“options”: {},
“bodyParametersJson”: “={\n "requests": [\n {\n "image": {\n "content": "={{$$json.data"]}}"\n },\n "features": [\n {\n "type": "TEXT_DETECTION"\n }\n ]\n }\n ]\n}\n”,
“headerParametersJson”: “=”,
“queryParametersJson”: “=”
},
“id”: “f8904430-7548-4944-bd2a-ee3114f1f25b”,
“name”: “HTTP Request”,
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 2,
“position”: [
-160,
-80
],
“credentials”: {
“actionNetworkApi”: {
“id”: “xANcI5Fpi5Gsp4Qa”,
“name”: “Action Network account”
},
“googleCloudStorageOAuth2Api”: {
“id”: “feF2CXuQZ7YDjztg”,
“name”: “Google Cloud Storage account”
},
“googleApi”: {
“id”: “Egd798tJVx5Xooqm”,
“name”: “Google Service Account account”
}
}
}
],
“connections”: {
“HTTP Request”: {
“main”: [
]
}
},
“pinData”: {},
“meta”: {
“instanceId”: “e2574b071e5449861df44bbaf7696b5d0f0e640de1f5842c961ca67d531ba649”
}
}
Share the output returned by the last node
Information on your n8n setup
- n8n version:
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app):
- Cloud
- Operating system:
- Windows 11
Hey @htofloyd95 hope all is well. Welcome to the community.
Would you mind sharing an example of the picture and what type of information you are looking to extract?
Hi @jabbson
I’m trying to extract Date /Product/ Quant/ Price/ Total
Here is one way to do it:
The final result:
**Seller Information:**
* Dirk van den Broek
* Lange gracht 3
* 2312 NV Leiden
* 088-313 4195
**Date of Purchase:** The receipt does not specify the date of purchase.
**Total Cost:** €28.11
**Purchased Items:**
* **BIO FAIRTRADE BANANE:** 1 x €1.89 = €1.89
* **1DB CHOCOSCHELPJES:** 1 x €1.55 = €1.55
* **ZUIVELM. HALFV. MELK:** 1 x €1.95 = €1.95
* **SCHARRELEIEREN WIT:** 1 x €6.39 = €6.39
* **MERBA COOKIES:** 1 x €1.15 = €1.15
* **1DB OPLOSKOFFIE GOUD:** 1 x €4.99 = €4.99
* **1DB PASTASAUS BOL:** 1 x €1.69 = €1.69
* **1DB TOMATENKETCHUP:** 1 x €1.23 = €1.23
* **DR.DETKER PIZZA BIG:** 1 x €5.79 = €5.79
* **1DB FFD SINAAS/MAND.:** 1 x €1.48 = €1.48
In this example I read the image from disk, but you obviously would read it from another resource. This is just an example.
Could you please share the settings of your nodes?
How should I do it in my workflow? I wanna read the image from my Google Drive
I’m new working with n8n and don’t have much experience coding but i wanna learn more about it, so thanks for your help.
You can click on the nodes in the workflow above and see for yourself. You also can click on the “this workflow’s code” and copy it and then paste directly into your n8n canvas.
In order to read from Google Drive you need to either add google drive trigger, if you need this to happen automagically or you can add a manual trigger and Google Drive action node, which targets a specific gdrive file.
Similarly to Gemini, this can be done with other AIs, here is an example with OpenAI
Final result:
Here is the extracted information from the receipt:
**Seller Information:**
Dirk van den Broek
Lange Gracht 3
2312 NV Leiden
Phone: 088-313 4195
**Date of Purchase:**
Not explicitly listed on the receipt.
**Total Cost:**
€28.11
**Purchased Products:**
- BIO FAIRTRADE BANANE ( 1 x 1.89 ) = 1.89
- 1DB CHOCOSCHELPJES ( 1 x 1.55 ) = 1.55
- ZUIVELM. HALFV. MELK ( 1 x 0.95 ) = 0.95
- SCHARRELEIEREN WIT ( 1 x 6.39 ) = 6.39
- MERBA COOKIES ( 1 x 1.15 ) = 1.15
- 1DB OPLOSKOFFIE GOUD ( 1 x 4.99 ) = 4.99
- 1DB PASTASAUS BOL ( 1 x 1.69 ) = 1.69
- 1DB TOMATENKETCHUP ( 1 x 1.33 ) = 1.33
- DR. OETKER PIZZA BIG ( 1 x 5.79 ) = 5.79
1 Like