End-user OpenAI credentials

Hey,

Describe the problem/error/question

I build a Google Sheet for companies which will make it theirs on their Google Drive.
It has an App Script which should calls OpenAI;

I would like that it be through n8n if the Company can use their own OpenAI Credentials.

What is the problem?

  • It does not appear possible to insert OpenAI Api Key on the fly in the related node. Probably for security matters.
  • Is there another ‘clean’ solution?
    nb: I noticed the same request some months ago with an answer by @jan but it is closed and we cannot interact with it anymore.

Thanks in advance.

Information on your n8n setup

  • n8n version: Last
  • Database (default: SQLite): Postgre
  • n8n EXECUTIONS_PROCESS setting (default: own, main): ?
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker or npm, don’t remember
  • **Operating system:**Windows

Hey @AyS_0908

You can use the api to add credentials to n8n for some services then build out the workflows to use those credentials and select them with a switch node or similar.

If you are planning to allow companies to use their own api keys in your n8n instance though make sure you check our license as this is something that we document as possibly needing an embed license so it would be worth chatting to our sales team who can let you know if this is the case.

1 Like

Thank you @Jon

=> Yes, I want to build some high value niche products:

  • some will be micro-SaaS, some will be adds-on (for G-Suit, Chrome…);
  • the economic model would be a fix fee (vs subscription) → win-win with users: they pay only their AI usage (e.g. use their own API) and I have mainly fixed costs (or caped in variability).

=> Intuition (tbc): n8n may be the orchestrator for each product (and maybe, be the mvp via the “html” & “form” nodes).

Still in the n8n learning curve (not at all a developer), so I test possibilities with a self-hosted version.
:white_check_mark: Understood: new type of license required for commercial usage.
:pick: Still digging: should I use ‘true code’ to deal with “caped variable cost approach” or can I do it with n8n.

PS :bulb:: from a macro perspective, I think that n8n is a great lever for startupers; maybe should you have a YouTube serie about real examples and how to set them up from A to Z…

Best