Do you constantly create a 'backup' copy of a workflow? eg Workflow, Workflow 2, Workflow 3 etc

When working on a workflow its often a new one, down the bottom of the screen. This is a workflow I keep right at the top, and when you tap on it gives a list of the 5 most recently edited workflows. When you select, it will create a timed/dated backup to iCloud Drive, and then go to editing the Workflow.

So you can always quickly jump to a Workflow being worked on, and have multiple levels of Backup.

Edit Eager as I was to save people wasted time, something Isn’t behaving correctly so took link off for now.

3 Likes

Apologies, my misunderstanding about how Get My Workflows works, I think it creates a new object in Workflow for any of the Workflows it reads, so all Workflows returned have the creation/last modified date of the date/time it was imported, and not pulling through the data of created/modified.

My workaround is to still have the Working On workflow at the top of Workflows, but to add a * to the Workflow name of any Workflows I’m working on, so I can still jump quickly to ones worked on, and still backs up etc.

https://workflow.is/workflows/1fba5504caa2442e8401d04bff8a363c

I just wasted a lot of time last week by not having an earlier version available, and was eager to make help others not get in the same situation.

1 Like

After working on it for a bit I decided this was how I’m going to manage backups. A copy each time I edit them.

Time Machine backups of Shortcuts

This allows you to have a multiple level of ‘undo’, similar to Time Machine on macOS, hence the name (sorry if I tricked you into reading this). You are forced into using either Edit Shortcut, or Shortcut Projects, they will make a backup before going into the Shortcut to edit it, if you’re not bothered about backing up everything just the major ones you’re working on, use the Shortcut Projects. To recover a backup first you select the Shortcut you want to recover, and are then given a time since list of backups you can recover from.

First use:

  • Make a ‘Backups’ folder in your Shortcuts folder on iCloud
  • Run Backup All in the Time Machine Shortcut
  • Move Shortcut Projects and Edit Shortcut to the top of your list of Workflows, so you can quickly Edit Shortcuts, skip to Projects.

Shortcut Projects - Quickly back up and skip to editing Shortcuts you’re working on

https://www.icloud.com/shortcuts/f6916bc544ea4dbb86788503ed907718

  • Add/Remove Projects your currently working on to have a quick list of projects to skip to
  • Backs up shortcut before opening it in editing mode

Edit Shortcut - Backup Shortcut before editing

https://www.icloud.com/shortcuts/ab2a3c13fee64a09a4ab830ccb068087

  • Select or search, back-up, and opens the Shortcut in editing mode

Time Machine - Manage & recover backups -

https://www.icloud.com/shortcuts/17ec52c60c8b452e92d2147a8e149982

  • Clean up old backups, can filter by when created, or name
  • Browse Backups
  • Backups by time since created eg 12 hours since
  • Preview code before deciding if to recover.
  • Backup All

Other Workflows (required)

Choose Workflow :

https://www.icloud.com/shortcuts/84a762810a4547feb97751138fe82427

  • I use this in several other Workflows, it’s just a workflow for choosing Workflows, with the added feature of search. You can use it in your own Workflows if you have a need for it.
  • You might notice that it shows the type of any input/clipboard I use this in other workflows, not so needed here

CopyPaste Action Parser :

https://www.icloud.com/shortcuts/84a762810a4547feb97751138fe82427

  • This is by, /u/schl3ck (using a javascript by Todd Gehman) who created the excellent CopyPaste Actions workflow.
  • It converts the data format that Workflows are stored in into a readable list of commands, and is used when browsing backups to recover to help you understand whats changed in the backups you are looking through.

Shortcuts take up only a small amount of space, just a few k usually, keeping a number of copies of a Shortcuts doesn’t take up a lot of space. Yes, if you backup all of your 300 Shortcuts it may be a few Mb, but after that you would usually be adding to it a few at a time.

This is a v1 so for example Shortcut Projects isn’t very smart you can accidentally add the same Shortcut twice, there needs to be a better way of deleting old backups eg keep at least x no of backups would be good, and could do with having the icons added to the menu.

There’s no particular way to deal with backups where the original isn’t present, or has changed name, in the meantime its quite easy to recover these from the Shortcuts/Backups/ folder.