Google Cloud Storage connecting with Document AI from Google

Describe the problem/error/question

I managed to upload files (PDFs) that I got in a certain folder in my dropbox to google cloud storage. From there I want the OCR Ai software document AI which is also from google to read the pdfs (also hand written notes) and give me the text back so I can work with text in another chat gpt node. It always fails when I want to reference the google cloud storage files. N8N is putting /n after every file name that I provide. I’m trying with a http request. Does anybody have similar problems or an easier way of giving chat gpt the text of pdfs. Normals OCR-programms have not worked so far because they can#t read handwritten notes.

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.)

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):
  • Operating system:

Hi @immoworkflow, welcome!

This is actually a known mistake that many of us run into from time to time,
The /n is usually caused by an extra trailing space in the expression:

I’d advise you to review the node that references or creates the file name, look for any extra spaces/new line, and remove them..

Thank you for your input @mohamed3nan I tried to rename the file name but it just puts another /n and now even three /n/n/n. Is there any way how I can find out where it happens.

Can you screenshot that? I’m pretty sure you forgot to remove a space from the field with the expression..

I tried it with some JavaScript and now it did actually work. Thank you

1 Like