Cannot download pdf file from Airtable

Describe the problem/error/question

I have a simple workflow that:

  1. Gets a file with a GET request
  2. Create a record in a NocoDB table

What is the error message (if any)?

When I set:

  • data : Error Bad request - please check your parameters. { "msg": "No attachment provided!" }
  • {{ data }}: The record is successully created with the data excepted for the file which is not showing in the NocoDB row. I do not have any error displayed.
  • {{ $binary}} or {{ $binary.data }}: I have the following error : The item has no binary field '[object Object]' [item 0].

Share the output returned by the last node

The previous node correctly gets the file : If I click on View I can see the pdf correctly.

What should I put it the last field?

Information on your n8n setup

  • n8n version: 1.57.0
  • Database: SQLite
  • n8n EXECUTIONS_PROCESS setting: own
  • Running n8n via: Docker
  • Operating system: Windows 11

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 @LucBerge thanks for bringing this to our attention.

I had a look in your use-case and I tried to implement it and I managed by doing the following:

1- On the Field name, use the Fixed option(not the expression) and set it as data.

I tested and it worked for me. the only thing is that my binary object is called Upload_File instead of data.

Here is the configuration image for your reference:

And here is the snippet image in my NocoDB:

Screenshot 2024-09-11 at 13.30.24

I found a previous discussion around it that can be useful: Nocodb save file from Webhook in Attachment filed - #4 by MutedJam

Let us know if this helps!

Cheers,

Flavio

Hey @Flavio_Orfano ,
Thing are getting interesting:

I already tried to set the field to fixed data but I have the error : Bad request - please check your parameters { "msg": "No attachment provided!" }. Makes sence because data == {{ data }}.

But what is interesting is that it is working with an image I got online but not a pdf I got from Airtable. Notice the button Download visible for the picture but not the pdf. You have the Download button as well. It is just like if the previous step did not download the pdf file correctly.


I am still investigating…

I found the problem but not the solution. The issue is in the download step.

I have a Airtable table with two records:

  • The first has a pdf file attached
  • The second has a jpg file attached

What I do:

  1. List the records
  2. Download the files with a simple GET request

The results are different. The File Name is missing for the pdf file. Why so ?
It is like if the pdf was not correctly downloaded. Could explain why the Download button is missing?

@LucBerge thanks for sharing the details of your investigation. It makes sense.

About the option to use the fixed value instead of Expression, I think the issue for you was that you used {{ data}}. You should not use the curl brackets but purelly string data without anything sorrounding it. I am uploading an image from my test for reference:

Screenshot 2024-09-11 at 14.57.08

@Flavio_Orfano This is not the issue. Try to download a pdf file from Airtable and upload it to NocoDB (or anything else).

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