⚡ Only 300 spots remaining • Closes in 2d 14h 32m
Optimize your cloud spend. This workflow runs weekly, lists all snapshots in your DigitalOcean account, compares their creation date to the current date, and deletes any that exceed your retention policy (e.g., 30 days).
This workflow is pre-configured and ready for deployment. Simply import the JSON template into your n8n instance and configure your credentials.
This is an exclusive blueprint. Copy the JSON below to use it.
PRO TIP
Always test your workflow in a development environment before pushing to production.
{
"nodes": [
{
"parameters": {
"dayOfWeek": [
1
]
},
"name": "Weekly Check",
"type": "n8n-nodes-base.cron",
"typeVersion": 1,
"position": [
250,
300
]
},
{
"parameters": {
"resource": "snapshot",
"operation": "getAll"
},
"name": "Get Snapshots",
"type": "n8n-nodes-base.digitalOcean",
"typeVersion": 1,
"position": [
450,
300
]
},
{
"parameters": {
"conditions": {
"dateTime": [
{
"value1": "={{$json[\"created_at\"]}}",
"operation": "olderThan",
"value2": 30,
"unit": "days"
}
]
}
},
"name": "Older than 30 Days?",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
650,
300
]
},
{
"parameters": {
"resource": "snapshot",
"operation": "delete",
"snapshotId": "={{$node[\"Older than 30 Days?\"].json[\"id\"]}}"
},
"name": "Delete Snapshot",
"type": "n8n-nodes-base.digitalOcean",
"typeVersion": 1,
"position": [
850,
250
]
}
],
"connections": {
"Weekly Check": {
"main": [
[
{
"node": "Get Snapshots",
"type": "main",
"index": 0
}
]
]
},
"Get Snapshots": {
"main": [
[
{
"node": "Older than 30 Days?",
"type": "main",
"index": 0
}
]
]
},
"Older than 30 Days?": {
"main": [
[
{
"node": "Delete Snapshot",
"type": "main",
"index": 0
}
]
]
}
}
}To use this, copy the JSON above and paste it directly onto your n8n canvas.
Join the elite marketers who have offloaded their entire backend to n8n. Get direct support and custom builds in our private forum.