In this template, the list of workflows is taken from the unofficial REST API.
I saw in this message that it is an API without official documentation, neither a guarantee of continuation in the future.
I understood. But I try my question… just in case
I activated user management. So basic authentication, neither the workaround by pemontto seem to work.
Is there a way to call this API with the user credentials ?
Thank you so much for your help.
Best,
Julien
Information on your n8n setup
n8n version: 0.168.1
Database you’re using (default: SQLite): The one in the official Docker image
Running n8n with the execution process [own(default), main]: Don’t know
Running n8n via [Docker, npm, n8n.cloud, desktop app]:
Add Option “Full Response” (do not forget to put it at true)
Add 2 body parameters :
Name : email, value : the email of the account
Name : password, value : the password of the account
Next steps : authenticate your requests
In the next steps requesting your n8n server, add a header parameter :
Name : Cookie (with upper C)
Value : From the node Authentication, Output Data, JSON, header, set-cookie as Raw value (click on the grey circle next to set-cookie)
Example
To finish, here the JSON to export your workflows in an array.
Please, note you should modify CHANGE_WITH_YOUR_URL, CHANGE_WITH_YOUR_EMAIL and CHANGE_WITH_YOUR_PASSWORD
Hi @JulienDelRio I know your question has already been answered, but maybe you might be interested in a variation on this workflow that I use to backup my workflows and credentials from my (macOS) Desktop App. This workflow runs every day at midnight, creating a new folder with date/timestamp in my n8n backups folder in my iCloud and copying all workflows and credentials … without the passwords …
As I’m using the Desktop App, my port number is 5679. So you might want to change that to 5678 in the http nodes. You will also need to specify your backup folder in the execute command node.
Just to be complete, This is my new backup solution
It uses the CLI tool to export the worklfows to a folder then reads the files and saves to Github using the nodes, It mostly works the same as the old popular workflow backup it is just fetching the data that is different
There was a problem executing the workflow: "Error initializing workflow: credential ID not present. Please open the workflow and save it to fix this error."
Thank you so much. I got it working smoothly. Actually this Cookie part is very important if you have multiple HTTP Request node and it can only be set after I ran the Authentication node once, in order to get the correct Output data.
Since I am backing up the workflows to a git repo, I wish there was a better way to not include my email and password as post parameter and there was a way to provide authetncation via the credentials. right now this hack will expose my password in the workflow which then is pushed to repo.