Example - Backup n8n to Nextcloud

Automated backup of n8n workflows to Nextcloud every 6 hours, ensuring data security and easy access to workflow versions. This integration streamlines data management and enhances reliability by safeguarding critical workflow information.

7/8/2025
9 nodes
Complex
schedulecomplexmovebinarydatafunctionitemnextcloudautomationcodecustomapiintegration
Categories:
Schedule TriggeredComplex WorkflowBusiness Process AutomationCloud Storage & File Management
Integrations:
MoveBinaryDataFunctionItemNextCloud

Target Audience

This workflow is ideal for:

- Developers looking to automate the backup of n8n workflows to Nextcloud.
- System Administrators who manage workflow automation and require regular backups.
- Data Analysts seeking to ensure data integrity by maintaining up-to-date backups.
- Small Business Owners who utilize n8n for automation and need a reliable backup solution.

Problem Solved

This workflow addresses the challenge of ensuring that n8n workflows are regularly backed up to Nextcloud, minimizing the risk of data loss. By automating this process every 6 hours, users can focus on their tasks without worrying about manual backups, enhancing productivity and data security.

Workflow Steps

  • Trigger: The workflow can be executed manually or scheduled to run every 6 hours using a Cron job.
    2. Get Workflow List: The workflow retrieves a list of all workflows from the n8n instance via an HTTP request.
    3. Map Data: It processes the retrieved data to prepare it for further actions, extracting essential details from each workflow.
    4. Get Workflow Details: For each workflow, the workflow fetches detailed information using the workflow ID.
    5. Merge Data: The information from the workflow details is merged for further processing.
    6. Function Item: A function is applied to format the data appropriately for binary transfer.
    7. Move Binary Data: The workflow converts the JSON data into binary format to prepare it for upload.
    8. Upload to Nextcloud: Finally, the binary data is uploaded to Nextcloud, ensuring that the backup is stored securely.
  • Customization Guide

    Users can customize this workflow by:

    - Changing the Cron Schedule: Modify the cronExpression in the Cron node to adjust how frequently backups are taken (e.g., every hour, daily).
    - Adjusting Backup Path: Update the path parameter in the NextCloud node to specify a different directory or filename format for the backups.
    - Filtering Workflows: In the Map node, users can add conditions to filter which workflows to back up based on specific criteria (e.g., only workflows that are active).
    - Adding Notifications: Integrate additional nodes to send notifications (e.g., via email or messaging apps) upon successful backup completion or in case of errors.