运营
Rotate the First DigitalOcean Droplet Snapshot
Periodically request a snapshot of the first DigitalOcean Droplet and remove its oldest snapshot when four already exist.
下载工作流


Periodically request a snapshot of the first DigitalOcean Droplet and remove its oldest snapshot when four already exist.
Setup and use
Bind secret Variable DIGITALOCEAN_TOKEN to each HTTP node. The token needs Droplet read and update, and snapshot read and delete permissions. Enable persistent State and prevent overlapping runs. This changes snapshots.
Behavior
Every 48 hours, the workflow selects the first Droplet returned on the first page, lists its snapshots, removes the oldest when at least four exist, then requests a new snapshot. Fewer than four snapshots are retained and a new one is requested. The 200-item snapshot listing must contain the complete list or the run stops before writing. Configure the provider account accordingly. A successful creation request starts an asynchronous action; inspect DigitalOcean for its completion. Each write is marked pending before it is sent. If a run stops with a pending operation, later runs stop before writing. Inspect the account and action history. In Open Flow, enter the exact pending ID shown in the error in Check pending operation → acknowledge. That run immediately starts a new rotation, so confirm only when another deletion and snapshot request are appropriate; then clear acknowledge. The next scheduled run starts a new rotation, so resolve only when another deletion and snapshot request are appropriate. Deletion is permanent and occurs before the new snapshot completes.
In n8n
In n8n configure HTTP Bearer Auth on the requests. In n8n create a Data Table with text columns operation and status and select it in the five checkpoint nodes. In n8n, mark the pending Data Table row resolved after inspection.
Inspiration & credits
Changes to the source
- Make creation run below the threshold too, select the oldest by creation time, and reject an incomplete snapshot listing. The source itself selects the first Droplet despite its note describing all Droplets.
Adapted from Automate Droplet Snapshot Management on DigitalOcean in Zie619/n8n-workflows. The source credits Optimus Agency for the Let’s Automate It Community. No separate original template license was found.
The collection’s MIT notice is pinned at a later revision. This is the collection notice at that revision; it does not establish a separate original template author’s license. Our changes are listed above; see repository licensing.
MIT License
Copyright (c) 2025 Zie619
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.