N8n - Google Cloud Vision API (OCR) + Email Trigger Imap

Hi!
I have a problem in n8n with sending attachments in an HTTP Request for the Cloud Vision API.

  1. The first node is an Email Trigger IMAP where I fetch the attachments.
  2. The second node is a Code node where I convert the attachments to binary.
  3. The third node is an HTTP Request for the Cloud Vision API where I set the body with the attachments.



I’m attaching screenshots showing how it all looks.

  • n8n version: 1.36.4
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main): main
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Railway
  • Operating system:

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

hello @GregNCW

Replace the content value with {{ JSON.stringify($json.base64Attachment) }} (and no quotes around)

You forgot to remove "= before double brackets {{

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.