I’m trying to get users to fill out credentials without having access to n8n. Is there any way to do this? I’ve seen that there are some API endpoints to create credentials, but in oAuth2, how would it work for the user to do this authentication part?
Hi could you explain a bit more? Like n8n has a form creator. But if i’m understanding correct you want to use something external?
If so you could use google form. It supports custom code like this. So you can send the inputs of the form to a webhook trigger in n8n and then continue the workflow.
var ENDPOINT_URL = "Enter your endpoint URL here"
function onSubmit(e) {
var form = FormApp.getActiveForm();
var allResponses = form.getResponses();
var latestResponse = allResponses[allResponses.length - 1];
var response = latestResponse.getItemResponses();
var payload = {};
for (var i = 0; i < response.length; i++) {
var question = response[i].getItem().getTitle();
var answer = response[i].getResponse();
payload[question] = answer;
}
var options = {
"method": "post",
"contentType": "application/json",
"payload": JSON.stringify(payload)
};
UrlFetchApp.fetch(ENDPOINT_URL, options);
};
The flow is as follows: when a new user logs in, they need to register their credentials. These credentials are saved in the database and a request is made to N8N to create them. However, when I get to the oAuth2 credentials, which require authentication confirmation to log in with the account, these credentials do not work.
I would like to know how to get around this, if there is a specific link to log in and confirm, or if there is a flow that I can use to do this, or even if there is an option in the body of the request to add it.
Once you have an app set up, you can auth them via the credentials page, with the sign-in button. I’m not sure if there is any other way, I have multiple accounts I own and just add credentials for each one.
Hi, we have built a tool for this. You can choose by 200 different services and authschemes and your end user gets video step-by-step instructions on how to generate the credentials. They then transfer them safely to you so you can use them.
If you want to sign up and try for free its on Creddy | Creddy