N8n + ChatGPT + custom API for RAG

Describe the problem/error/question

Hi there,
I just set up my own n8n instance and I was wondering if I could connect n8n with ChatGPT (obviously there are tutorials) but also somehow integrate my own API for RAG.
The goal would be to ask ChatGPT questions about the data behind the API (which is JSON) for RAG.
Would something like this work? I find a lot of information about integrating the ChatGPT API, but not about your very own API.
And help is higly appreciated!

What is the error message (if any)?

No error

Please share your workflow

Doesnt exist yet - still trying

Information on your n8n setup

  • n8n version: 1.81.4
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): self-hosted via npm
  • Operating system: Ubuntu

Im uncertain your API setup, but typically you will just use the HTTP nodes with custom auth to perform your own api queries.

Thanks. This was a good hint. The problem is that the http request node for AI has no “ignore SSL” option.

The elastic search endpoint i am querying has self-signed cert, which causes the workflow to fail.

The “standard” http request module has such a SSL ignore option.
Now I am stuck.

Why not query without https? Or try deploy elasticsearch under a valid SSL? Its not really good practice to use self signed in production anyways.

In this case it requires https.
This is not prod but dev. Prod has certificates.
As the API is not publicly exposed no cert needs to be purchased, which is barely feasible anyway due to the sheer amount of internal certs orgs have.
This is why i would like to simply have a workaround to ignore the cert - just like in the normal http node.

You can try that yeah.

You can also just use something like certbot to deploy real CA SSL certs for free. No need to pay.

1 Like

True. Lets encrypt is a good alternative.
But the situation is a bit special. We dont want to publish these names in gobally accessible transparency logs - for security reasons.

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