docs: Improve formatting in 'Automating Backups with n8n' community guide (#6221)

Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com>
This commit is contained in:
Patrick Lehner (he/him)
2025-09-25 00:16:56 +09:00
committed by GitHub
parent c710e9d3f5
commit 7d43c7c7a2
2 changed files with 33 additions and 27 deletions

View File

@@ -3,50 +3,54 @@
!!! info !!! info
This guide was submitted by a community member. Find something wrong? Submit a PR to get it fixed! This guide was submitted by a community member. Find something wrong? Submit a PR to get it fixed!
> [n8n](https://github.com/n8n-io/n8n) is a free and source-available fair-code licensed workflow automation tool. Alternative to Zapier or Make, allowing you to use a UI to create automated workflows. [n8n](https://github.com/n8n-io/n8n) is a free and source-available fair-code licensed workflow automation tool. It's an alternative to tools like Zapier or Make, allowing you to use a UI to create automated workflows.
This example workflow: This example workflow:
1. Backups Mealie every morning via an API call 1. Creates a Mealie backup every morning via an API call
2. Deletes all but the last 7 backups 2. Keeps the last 7 backups, deleting older ones
> [!CAUTION] !!! warning "Important"
> This only automates the backup function, this does not backup your data to anywhere except your local instance. Please make sure you are backing up your data to an external source. This only automates the backup function, this does not backup your data to anywhere except your local instance. Please make sure you are backing up your data to an external source.
---
![screenshot](../../assets/img/n8n/n8n-mealie-backup.png) ![screenshot](../../assets/img/n8n/n8n-mealie-backup.png)
# Setup ## Setup
## Deploying n8n ### Deploying n8n
Follow the relevant guide in the [n8n Documentation](https://docs.n8n.io/) Follow the relevant guide in the [n8n Documentation](https://docs.n8n.io/)
## Importing n8n workflow ### Importing n8n workflow
1. In n8n, add a new workflow 1. In n8n, add a new workflow
2. In the top right hit the 3 dot menu and select 'Import from URL...' 2. In the top right hit the 3 dot menu and select 'Import from URL...'
![screenshot](../../assets/img/n8n/n8n-workflow-import.png) ![screenshot](../../assets/img/n8n/n8n-workflow-import.png)
3. Paste `https://github.com/mealie-recipes/mealie/blob/mealie-next/docs/docs/assets/other/n8n/n8n-mealie-backup.json` and click Import 3. Paste `https://github.com/mealie-recipes/mealie/blob/mealie-next/docs/docs/assets/other/n8n/n8n-mealie-backup.json` and click 'Import'
4. Click through the nodes and update the URLs for your environment 4. Click through the nodes and update the URLs for your environment
## API Credentials ### API Credentials
#### Generate Mealie API Token #### Generate Mealie API Token
1. Head to https://mealie.example.com/user/profile/api-tokens 1. Head to `<YOUR MEALIE INSTANCE>/user/profile/api-tokens`
> If you dont see this screen make sure that "Show advanced features" is checked under https://mealie.example.com/user/profile/edit
2. Under token name, enter the name of the token i.e. 'n8n' and hit Generate !!! tip
If you dont see this screen make sure that "Show advanced features" is checked under `<YOUR MEALIE INSTANCE>/user/profile/edit`
2. Under token name, enter the name of the token (for example, 'n8n') and hit 'Generate'
3. Copy and keep this API Token somewhere safe, this is like your password! 3. Copy and keep this API Token somewhere safe, this is like your password!
> You can use your normal user for this, but assuming you're an admin you could also choose to create a user named n8n and generate the API key against that user. !!! tip
You can use your normal user for this, but assuming you're an admin you could also choose to create a user named n8n and generate the API key against that user.
#### Setup Credentials in n8n #### Setup Credentials in n8n
> [n8n Docs](https://docs.n8n.io/credentials/add-edit-credentials/) See also [n8n Docs](https://docs.n8n.io/credentials/add-edit-credentials/).
1. Create a new "Header Auth" Credential 1. Create a new "Header Auth" Credential
@@ -57,15 +61,17 @@ Follow the relevant guide in the [n8n Documentation](https://docs.n8n.io/)
![screenshot](../../assets/img/n8n/n8n-cred-connection.png) ![screenshot](../../assets/img/n8n/n8n-cred-connection.png)
3. In the workflow you created, for the "Run Backup", "Get All backups", and "Delete Oldies" nodes, update: 3. In the workflow you created, for the "Run Backup", "Get All backups", and "Delete Oldies" nodes, update:
- Authentication to `Generic Credential Type` - Authentication to `Generic Credential Type`
- Generic Auth Type to `Header Auth` - Generic Auth Type to `Header Auth`
- Header Auth to `Mealie API` or whatever you named your credentials - Header Auth to `Mealie API` or whatever you named your credentials
![screenshot](../../assets/img/n8n/n8n-workflow-auth.png) ![screenshot](../../assets/img/n8n/n8n-workflow-auth.png)
## Notification Node ### Notification Node
> Please use error notifications of some kind. It's very easy to set and forget an automation, then have the worst happen and lose data. !!! warning "Important"
Please use error notifications of some kind. It's very easy to set and forget an automation, then have the worst happen and lose data.
[ntfy](https://github.com/binwiederhier/ntfy) is a great open source, self-hostable tool for sending notifications. [ntfy](https://github.com/binwiederhier/ntfy) is a great open source, self-hostable tool for sending notifications.

View File

@@ -86,7 +86,7 @@ nav:
- Community Guides: - Community Guides:
- Bring API without internet exposure: "documentation/community-guide/bring-api.md" - Bring API without internet exposure: "documentation/community-guide/bring-api.md"
- Automate Backups with n8n: "documentation/community-guide/n8n-backup-automation.md" - Automating Backups with n8n: "documentation/community-guide/n8n-backup-automation.md"
- Bulk Url Import: "documentation/community-guide/bulk-url-import.md" - Bulk Url Import: "documentation/community-guide/bulk-url-import.md"
- Home Assistant: "documentation/community-guide/home-assistant.md" - Home Assistant: "documentation/community-guide/home-assistant.md"
- Import Bookmarklet: "documentation/community-guide/import-recipe-bookmarklet.md" - Import Bookmarklet: "documentation/community-guide/import-recipe-bookmarklet.md"