Credentials for an "unsupported" platform

Good news and bad news

Good news is you can programmatically create credentials with the n8n node like this.

Bad news is there doesn’t seem to be any way to actually select a credential with an expression, defeating the purpose of automating the creation. They say it’s planned but no timeline. There also seems to be no way to actually receive the auth info from the credential section through n8n or any apis.

So it seems like your best way to do that is to store the key/auth info to disk and then add it into the headers manually when needed instead of using the built in auth drop downs, which i see is your current method.
You could encrypt with the crypto node as well.



ps:
For anyone trying to make sense of the create credential node

For the n8n create credential node, finding the right Credential Type is pretty annoying. There is no obvious list of Credential Type’s in the docs. But I found the list on Github here. Find the relevant file and then find the name field right at the start of the class, like name = 'httpHeaderAuth'; and httpHeaderAuth will be the credential type name.

To find the format of the JSON for the data section use this workflow, change the edit field value to your credential type and add in an n8n credential to the webhook.

The JSON output of the http node will be the schema for the structure required in the data field.

1 Like