There are two ways to open up the automation menu, explained below.
Learn about: Automating actions on folders button
You can make automations as soon as you log in to Couchdrop with the “Learn about: Automating actions on folders” button.
A new window will open up on the screen asking you what kind of new automation you want to create. From there, you will then be taken to where you create the automation.
The Automations sidebar button
You can also start automations by pressing the Automations button on the left sidebar.
Pushing this button brings up a list of all automations that have been created and whether they are active or inactive. You can edit existing automations here or create a new one by pushing “Add a new automation” at the top of the screen.
Creating an automation
When you create a new automation, you’ll be prompted to create a workflow based on an action or schedule one to happen at a specific time or time interval.
No matter which option you pick, you’ll need to set up a few things:
- Name the automation.
- Choose a folder where the Automation will take place
- For Scheduled workflow only: Choose the folder to monitor at your set time interval. You can see some examples of Scheduled workflows in our article: Triggered Workflows - Scheduled and Webhooks
- For Action-based workflows only: Pick whether to listen for Uploads or Downloads at that folder. You can also set this folder as the parent directory and search all subfolders to monitor as well. You can see some examples of Action-based workflows in our article: File Automation - Event Workflows
Next, you’ll set up Conditions, Actions, and Notifications. You can change between steps at any time by pushing the corresponding radio button at the top of the screen.
Automation Triggers and Conditions
- Upload–action happens when a file is uploaded to a directory
- Download–action happens when a file is downloaded from a directory
Conditions can be set when a file is either uploaded or downloaded from the directory. If the conditions are met, then the automation continues to the next step.
You have the option for meeting all conditions, or at least one condition from a list that you set. You can also mix and match so that a group of conditions must all be met and at least one from another set must also be met.
Depending on whether you chose a time-based or action-based workflow, you’ll have a different set of conditions to choose from.
Time-based triggers
Time-based triggers monitor a specific directory (and subfolders if you want to include those too) and perform an action at a time you specify.
Time can be broken into the following intervals:
- Monthly
- Weekly
- Daily
- Hourly
- Minutes (5 minutes minimum)
Time-based automations can check for three different conditions:
- Filename matches: Check for an exact filename
- Filename does not match: Check for the name but only proceed if the name does not match
- File Modtime: This checks when the file was last modified. There are 4 different time conditions to choose from.
- Modified after date
- Modified before date
- Modified within X days
- Modified after X days
Action-based triggers
Action-based triggers take effect after a specific action happens in the directory being monitored.
There are 9 different conditions that can be monitored, based on what you chose earlier (File is uploaded or downloaded):
- Transaction type: Choose between upload and download - actions will take place after the transaction.
- Directory matches: Only proceeds if the file uploaded or downloaded is in the directory specified
- Directory does not match: Automation will continue if the file that was uploaded or downloaded is in any directory except the one specified.
- Filename matches: Continues if the filename exactly matches what you enter in the field
- Filename does not match: Automation will continue for all filenames except for the one specified.
- User match: A dropdown list of users appears after choosing this, which are known users in the system. The automotion proceeds only if this user uploaded or downloaded the file.
- User does not match: Automation will continue for all users except for the one specified.
- Group match: If users are parsed into Groups, they must be in a specific group for the automation to go on.
- Group does not match: Automation will continue for all groups except for the one specified.
Actions
When the conditions are met, an action occurs. Some actions have Dynamic variables.
Dynamic variables
- User: Username of the user who triggered the event
- Filename: Name of the file being processed in the workflow, including the extension.
- Year (Full): Four-digit Year
- Year (Short): Final 2 digits of Year
- Month (String): Month in MMM format e.g. AUG
- Month (Number): Month in MM formate of the triggered workflow. e.g. 08
- Day: Day in DD format of the triggered event. e.g. 25
- Timestamp: Timestamp when the workflow was triggered. e.g. 1659992501
- Event Type: Event type that executed the workflow. e.g. download
- Event Origin: Specifies the channel where the workflow was originated. e.g. webportal
- Event Storage Engine: Storage type name where the workflow was originated. e.g. googledrive
- Event Storage Engine ID: Unique identifier of the configured storage where the workflow as originated. e.g. 04c0a140-9177-4581-98d3-4ea7215364aa
- Event ID: Unique identifier of the event triggered every time a workflow is executed. All the actions configured in the same workflow will share the same Event ID. e.g. bef26414-b7c1-41de986e-98de45abcd
Dynamic variables can be chosen alone, or combined with other dynamic variables and custom text.
Automation Actions
Actions can either happen immediately or after a specified number of seconds.
The current actions are:
- Send Webhook: Send webhook to a specified URL.
- Send email: Send an email to the specified email address.
- Rename file: Rename the file to a new name. Dynamic variables included.
- Move File: Move the file to a new destination. Dynamic variables included.
- Copy File: Copy the file to another destination. Dynamic variables included.
- Delete File: Delete the file. Can be used to delete after x seconds for time availability.
- Compress File: Compress the file to gzip, bz2, or zip format.
- Decompress File: Decompress the file to gzip or bz2 format.
- PGP Encrypt File: Choose a destination folder and add PGP ASCII encryption to a file. This requires a public key and can be signed with a private key and private key passphrase.
- PGP Decrypt File: Choose a destination folder and decrypt PGP ASCII encryption. Requires a Private Key and passphrase.
- Unarchive File: Specify a directory and unarchive a zip file.
Notifications
Notifications give you the option to send an email on success, failure, or both. You can specify the recipient but the email body and subject will be auto-generated.
Multi-step Automations
Couchdrop is one of the few data-moving platforms that offer multi-step automations. Multiple actions can be taken in a single automaton configuration. This means that you only need to set the Conditions once and can have unlimited actions performed when the conditions are met. You can save time by having multiple steps in one place without having to reconfigure conditions, and setting the order ensures that the previous step completes before the next.
An example would be to rename any folders uploaded into a User’s Invoice folder to a company Invoice folder, where it will be renamed, and then the original file in the User’s folder will be deleted.
This can be achieved through this configuration:
Conditions
- A file is uploaded
- Group does not match: Admin
- Directory matches: Username/Accounting/Invoices
Actions: Immediately perform
- Rename File > USER Invoice Number X
- Delete File
- Send Webhook [URL to invoicing software]
Summary Section
The summary section stays open at the side of the window while creating your automation so you can see an overview of what your workflow will do. This can be hidden with the “Hide” button and brought back up with the blue “Show Summary” button.
We recommend reviewing the summary before enabling the automation by pressing “Save and Continue” on the Notifications screen.
The summary below is based on the above multi-step workflow.
Need more help with automations?
If you get stuck on automations or need assistance with any other feature of Couchdrop, press the Help button at the bottom of the screen. Then, you can search through our documentation or Contact Us for help.