iCloud Drive is a file synchronization service from Apple, which is built into iOS 8 and greater, and OS X Yosemite.
Drafts has action steps which can create, replace, prepend or append to files in iCloud Drive. iCloud Drive actions operate on top of system level sync services and can operation while the device is offline, which changes syncing when a network becomes available again. Be aware that action steps which modify existing files (append/prepend) should be used carefully when operating offline, because edits to those files from multiple devices can result in conflicted copies of the file being generated.
To get started, you can install these sample iCloud Drive actions from the Action Directory
When an iCloud Drive action step is added, the follow values can be configured to control how and where the file is created:
- Folder: The name of a folder in the "Drafts" folder of your iCloud Drive. This folder will be created if it does not already exist when the action is fired. Leave this blank to use the root of the "Drafts" folder.
- Filename: The file name.
- Ext: The extension to use. Typically “txt”, “markdown”, but can be anything.
- Write: One of four possible output strategies:
- Create: Write to a new file each time the action is used. If a file with the same file name exists already, Dropbox will create a new file with the same name and a parenthetic number attached, like “File (1)”, “File (2)”, etc.
- Append: Add to the end of a file.
- Prepend: Add to beginning of a file.
- Replace: Similar to “Create”, but instead of creating a new file if the file already exists, this will completely replace the contents of the existing file with the output of the action.
- Content: The template can be used to wrap the draft with some additional text when the action is used. Several tags are supported to add timestamps, but any other text – such as separator lines – can be added as well. Read more about supported template tags.