HTTP Request GET with body

I’m trying to use Seatable API (self hosted), and before creating a row I’d like to check if it already exists. Unfortunately the API requires GET method with the filters in the body and I can’t do that with n8n (no body field shown when GET selected).

I’m thinking of trying to use execute node to call a python script instead (but have to install python in docker, script it and so).

Any idea on how to overcome this?

This is the API documentation:
https://api.seatable.io/#65efccf8-1b3e-49a1-aeed-9df75dcadca9

thanks in advance

Welcome to the community @Lucas_Couto

I would make the HTTP request from a function node instead. By default, requiring packages it’s not allowed, but you can enable it by setting env variables below:

export NODE_FUNCTION_ALLOW_BUILTIN=util

export NODE_FUNCTION_ALLOW_EXTERNAL=request

After that, to make a GET request, you can do something similar to:

const request = require('request')
const { promisify } = require('util');
const rq = promisify(request);


const data = await rq({
uri: "https://pokeapi.co/api/v2/pokemon/ditto",
method: 'GET'
})
return [
  {
    json: JSON.parse(data.body)
  }
];
Example workflow
{
  "nodes": [
    {
      "parameters": {},
      "name": "Start",
      "type": "n8n-nodes-base.start",
      "typeVersion": 1,
      "position": [
        210,
        300
      ]
    },
    {
      "parameters": {
        "functionCode": "// Code here will run only once, no matter how many input items there are.\n// More info and help: https://docs.n8n.io/nodes/n8n-nodes-base.function\nconst request = require('request')\nconst { promisify } = require('util');\nconst rq = promisify(request);\n\n\nconst data = await rq({\nuri: \"https://pokeapi.co/api/v2/pokemon/ditto\",\nmethod: 'GET'\n})\nreturn [\n  {\n    json: JSON.parse(data.body)\n  }\n];"
      },
      "name": "Function",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        840,
        170
      ]
    }
  ],
  "connections": {
    "Start": {
      "main": [
        [
          {
            "node": "Function",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Of course, at all that is assuming that you are self-hosting. If you are using n8n cloud, you do not need to set the env variables.

With regards to not being able to sent a body when doing a GET request. We are aware of that limitation as it’s something that we would include in the version 2 of the node.