Skip to main content

Request and receive Zigbee backup from zigbee2mqtt and save it via SFTP

Workflow preview

Workflow preview
100%
Request and receive Zigbee backup from zigbee2mqtt and save it via SFTP preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

A single workflow with 2 flows/paths that combine to handle the backup sequence for Zigbee device configuration from HomeAssistant / zigbee2mqtt. This provides a way to automate a periodic capture ...

Best for

  • File Management automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.ftp, n8n-nodes-base.scheduletrigger, n8n-nodes-base.mqtt, n8n-nodes-base.mqtttrigger, n8n-nodes-base.code, n8n-nodes-base.converttofile

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Hubschrauber.

Original n8n.io source

1.1 Workflow description

Title
Request and receive Zigbee backup from zigbee2mqtt and save it via SFTP
Workflow name
Request and receive Zigbee backup from zigbee2mqtt and save it via SFTP

A single workflow with 2 flows/paths that combine to handle the backup sequence for Zigbee device configuration from HomeAssistant / zigbee2mqtt. This provides a way to automate a periodic capture of Zigbee coordinators and device pairings to speed the recovery process when/if the HomeAssistant instance needs to be rebuilt. Setting up similar automation without n8n (e.g. shell scripts and system timers) is consiterably more challenging. n8n makes it easy and this template should remove any other excuse not to do it.

Flow 1

  • Triggered by Cron/Timer
    • set whatever interval for backups
    • sends mqtt message to request zigbee2mqtt backup (via separate message)

Flow 2

  • Triggered by zigbee2mqtt backup message
  • Extracts zip file from the message and stores somewhere, with a date-stamp in the filename, via sftp

Setup

  • Create a MQTT connection named "MQTT Account" with the appropriate protocol (mqtt), host, port (1883), username, and password
  • Create an sftp connection named "SFTP Zigbee Backups" with the appropriate host, port (22), username, and password or key.

Reference

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - SFTP zip file content

Type / Role
n8n-nodes-base.ftp - ftp
Config choices
Version 1

Block 2 - CRON Monday 2:45 am

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.1

Block 3 - Send Zigbee2MQTT backup request

Type / Role
n8n-nodes-base.mqtt - mqtt
Config choices
Version 1

Block 4 - MQTT Trigger - Backup Response

Type / Role
n8n-nodes-base.mqttTrigger - mqttTrigger
Config choices
Version 1

Block 5 - Parse JSON Object from Message Text

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 6 - Convert to File - base64 to binary

Type / Role
n8n-nodes-base.convertToFile - convertToFile
Config choices
Version 1

3. Summary Table

Workflow Request and receive Zigbee backup from zigbee2mqtt and save it via SFTP
Complexity intermediate
Nodes 6
Categories File Management
Author Hubschrauber
Published 03 Aug 2024

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/2371/2371.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Request and receive Zigbee backup from zigbee2mqtt and save it via SFTP do?

A single workflow with 2 flows/paths that combine to handle the backup sequence for Zigbee device configuration from HomeAssistant / zigbee2mqtt. This provides a way to automate a periodic capture ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your File Management use case.