Setu Recipes: reusable workflows across every app.Browse templates

Integrations / DigitalOcean

DigitalOcean

Cloud infrastructure: Droplets, DNS domains and App Platform apps.

9 actions OAuth 2 6 read2 write1 destructive Calls api.digitalocean.com

Connect

TypeScript
const conn = await setu.connections.initiate({ userId: "user_1", toolkit: "digitalocean" });
console.log(conn.connectUrl); // show this to your user
await conn.waitUntilActive();

Permissions requested

ScopeWhy it is requested
account:readIdentify the connected DigitalOcean account
actions:readCheck the status of actions on your resources
droplet:readSee your Droplets
droplet:updateReboot, power on and power off your Droplets
droplet:deleteDelete Droplets
domain:readSee your domains and DNS records
domain:createAdd DNS records to your domains
app:readSee your App Platform apps

Actions

Add DNS recordwritedigitalocean.create_domain_recordAdd a DNS record (A, AAAA, CNAME, TXT, MX...) to a domain. Changes live DNS for that name.

Needs scope: domain:create

InputTypeDescription
domain_namestringRequiredDomain, e.g. example.com
typestringRequiredRecord type
namestringRequiredHost name, e.g. www or @ for the domain itself
datastringRequiredRecord value, e.g. an IP address
ttlintegerOptionalTime to live in seconds
priorityintegerOptionalPriority for MX and SRV records
TypeScript
await setu.execute({
  userId: "user_1",
  action: "digitalocean.create_domain_record",
  input: {
    "domain_name": "<domain_name>",
    "type": "<type>",
    "name": "<name>",
    "data": "<data>"
  },
});
Delete Dropletdestructivedigitalocean.delete_dropletPermanently destroy a Droplet and its data. This cannot be undone; snapshots and backups are kept separately.

Needs scope: droplet:delete

InputTypeDescription
droplet_idintegerRequiredDroplet id
TypeScript
await setu.execute({
  userId: "user_1",
  action: "digitalocean.delete_droplet",
  input: {
    "droplet_id": 1
  },
  confirm: true,
});
Power or reboot Dropletwritedigitalocean.droplet_actionReboot, power cycle, shut down, power off or power on a Droplet. Powering off or rebooting interrupts anything running on it. Returns an action id you can check with get_action.

Needs scope: droplet:update

InputTypeDescription
droplet_idintegerRequiredDroplet id
typestringRequiredWhat to do
TypeScript
await setu.execute({
  userId: "user_1",
  action: "digitalocean.droplet_action",
  input: {
    "droplet_id": 1,
    "type": "<type>"
  },
});
Get action statusreaddigitalocean.get_actionCheck the status of an action (such as a reboot) by its id: in-progress, completed or errored.

Needs scope: actions:read

InputTypeDescription
action_idintegerRequiredAction id returned by an earlier call
TypeScript
await setu.execute({
  userId: "user_1",
  action: "digitalocean.get_action",
  input: {
    "action_id": 1
  },
});
Get Dropletreaddigitalocean.get_dropletGet one Droplet by id: name, status, size and creation time.

Needs scope: droplet:read

InputTypeDescription
droplet_idintegerRequiredDroplet id
TypeScript
await setu.execute({
  userId: "user_1",
  action: "digitalocean.get_droplet",
  input: {
    "droplet_id": 1
  },
});
List appsreaddigitalocean.list_appsList App Platform apps with their names and live URLs.

Needs scope: app:read

InputTypeDescription
per_pageintegerOptionalResults per page, up to 200
TypeScript
await setu.execute({
  userId: "user_1",
  action: "digitalocean.list_apps",
  input: {},
});
List DNS recordsreaddigitalocean.list_domain_recordsList DNS records of a domain, optionally only one type (A, CNAME, TXT...) or name.

Needs scope: domain:read

InputTypeDescription
domain_namestringRequiredDomain, e.g. example.com
typestringOptionalOnly this record type
namestringOptionalOnly records with this fully qualified name
per_pageintegerOptionalResults per page, up to 200
TypeScript
await setu.execute({
  userId: "user_1",
  action: "digitalocean.list_domain_records",
  input: {
    "domain_name": "<domain_name>"
  },
});
List domainsreaddigitalocean.list_domainsList the domains whose DNS is managed in the account.

Needs scope: domain:read

InputTypeDescription
per_pageintegerOptionalResults per page, up to 200
TypeScript
await setu.execute({
  userId: "user_1",
  action: "digitalocean.list_domains",
  input: {},
});
List Dropletsreaddigitalocean.list_dropletsList the Droplets (virtual machines) in the account, optionally filtered by tag or name. Returns ids, names and statuses.

Needs scope: droplet:read

InputTypeDescription
tag_namestringOptionalOnly Droplets with this tag
namestringOptionalOnly Droplets with this exact name
per_pageintegerOptionalResults per page, up to 200
TypeScript
await setu.execute({
  userId: "user_1",
  action: "digitalocean.list_droplets",
  input: {},
});