N8n as a backend for an app

I want to make an app that allows users to input their APIs into the interface, and it will automatically create a workflow using the API they provide. The workflow would already be pre-built — I would just use the API input to connect the specified app with mine.
For example, if a user inputs their Gmail API, a workflow containing an AI agent will be created on their machine. This agent will read their emails and report them back through the interface.
Is this possible?

Yes, I think this is possible. You can use a Webhook as the trigger point to receive API credentials submitted by users, and then pass these credentials as parameters to your pre-built workflow and AI Agent.

However, there are two things to note:

  1. If you’re just using API credentials as variables within the workflow, that’s relatively straightforward. But if you want to store these API credentials as permanent credentials in the n8n system (i.e., creating new credentials in the Credentials management), this would require more complex operations using n8n’s API or CLI.
  2. For services like Gmail that require OAuth authentication, you can’t complete the connection with just an API key. Users would need to complete the OAuth flow, which makes implementation more complex.

So, the basic functionality can be implemented, but a complete system might require combining the n8n API with a custom frontend to create a better user experience.

2 Likes

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