Rules allow you to react to events in your app and to synchronize contents and assets with other systems.
A rule has two elements:
- Trigger: Define when a rule is executed, for example when content is created
- Action: Defines what will be executed when the rule is triggered
Almost all text settings for actions support placeholders.
At the moment the following placeholders are supported:
- $APP_ID: The id of your app (guid)
- $APP_NAME: The name of your app
- $USER_NAME: The display name of the user (or client name)
- $USER_EMAIL: The email address of the user (or client name)
- $TIMESTAMP_DATE: The date when the event has happened (usually different from the time when the rule is executed) in the following format: yyyy-MM-dd
- $TIMESTAMP_DATETIME; The date when the event has happened (usually different from the time when the rule is executed) in the following format: yyyy-MM-dd-hh-mm-ss
- $SCHEMA_ID: The id of the schema
- $SCHEMA_NAME: The name of the schema
- $CONTENT_URL: The URL to the content in the administration tool
- $CONTENT_ACTION: The content event (created, updated, deleted)
Your site will make several attempts to execute a rule:
- After a few seconds
- After 5 minutes
- After 1 hour
- After 6 hours
- After 12 hours
A rule execution will be treated as failed if it does not complete successfully within 2 seconds If your target system is slow (e.g. a webhook) you should use a queue between Squidex and your application.
Rule executions will be stored as events for 2 days for debugging and will be deleted automatically.