The first block is called
When. It describes a source of events the rule should react to.
The following types of source items are supported in the UI:
- Modified Entity
- Incoming Web Hook
- Time Interval
If a user chooses the Modified Entity source, then it’s required to specify an entity type and a type of modification happened to entity.
In case when selected modification types include Updated, modified fields should also be selected.
The rule will be executed only if any of the selected fields are modified.
If a user chooses the Incoming Web Hook source, then a new Incoming Web Hook must be created to proceed.
When creating a new web hook, the user can choose a service it will be used for. This information is used to build suggestions that simplify configuring of next blocks of the rule pipeline. For now, predefined suggestions are supported for GitHub and GitLab.
It is possible to integrate with any tool that supports outgoing web hooks. Select "Other" and click the "Create new Incoming Web Hook" button in order to generate an URL where web hooks should be sent from the external tool.
In existent web hook, user can always reset a service the web hook is used for. This will only affect suggestions that are shown in the rule configuration. In case when
Other option is selected, suggestions are cleared. But, as soon as the next request come to the hook's endpoint, new suggestions will be generated based on the data came in the request.
A Time-Based Automation Rule should have a time interval specified. These Rules allow to perform recurring actions, such as create a set of Tasks every week, or get notified about upcoming planned dates for User Story, and so on.
The time interval can be between 15 minutes and 7 days.
It is not possible to choose the exact execution time
Please feel free to add your vote to the corresponding idea: https://servicedesk.targetprocess.com/request/210223-choose-exact-execution-time-for-automation
Here is a couple of tricks which can help you to work around this limitations:
- If you need to run the rule at specific time, you need to create this rule at that exact time.
Note: disabling, enabling, or clicking 'trigger now' do not affect the schedule.
const now = new Date(); return now.getDate() == 1;
const now = new Date(); var max = new Date(now.getFullYear(), now.getMonth() + 1, 0).getDate(); return now.getDate() == max;
const now = new Date(); const day = now.getDay(); return day != 6 && day != 0;
- If you need check when the rule was previously executed in order to compare this to some specific date you can use args.PreviousFireTime:
const previousTime = args.PreviousFireTime;
args.PreviousFireTime will return some value only in case the rule is scheduled.
If the rule is triggered manually it will return null
Updated 5 months ago