Please fill in the questionnaire below.
Technical Help Questionnaire
Have you read and followed the instructions at: *READ ME FIRST* Technical Help FAQs - #2 by nigel ?
Answer: Yes I have.
Describe the problem
Describe, step by step, how to reproduce the error or problem you are encountering.
I am building an n8n workflow, which takes data from my baserow table, that use a Google Docs template to automatically generate documents.
I am using the Google Docs API to replace images, which are placeholders in the template. I have then to use the link (uri) of the image I want the placeholder to be replaced by.
I take this link by getting the row in baserow.
I have then this problem: the url does not work. Sometimes it does, sometimes it does not. I tried to look for some logic but I can’t find any. For some reasons that I do not understand, without touching anything in the configuration of the node, it randomly stops working.
To be sure that the problem comes from baserow, I used the link of another random image I found on Imgur. It worked fine, every time.
So the problem comes from the recuperation of that link from baserow.
When I manually access the link, it works fine: I can see the image, so I assume it is public (even more because sometimes it works).
I would like to know if you have already encountered the issue, if so, what am I doing wrong.
Thank you very much.
Every element in n8n has a setting tab where you can set On Error
to Continue
. This will show the error message in the output of the node and should indicate what the problem with the image is.
If it randomly stops, it is possible that this is because there are too many concurrent API requests from the Baserow API. But, we need to have the error information to be sure.
Here is the error of the HTTP node:
message: Bad request - please check your parameters
timestamp: 1719324172095
name: NodeApiError
description:
{\n "error": {\n "code": 400,\n "message": "Invalid requests[0].replaceImage: The provided image was not found.",\n "status": "INVALID_ARGUMENT"\n }\n}\n
context:[empty object]
cause
message:400 - "{\n \"error\": {\n \"code\": 400,\n \"message\": \"Invalid requests[0].replaceImage: The provided image was not found.\",\n \"status\": \"INVALID_ARGUMENT\"\n }\n}\n"
name: AxiosError
stack: AxiosError: Request failed with status code 400\n at settle (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/settle.js:19:12)\n at RedirectableRequest.handleResponse (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:537:9)\n at RedirectableRequest.emit (node:events:531:35)\n at RedirectableRequest.emit (node:domain:488:12)\n at RedirectableRequest._processResponse (/usr/local/lib/node_modules/n8n/node_modules/follow-redirects/index.js:398:10)\n at ClientRequest.RedirectableRequest._onNativeResponse (/usr/local/lib/node_modules/n8n/node_modules/follow-redirects/index.js:91:12)\n at Object.onceWrapper (node:events:634:26)\n at ClientRequest.emit (node:events:519:28)\n at ClientRequest.emit (node:domain:488:12)\n at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:698:27)\n at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17)\n at TLSSocket.socketOnData (node:_http_client:540:22)\n at TLSSocket.emit (node:events:519:28)\n at TLSSocket.emit (node:domain:488:12)\n at addChunk (node:internal/streams/readable:559:12)\n at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)\n at TLSSocket.Readable.push (node:internal/streams/readable:390:5)\n at TLSWrap.onStreamRead (node:internal/stream_base_commons:191:23)\n at TLSWrap.callbackTrampoline (node:internal/async_hooks:130:17)\n at Axios.request (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/Axios.js:45:41)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)\n at requestFn (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:567:33)\n at proxyRequestToAxios (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:570:26)\n at Object.request (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:1992:50)\n at Object.requestOAuth2 (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:1010:12)\n at Object.requestWithAuthentication (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:1233:20)\n at Object.requestWithAuthentication (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:1994:20)
code: ERR_BAD_REQUEST
status: 400
In the workflow, I use several baserow node to retrieve data from different tables and several google docs node to insert/replace data, which may create too much API requests.
If this is the problem, I will try to factorises at maximum similar nodes.
Thank you very much.
Is it possible to show the url of the image as the output so that you can check if all records have an image with a valid url?
The URL is of this kind:
https://baserow-backend-production20240528124524339000000001.s3.amazonaws.com/user_files/1ntX18CSRvzgdNLzew6nIWw658EMnOvi_aa2e20519c2dd41d890a6a81e584d96c14585e91d81e7690acfe70d7ed070416.png
. I can access the image so I would think it is public and accessible.
Can you check if all the urls are correct? Maybe there are some images that cannot be found.
All URLs are correct: I checked by manually putting this URL, which works (with an accessible image) into the Google Docs API request.
The problem is that when I take a random image on Imgur, it works perfectly fine. So I assume the problem of accessibility comes from the request to baserow.