How can I upload a file from HTTP Request node to Airtable?

I’m using an HTTP Request node to create a pdf using Anvil. I’m now trying to figure out how to upload that pdf to Airtable.

{
  "nodes": [
    {
      "parameters": {},
      "name": "Start",
      "type": "n8n-nodes-base.start",
      "typeVersion": 1,
      "position": [
        250,
        300
      ],
      "disabled": true
    },
    {
      "parameters": {
        "interval": 13,
        "unit": "minutes"
      },
      "name": "Interval",
      "type": "n8n-nodes-base.interval",
      "typeVersion": 1,
      "position": [
        810,
        430
      ],
      "disabled": true
    },
    {
      "parameters": {
        "authentication": "basicAuth",
        "requestMethod": "POST",
        "url": "https://app.useanvil.com/api/v1/fill/XnuTZKVZg1Mljsu999od.pdf",
        "responseFormat": "file",
        "jsonParameters": true,
        "options": {},
        "bodyParametersJson": "{\n  \"title\": \"IRS-W4\",\n  \"fontSize\": 14,\n  \"textColor\": \"#cf000a\",\n  \"data\": {\n    \"name\": {\n        \"firstName\": \"Claire\",\n        \"lastName\": \"Robin\"\n    },\n    \"address\": {\n        \"street1\": \"123 Main St\",\n        \"city\": \"San Francisco\",\n        \"state\": \"CA\",\n        \"zip\": \"94124\",\n        \"country\": \"US\"\n    },\n    \"ssn\": \"753284832\",\n    \"filingStatus\": \"Joint\",\n    \"under17Cost\": 2000,\n    \"otherDependentsCost\": 0,\n    \"totalDependentsCost\": 2000,\n    \"otherIncome\": 1500,\n    \"otherDeducations\": 500,\n    \"extraWithholding\": 500,\n    \"employerName\": \"Aaron Jones\",\n    \"firstDateEmployment\": \"2018/03/02\",\n    \"employerEin\": \"5871369\",\n    \"headOfHousehold\": true,\n    \"twoJobs\": false,\n    \"employerAddress\": {\n        \"street1\": \"4832 Market Street\",\n        \"city\": \"San Francisco\",\n        \"state\": \"CA\",\n        \"zip\": \"94103\",\n        \"country\": \"US\"\n    }\n  }\n}"
      },
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        1010,
        430
      ],
      "credentials": {
        "httpBasicAuth": "Anvil Dev"
      }
    },
    {
      "parameters": {
        "operation": "append",
        "application": "appdQtqs4grFntES3",
        "table": "tblbyX4glpkGYz3Zh",
        "options": {}
      },
      "name": "Airtable",
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 1,
      "position": [
        1540,
        440
      ],
      "credentials": {
        "airtableApi": "Airtable API"
      }
    },
    {
      "parameters": {
        "keepOnlySet": true,
        "values": {
          "string": [
            {
              "name": "Email",
              "value": "[email protected]"
            }
          ]
        },
        "options": {
          "dotNotation": false
        }
      },
      "name": "Set",
      "type": "n8n-nodes-base.set",
      "typeVersion": 1,
      "position": [
        1250,
        440
      ]
    }
  ],
  "connections": {
    "Interval": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "Set",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set": {
      "main": [
        [
          {
            "node": "Airtable",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Hey Richard,

Unfortunately, Airtable doesn’t support uploading files via API. A workaround for this is to upload it to a server, and then use the URL of the file.

2 Likes

Thanks @harshil1712! Any recs on a server to upload the file to? I suppose that it can even just temporarily hold the file until I make a copy in Airtable.

@richardjlo I would use AWS S3.

1 Like

Also found a few lightweight services in case AWS is overkill:


Since they are free I would say reliability-wise not great for production/ mission critical but maybe easier for validating the usecase etc.

Thanks @maxT! I ended up just setting up AWS S3. Not too difficult to set up and I just delete the file after I move it over to Airtable. All set now. Thanks team!

1 Like

Great to hear! If you’ve incorporated your side project, I recommend applying for the AWS activate program. Surprisingly, was able to get $1000 worth of credit by filling out a 10min form and simply with an LLC (with nothing more than a 10min landing page + simple angel list page for the org).

It’s called the “Founders Program”: https://aws.amazon.com/activate/gettingstarted/

2 Likes

If not LLC available, I recommend WASABI Storage for simple file storage. It is very good price for who is beginning projects, priced at around 5/6$ per TB and no Egress/Regress charges. The speed in using it as a Media provider is also not bad (Didn’t test in high volume) apps and it works great with n8n.

2 Likes

Hi @richardjlo ,

I ended up with the same question as you but I am not sure of what you did with AWS S3…

Did you find a mean to upload a file from AWS S3 to Airtable ?

Thx !

He used the S3 node cuz the data was in binary format and he needed just a Public endpoint to download the image. You can do the same for example with Google Drive.

Absolutely ! That’s what I did and it works perfectly fine

Thanks to all of you :grinning: !