Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NocoDB API Change since version 0,9 #3170

Closed
lubeda opened this issue Apr 21, 2022 · 15 comments
Closed

NocoDB API Change since version 0,9 #3170

lubeda opened this issue Apr 21, 2022 · 15 comments

Comments

@lubeda
Copy link

lubeda commented Apr 21, 2022

the nocodb node isn't working with nocodb Version from 0.9

the nocodb api changed with the new version see here https://all-apis.nocodb.com/#tag/DB-table-row and here nocodb/nocodb#1564

@Joffcom
Copy link
Member

Joffcom commented Apr 22, 2022

Hey @lubeda,

It looks like a PR has been submitted to resolve this here #3146 it won't help with the old URLs not working but it will mean you should be able to use the newer paths.

@Joffcom
Copy link
Member

Joffcom commented Apr 22, 2022

Looks like there is a fix prepared for NocoDB here: nocodb/nocodb#1831 which is handy.

@Joffcom
Copy link
Member

Joffcom commented Apr 27, 2022

Hey @lubeda,

It looks like v0.90.7 of NocoDB should now work with the older APIs although it looks like the data structure has changed so you may need to update your workflow a bit.

I think we can mark this one as solved for now as the initial issue is solved for now, What do you think?

@ed-parsadanyan
Copy link

ed-parsadanyan commented Apr 28, 2022

@Joffcom I have tested with the docker NocoDB v0.90.8 today. It seems that NocoDB node is able to GET data, however when I try to update the database I still see error:

{
   "name":"NodeApiError",
   "cause":{
      "message":"404 - \"<!DOCTYPE html>\\n<html lang=\\\"en\\\">\\n<head>\\n<meta charset=\\\"utf-8\\\">\\n<title>Error</title>\\n</head>\\n<body>\\n<pre>Cannot PUT /nc/n8n_multilang_bot_wzhb/api/v1/TG_users/bulk</pre>\\n</body>\\n</html>\\n\"",
      "name":"Error",
      "stack":"Error: Request failed with status code 404\n    at createError (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/createError.js:16:15)\n    at settle (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/settle.js:17:12)\n    at IncomingMessage.handleStreamEnd (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:269:11)\n    at IncomingMessage.emit (node:events:538:35)\n    at endReadableNT (node:internal/streams/readable:1345:12)\n    at processTicksAndRejections (node:internal/process/task_queues:83:21)"
   },
   "node":{
      "parameters":{
         "resource":"row",
         "operation":"update",
         "projectId":"n8n_multilang_bot_wzhb",
         "table":"TG_users",
         "id":"={{$node[\"CheckUser\"].json[\"id\"]}}",
         "dataToSend":"defineBelow",
         "fieldsUi":{
            "fieldValues":[
               {
                  "fieldName":"TG_account_ID",
                  "binaryData":false,
                  "fieldValue":"={{$node[\"chatID\"].json[\"chatID\"]}}"
               },
               {
                  "fieldName":"Last_language_used",
                  "binaryData":false,
                  "fieldValue":"={{$node[\"Telegram Trigger\"].json[\"message\"][\"from\"][\"language_code\"]}}"
               }
            ]
         }
      },
      "name":"UpdateUser",
      "type":"n8n-nodes-base.nocoDb",
      "typeVersion":1,
      "position":[
         1100,
         380
      ],
      "notesInFlow":true,
      "credentials":{
         "nocoDb":{
            "id":"13",
            "name":"NocoDB n8n multilang bot"
         }
      }
   },
   "timestamp":1651138686064,
   "message":"The resource you are requesting could not be found",
   "httpCode":"404",
   "description":"<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<title>Error</title>\n</head>\n<body>\n<pre>Cannot PUT /nc/n8n_multilang_bot_wzhb/api/v1/TG_users/bulk</pre>\n</body>\n</html>\n"
}

@Joffcom
Copy link
Member

Joffcom commented Apr 28, 2022

Hey @ed-parsadanyan,

Looks like there could still be an issue with the API then, I will set up a new Nocodb instance locally on the latest release and test it.

@o1lab
Copy link

o1lab commented May 2, 2022

@ed-parsadanyan : till the new PR gets merged. If you want to, you can please use our new APIs via http. I see you are trying to do a bulk update.

@dominik-mukrecki
Copy link

I confirm that issue still exists. HTTP requests work fine, but the NocoDB node does not.

NocoDB version: 0.91.0

@Joffcom
Copy link
Member

Joffcom commented May 24, 2022

Hey @dominikmukrecki,

That is to be expected, We are waiting on an internal process to manage different API versions in a cleaner way. In the past we have been doing it as part of the credential and as this is starting to happen more often we want to come up with an approach that will work now and in the future so we have a standard process for it.

For now the best approach would be to use the HTTP Request node.

@Zapfmeister
Copy link
Contributor

@Joffcom any progress on this one?

@Joffcom
Copy link
Member

Joffcom commented Jul 22, 2022

Hey @Zapfmeister,

Yes there have been a few more tweaks to the PR opened and it is now in the final review stage so unless anything urgent pops up it will hopefully be in one of the next releases

@luizeof
Copy link
Contributor

luizeof commented Jul 24, 2022

In version 0.187.2 Node works, but the filter parameters do not work

the request is sent do old api endpoint.

GET /nc/p_mdq0kuqlah85ls/api/v1/leads?where=%28email%2Cneq%2Cnull%29&limit=50

@Joffcom
Copy link
Member

Joffcom commented Jul 24, 2022

@luizeof in theory the node only partially supports newer versions of NocoDB. The API routes were changed and the PR we have open brings in support for the newer URIs.

@zblesk
Copy link

zblesk commented Sep 30, 2022

The behavior I see is: I can get or list data, but updates fail silently. Even if I just make the simplest node and hard-code an ID and a single column to set, the component reports success, but no data is changed in NocoDB.

@Joffcom
Copy link
Member

Joffcom commented Sep 30, 2022

Hey @zblesk,

Could you pop open a new issue for that one and include your n8n version and nocodb version?

@Joffcom
Copy link
Member

Joffcom commented Oct 5, 2022

Looks like we forgot to close this one, The changes for 0.90.0 were released in 0.189.0

@Joffcom Joffcom closed this as completed Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants