Nightly DigitalOcean Droplet snapshots with auto-cleanup

Back up your DigitalOcean servers every night, automatically delete snapshots past your retention window, and get a Slack recap of exactly what changed.

Deterministic Code
DigitalOceanSlack BotEngineeringOperationsNotifications & Alerts
PromptCreate

Every night at 2:00am, snapshot my tagged DigitalOcean Droplets, prune old snapshots beyond a retention window, and post a summary to Slack. Use a cron trigger set to run once nightly at 02:00.

Expose these settings at the top of the workflow so they are easy to change: the Droplet tag to back up (default "backup"), the retention count (default: keep the 7 most recent snapshots per Droplet and delete the rest), the snapshot name date format (default YYYY-MM-DD), and the Slack channel to post the summary to.

Step 1 - find the Droplets. Call DigitalOcean's List All Droplets operation filtered by the configured backup tag to get the set of Droplets to snapshot. If none match the tag, skip straight to the Slack step and report that nothing was tagged for backup.

Step 2 - take snapshots. For each Droplet, call Initiate a Droplet Action with type "snapshot" and a name built from the Droplet name plus the current date in the configured date format (for example "web-01-2026-07-17"). Alternatively, use Act on Tagged Droplets to snapshot the whole tag in one bulk call. Remember that DigitalOcean Droplet actions are asynchronous: each call returns an action object with an id and a status. Collect every returned action id.

Step 3 - wait for completion. Poll Retrieve a Droplet Action for each action id until its status is "completed" or "errored", waiting a few seconds between polls and capping the total wait so the workflow cannot hang forever. Record which Droplets completed successfully and which returned an error.

Step 4 - prune old snapshots. After the new snapshots exist, list the snapshots for each Droplet with List Snapshots for a Droplet (or use List All Snapshots for the whole account and group them by Droplet). Sort each Droplet's snapshots newest first, keep the number set by the retention count, and call Delete a Snapshot for every snapshot beyond that window. Track which snapshot names or ids were deleted per Droplet.

Step 5 - confirm in Slack. Finish by using the Send a Message action (posting as the Slack bot) to the configured channel with a summary: list which Droplets were snapshotted and which old snapshots were deleted per Droplet. If any snapshot action returned status "errored", any poll timed out, or any delete call failed, add a clearly marked warning line at the top naming the affected Droplets so the failure is not missed.

What does this prompt do?

  • Runs every night and takes a fresh snapshot of every DigitalOcean server you have tagged for backup
  • Automatically deletes older snapshots so you only keep the most recent few per server and control storage costs
  • Posts a Slack summary of which servers were backed up and which old snapshots were removed
  • Flags a warning in Slack if any backup or cleanup step failed, so nothing silently breaks

What do I need to use this?

  • A DigitalOcean account with the servers you want to back up
  • A tag on those servers (for example "backup") so the workflow knows which ones to snapshot
  • A Slack workspace and the channel where you want the nightly summary posted

How can I customize it?

  • Change which servers get backed up by editing the tag it looks for
  • Set how many snapshots to keep per server before older ones are deleted (the default keeps the 7 most recent)
  • Adjust the run time, the date format used in snapshot names, and the Slack channel

FAQs

How does this save money on DigitalOcean storage?
Snapshots are billed monthly per gigabyte, so old backups quietly add up. By keeping only the most recent few per server and deleting the rest every night, you stop paying for backups you no longer need.
Which servers get backed up?
Only the DigitalOcean servers you have given a specific tag, "backup" by default. Tag a server to include it or remove the tag to leave it out, without editing the workflow.
What happens if a backup fails?
The Slack summary includes a clear warning line naming any server whose snapshot or cleanup did not complete, so you can look into it right away instead of finding out later.
Will it ever delete a backup I still need?
It only removes snapshots beyond the retention count you set and always keeps the newest ones. Raise the count if you want to hold on to a longer history.
Can I change when it runs?
Yes. It is set for 2am nightly by default, but you can move it to any time or frequency that fits your maintenance window.

Related templates

A brand asset library your marketing team actually searches

Every logo, photo, video cut and ad export in one searchable grid, with previews, campaign tags and rights expiry dates at a glance.

General Input Storage
General Input Database
JigsawStack
+1
App
Turn Mailjet email clicks into ranked HubSpot follow-ups

Twice a day we spot the people clicking your pricing and demo pages, create a follow-up task for their owner, and post a ranked recap to Slack.

Mailjet
HubSpot
Slack Bot
Agentic Task
Clean out the Looker dashboards and Looks nobody opens

One board showing every dashboard and Look with its folder, owner and favorite count, so you can find dead content and retire it safely.

Looker
Slack Bot
App
LiveKit live operations console for room moderation

Watch every live room on one screen, remove disruptive guests, start recordings and end stuck sessions without anyone opening a terminal.

LiveKit
Slack Bot
General Input Database
App
Wake up dormant Keap leads with a researched reason

Every Monday we find leads who never bought, research a real reason to reach out, and send a short personal email instead of another check in.

Keap
Slack Bot
Agentic Task
LiveChat coverage board for planning next week's shifts

See the exact hours your chat queue backs up and customers give up waiting, then plan next week's shifts before it happens again.

LiveChat
Slack Bot
General Input Database
App

Stop paying for backups you forgot to delete.

Put your DigitalOcean snapshots on autopilot with nightly backups, automatic cleanup, and a Slack recap every morning.