Automate your content workflow
The automation tool allows you to let Prepr perform tasks for you fully automated. You can set up an automation by selecting a certain task and a certain trigger. This means you don't have to do work twice if you work routinely. This tool will optimize your content workflow in no time.
In this article
Use cases for automations
Here are a few common use cases for automations:
- Each new article in your Prepr production environment needs to be created (duplicated) in your Prepr development environment;
- A tweet or a notification must be created and published when someone added an article;
- A post needs to be assigned to the chief editor when the status of this post reached 'In review';
- A page should be deleted when it's expired.
Adding an automation
To create an automation, go to Settings > Publish > Automations and click 'Add automation'. To add an automation, just click through the three-step wizard.
First you select the event that triggers the automation. Select the model to which the automation should apply and choose Created, Changed, or Published.
You can now filter on properties and conditions. Properties are characteristics of the content item, such as status, locale, and the available model fields.
Available properties and conditions:
|Status|| Select one of the available statuses:
Done, review, in progress, to do, archived
|Locale|| All available locales in your Prepr environment
Only visible when multiple locales are set in your environment
|Text field|| Leave empty when input is required.
Enter a text field value when the value should match exactly
|List field||Select one of the list items|
|Boolean field||Choose true or false condition|
|Number field|| Leave empty when input is required
Enter a number (integer or float) when the value should match exactly
At last, determine what should happen when this trigger is started. Choose to create a new content item, update the content item or delete that content item.
Create a new content item
You need to specify the properties of the new content item:
- Select the model of the new content item to be created (required)
- Set the status (required)
- Link (optional, only visible when the original content item contains a content reference)
- Choose the assignee (optional, leave empty for unassigned)
In most cases, your different models also consist of different field names. After you have specified the properties, you can map the fields from the original content item with the fields in the new content item. You can only map fields with the same field type. So for example a text to a text field, an asset to asset, list to list, and boolean to boolean.
If you have user permissions to multiple Prepr environments, you can also choose to create a content item in a second Prepr environment. Please note that assets won't be added to that environment. You should add the asset in the duplicated content item manually.
Update content item
You can also choose the update the content item that triggers the automation. Use this automation, for example, to automatically assign a content item when the status is set to 'review'.
Delete content item
The third option is to delete the content item that triggers the automation. This can be useful if you want to delete a content item after it has expired.
- Test your automation
In that case, you will see the following messages:
- Create succeeded: 'Go to content item'
- Update succeeded: 'Go to content item'
- Delete succeeded: 'Content item should have been deleted'
You now see an overview on which properties or conditions the automation failed. You can adjust the rule via 'Edit' and run the test again.
Updating an existing automation
To change an automation, go to the detail page of that content workflow. Click on 'Edit' to change the If, Where, or Then. Save the changes and test your custom automation again.
Activating and deactivating automations
When you create an automation, the default status of this automation is 'inactive'. To activate the automation, you need to turn on the toggle 'Activate'. Save the automation, and the set content workflows will take effect immediately.
To temporarily or permanently unpublish an automation, turn off the toggle 'Activate' and save the automation. From that moment on, the automation is no longer called and therefore no longer takes effect.
To delete an automation, click 'Delete' in the automation list view, or delete the automation on the automation detail page.