How to get data into dropdown from previous node

I have made two custom node(DbInstanceTable, Instancename). I want the output(column name rpa_name) of first custom node(DbInstanceTable) in dropdown of RPA Instance of second node.

Hi @abhilash

You will need to use load options to get the data and set it as the dropdown options. Below is some example I got from my work in progres node.



Hi, Thanks for quick reply. As I am not using GnomigoCredentials. As I am new to this I dont know what that does mean. I am using postgres as database

. so can we use postgres credential there. As we are directly taking data from db so we dont require token.
we are getting one error as loadresource is not available.

it would be great if you help in this.

Hi @abhilash

Gnomigo is the application I am working on, so these credentials are that go with it in my code.
You will need to replace it with your credentials and stuff of course.
The LoadedResource[] and stuff are also other things in my code. I just provided the specific part you need of the code as an example of how to do it.

U will need to use the example and set it up for your node.
You can find more examples in the other nodes where this is used. For example the baserow node.
But for all, you need to modify it to suit your needs.

1 Like

Hi @BramKnuever
Thanks .
we are not able connect n8n with our backend due to https calls. We are connecting only through DB. We saw all examples are for backend API. Can you pls suggest if any example is there who connect with database directly without using backend API.

Hi @abhilash

Sorry cannot think of an example. But it should work the same. Just with a request to a DB instead of an API.

1 Like

Hi @abhilash,
great to hear from you. You seem to make postgres queries inside your custom nodes. Did you try using our Postgres Node to make DB queries? You can also look at the Postgres.node.ts implementation.

Regarding your https problem, could you setup an example workflow and use our HTTP Request Node. It is very versatile supporting all kinds of authentication credentials. If that fails, can you post the error messages both from the UI and the logs?

1 Like