Digital Ocean + Workflow app: Check Status

Posted — Mar 11, 2017

Below is a workflow I put together to have the Workflow app check the status of specific Digital Ocean droplet.

Why would I need to do this? Occasionally I build Tensforflow models. With a 2GB RAM instance, I can do some data validation and tests on a small amount of data. When I need to do full throttle testing and training, I need to resize the droplet to a 16GB RAM droplet. Usually, I’ll kickoff the resize walking to my car on the way home. Then I start the test and train steps when I get home. When done, I shrink it all back. There are five workflows for this cycle:

  1. See if specified droplet is active (this post)
  2. Power off specified droplet (future post)
  3. Power on specified droplet (future post)
  4. Resize droplet to 16GM RAM size (future post)
  5. Resize droplet to 2GB RAM size (future post)

A few caveats. First, I’m not sharing this through the official Workflow gallery simply because it could be improved significantly, but it does what I need it to do well enough. Second, I prefer to build workflows that do one task and just one task. It’s a Unix thing (ignoring the ‘well’ part, though).

Some familiarity of creating workflows will help fol Step 1: Create a new ‘Today Widget’ workflow.

Step 2: Get or generate your Digital Ocean API key.

Step 3: Get your droplet id. The easiest way would be to pull it from the dashboard when looking at your droplet. So go on your dashboard, click on the droplet, look at the URL. It should be something like

Step 4: Add the fields and set the variables as shown above.

Step 6: Continue adding fields and setting variables.

What you see when you run with workflow from the “Today Widget”