Events & Triggers
This guide will help you efficiently manage and monitor key activities through two features: Events and Triggers.
Events provide a comprehensive view of all the activities and occurrences within the platform. This centralized view ensures that you can easily keep track of every significant event, giving you valuable insights into your operations.
Triggers allow you to set up customized alerts based on specific events. With this feature, you can define conditions that, when met, will automatically notify you, ensuring that you stay informed and can take timely action.
Triggers
Triggers are a powerful tool that enable you to solve key automation, transformation, observability and orchestration use-cases:
- Triggers run as a result of platform events
- Triggers rules can support very simple logic as well as more advanced logic
- Triggers can take various actions such as:
- Send a Slack notification
- Send an Email notification
Rules
Your monitor rule is evaluated every time a system event is generated. Each event has different properties, which will be available as variables in your rule expression.
Rules are expressions that evaluate to a boolean outcome. Below are sample rules:
event == "connection_failed"- trigger when a connection has failedevent == "connection_succeeded"- trigger when a connection has succeededevent == "connection_failed" && retry_count >= 3- trigger when a connection failed for 3 or more consecutive timesevent == "connection_succeeded" && retry_count >= 3- trigger when a connection has recovered after 3 or more attemptsevent == "connection_failed" && destination_connector_name == "BigQuery"- trigger when a connection with BigQuery destination has failedevent == "user_added" && !str::regex_matches(email, ".*@singular[.]net$")- trigger when a user gets added outside of your domainevent == "account_connector_deleted"- trigger when an account connector (source or destination) gets deletedevent == "account_connector_deleted" && connector_type == "SOURCE"- monitor triggers when a source is deleted
Create a new trigger
- Navigate to the Triggers page within the platform (Automation->Triggers)
- Click "Create Trigger" on the upper right corner
- Name your trigger
- Configure your rule - This rule will be evaluated against system events, and if the expression returns True, it will trigger the associated actions.
- Configure your desirable actions by adding email address or slack integration
Events
Events are automatically generated by the system in various points, and enable to trigger monitors.
You can see events available in your account in this page: https://dp.singular.net/automation/events
Below see a reference listing all events available and their properties.
connection_queued
A connection has been queued to run by our scheduler. The connection goes into a queue to be run by a worker.
Once the connection starts running, the system will emit a connection_started event.
Once the connection finished, the system will emit either a connection_failed event or a connection_succeeded event.
| Variable | Type | Description | Sample Value |
|---|---|---|---|
event | String | The name of the event | "connection_queued" |
timestamp | String | The timestamp of the event | "2024-04-14T10:33:44Z" |
source_connector_name | String | The name of the source in this connection (as it appears in the Catalog page) | "Salesforce" |
source_account_connector_name | String | Your name to this source (as it appears in the Sources page) | "Main Salesforce Instance" |
destination_connector_name | String | The name of the destination in this connection (as it appears in the Catalog page) | "BigQuery" |
destination_account_connector_name | String | Your name to this destination (as it appears in the Destinations page) | "My BigQuery Prod" |
next_schedule | String | The next time this connector is going to run according to the schedule | "2024-04-15T10:33:43Z" |
next_retry | String | The next time this connector will run according to the retry schedule | "2024-04-15T10:33:43Z" or null |
retry_count | String | The number of attempts we retried before quitting retries | 3 |
connection_queued_manually
A connection has been queued to run by a user in the API/UI. The connection goes into a queue to be run by a worker.
Once the connection starts running, the system will emit a connection_started event.
Once the connection finished, the system will emit either a connection_failed event or a connection_succeeded event.
| Variable | Type | Description | Sample Value |
|---|---|---|---|
event | String | The name of the event | "connection_queued_manually" |
timestamp | String | The timestamp of the event | "2024-04-14T10:33:44Z" |
source_connector_name | String | The name of the source in this connection (as it appears in the Catalog page) | "Salesforce" |
source_account_connector_name | String | Your name to this source (as it appears in the Sources page) | "Main Salesforce Instance" |
destination_connector_name | String | The name of the destination in this connection (as it appears in the Catalog page) | "BigQuery" |
destination_account_connector_name | String | Your name to this destination (as it appears in the Destinations page) | "My BigQuery Prod" |
connection_started
Sent once a connection actually starts running.
| Variable | Type | Description | Sample Value |
|---|---|---|---|
event | String | The name of the event | "connection_started" |
timestamp | String | The timestamp of the event | "2024-04-14T10:33:44Z" |
source_connector_name | String | The name of the source in this connection (as it appears in the Catalog page) | "Salesforce" |
source_account_connector_name | String | Your name to this source (as it appears in the Sources page) | "Main Salesforce Instance" |
destination_connector_name | String | The name of the destination in this connection (as it appears in the Catalog page) | "BigQuery" |
destination_account_connector_name | String | Your name to this destination (as it appears in the Destinations page) | "My BigQuery Prod" |
retry_count | String | What retry attempt this was. Useful to find connections that had failures that recovered. | 3 |
connection_succeeded
Sent once a connection had a successful run.
| Variable | Type | Description | Sample Value |
|---|---|---|---|
event | String | The name of the event | "connection_succeeded" |
timestamp | String | The timestamp of the event | "2024-04-14T10:33:44Z" |
source_connector_name | String | The name of the source in this connection (as it appears in the Catalog page) | "Salesforce" |
source_account_connector_name | String | Your name to this source (as it appears in the Sources page) | "Main Salesforce Instance" |
destination_connector_name | String | The name of the destination in this connection (as it appears in the Catalog page) | "BigQuery" |
destination_account_connector_name | String | Your name to this destination (as it appears in the Destinations page) | "My BigQuery Prod" |
retry_count | Number | What retry attempt this was. Useful to find connections that had failures that recovered. | 3 |
successful_streams | Number | Number of streams that completed successfully | 5 |
total_streams | Number | Total number of streams in the connection | 5 |
source_records_read | Number | Total number of records read from the source | 12345 |
source_records_failed_validation | Number | Number of records that failed validation at the source | 10 |
source_records_produced | Number | Number of records produced by the source | 12335 |
destination_records_read | Number | Total number of records read by the destination | 12335 |
destination_records_failed_validation | Number | Number of records that failed validation at the destination | 5 |
destination_records_produced | Number | Number of records successfully loaded to the destination | 12330 |
destination_loaded_rows_by_stream | Object | Row counts loaded to the destination by stream name. Numeric stream keys can be addressed in rules with dot-path syntax, for example destination_loaded_rows_by_stream.campaigns == 0. Use destination_loaded_rows_has_zero_stream == true to match when any stream loaded 0 rows. | {"campaigns": 1000, "accounts": 500} |
connection_failed
Sent once a connection had a failed run.
| Variable | Type | Description | Sample Value |
|---|---|---|---|
event | String | The name of the event | "connection_failed" |
timestamp | String | The timestamp of the event | "2024-04-14T10:33:44Z" |
source_connector_name | String | The name of the source in this connection (as it appears in the Catalog page) | "Salesforce" |
source_account_connector_name | String | Your name to this source (as it appears in the Sources page) | "Main Salesforce Instance" |
destination_connector_name | String | The name of the destination in this connection (as it appears in the Catalog page) | "BigQuery" |
destination_account_connector_name | String | Your name to this destination (as it appears in the Destinations page) | "My BigQuery Prod" |
error | String | The error message that led to the failure | "403 Error while accessing https://www.api.com: access_token expired" |
retry_count | String | What retry attempt this was. Useful to find connections that had at least X consecutive failures. | 3 |
account_created
Your account's very first event. Birth.
| Variable | Type | Description | Sample Value |
|---|---|---|---|
event | String | The name of the event | "account_created" |
timestamp | String | The timestamp of the event | "2024-04-14T10:33:44Z" |
created_by | String | The email of the first user who created the account | admin@company.com |
name | String | The name of the newly created account | "Acme" |
domain | String | The domain associated with the newly created account | "company.com" |
account_created_sso
Your account's very first event - when it was created by Single Sign On (Google / Github)
| Variable | Type | Description | Sample Value |
|---|---|---|---|
event | String | The name of the event | "account_created_sso" |
timestamp | String | The timestamp of the event | "2024-04-14T10:33:44Z" |
created_by | String | The email of the first user who created the account | admin@company.com |
name | String | The name of the newly created account | "Acme" |
domain | String | The domain associated with the newly created account | "company.com" |
sso_service | String | The name of the SSO service used | "google" or "github" |
account_activated
You activated the account by verifying your email.
| Variable | Type | Description | Sample Value |
|---|---|---|---|
event | String | The name of the event | "account_activated" |
timestamp | String | The timestamp of the event | "2024-04-14T10:33:44Z" |
activated_by | String | The email of the user who activated the account | admin@company.com |
name | String | The name of the activated account | "Acme" |
user_added
A user has been added to this account. They will receive an email invite, and if they accept to join, a join_account event will be generated.
See example above for how you can filter emails outside of your domains and create alerts on that.
| Variable | Type | Description | Sample Value |
|---|---|---|---|
event | String | The name of the event | "user_added" |
timestamp | String | The timestamp of the event | "2024-04-14T10:33:44Z" |
created_by | String | The email of the user who created this user | admin@company.com |
email | String | The email of the newly created user | user@company.com |
name | String | The name of the newly created user | "John Doe" |
user_updated
A user profile has been updated.
| Variable | Type | Description | Sample Value |
|---|---|---|---|
event | String | The name of the event | "user_updated" |
timestamp | String | The timestamp of the event | "2024-04-14T10:33:44Z" |
updated_by | String | The email of the user who updated this user | admin@company.com |
email | String | The email of the edited user | user@company.com |
name | String | The name of the edited user | "John Doe" |
user_deleted
A user has been deleted from this account.
| Variable | Type | Description | Sample Value |
|---|---|---|---|
event | String | The name of the event | "user_deleted" |
timestamp | String | The timestamp of the event | "2024-04-14T10:33:44Z" |
deleted_by | String | The email of the user who deleted this user | admin@company.com |
email | String | The email of the deleted user | user@company.com |
name | String | The name of the deleted user | "John Doe" |
join_account
A user accepted his invite and joined your account.
| Variable | Type | Description | Sample Value |
|---|---|---|---|
event | String | The name of the event | "join_account" |
timestamp | String | The timestamp of the event | "2024-04-14T10:33:44Z" |
email | String | The email of the user who joined the account | "user@company.com" |
name | String | The name of the user who joined the account | "John Doe" |
ip_address | String | The IP address of the user who joined the account | "1.2.3.4" |
forgot_password_started
A user started a forgot password process.
| Variable | Type | Description | Sample Value |
|---|---|---|---|
event | String | The name of the event | "forgot_password_started" |
timestamp | String | The timestamp of the event | "2024-04-14T10:33:44Z" |
email | String | The email of the user | "user@company.com" |
name | String | The name of the user | "John Doe" |
ip_address | String | The IP address of the user | "1.2.3.4" |
forgot_password_completed
A user completed a forgot password process.
| Variable | Type | Description | Sample Value |
|---|---|---|---|
event | String | The name of the event | "forgot_password_completed" |
timestamp | String | The timestamp of the event | "2024-04-14T10:33:44Z" |
email | String | The email of the user | "user@company.com" |
name | String | The name of the user | "John Doe" |
ip_address | String | The IP address of the user | "1.2.3.4" |
user_login
A user in your account logged in to the platform.
| Variable | Type | Description | Sample Value |
|---|---|---|---|
event | String | The name of the event | "user_login" |
timestamp | String | The timestamp of the event | "2024-04-14T10:33:44Z" |
email | String | The email of the logged in user | user@company.com |
user_login_sso
A user in your account logged in to the platform via Single Sign On.
| Variable | Type | Description | Sample Value |
|---|---|---|---|
event | String | The name of the event | "user_login_sso" |
timestamp | String | The timestamp of the event | "2024-04-14T10:33:44Z" |
email | String | The email of the logged in user | user@company.com |
sso_service | String | The name of the SSO service used | "google" or "github" |
account_connector_added
A user created a new Source or Destination (see connector_type).
| Variable | Type | Description | Sample Value |
|---|---|---|---|
event | String | The name of the event | "account_connector_added" |
timestamp | String | The timestamp of the event | "2024-04-14T10:33:44Z" |
created_by | String | The email of the user who created this account connector | admin@company.com |
connector_type | String | The type of the connector (source / destination). | "SOURCE" or "DESTINATION" |
connector_name | String | The name of the connector (as it appears in the Catalog page) | "Salesforce" |
account_connector_name | String | Your name for this connector (as it appears in the Sources/Destinations page) | "Main Salesforce Instance" |
account_connector_updated
A user updated a Source or Destination (see connector_type).
| Variable | Type | Description | Sample Value |
|---|---|---|---|
event | String | The name of the event | "account_connector_updated" |
timestamp | String | The timestamp of the event | "2024-04-14T10:33:44Z" |
updated_by | String | The email of the user who updated this account connector | admin@company.com |
connector_type | String | The type of the connector (source / destination). | "SOURCE" or "DESTINATION" |
connector_name | String | The name of the connector (as it appears in the Catalog page) | "Salesforce" |
account_connector_name | String | Your name for this connector (as it appears in the Sources/Destinations page) | "Main Salesforce Instance" |
enabled | Boolean | Whether the account connector was enabled or disabled | true or false |
account_connector_deleted
A user deleted a Source or Destination (see connector_type).
| Variable | Type | Description | Sample Value |
|---|---|---|---|
event | String | The name of the event | "account_connector_deleted" |
timestamp | String | The timestamp of the event | "2024-04-14T10:33:44Z" |
deleted_by | String | The email of the user who updated this account connector | admin@company.com |
connector_type | String | The type of the connector (source / destination). | "SOURCE" or "DESTINATION" |
connector_name | String | The name of the connector (as it appears in the Catalog page) | "Salesforce" |
account_connector_name | String | Your name for this connector (as it appears in the Sources/Destinations page) | "Main Salesforce Instance" |
connection_created
A user created a connection.
| Variable | Type | Description | Sample Value |
|---|---|---|---|
event | String | The name of the event | "connection_created" |
timestamp | String | The timestamp of the event | "2024-04-14T10:33:44Z" |
created_by | String | The email of the user who created this connection | admin@company.com |
source_connector_name | String | The name of the source in this connection (as it appears in the Catalog page) | "Salesforce" |
source_connection_name | String | Your name to this source (as it appears in the Sources page) | "Main Salesforce Instance" |
destination_connector_name | String | The name of the destination in this connection (as it appears in the Catalog page) | "BigQuery" |
destination_connection_name | String | Your name to this destination (as it appears in the Destinations page) | "My BigQuery Prod" |
connection_updated
A user updated a Connection. The variables for this event depend on the specific parameter that was updated. For example, if the schedule was changed, two parameters will be included to describe it: old_schedule and new_schedule.
| Variable | Type | Description | Sample Value |
|---|---|---|---|
event | String | The name of the event | "connection_updated" |
timestamp | String | The timestamp of the event | "2024-04-14T10:33:44Z" |
updated_by | String | The email of the user who updated this connection | admin@company.com |
source_connector_name | String | The name of the source in this connection (as it appears in the Catalog page) | "Salesforce" |
source_connection_name | String | Your name to this source (as it appears in the Sources page) | "Main Salesforce Instance" |
destination_connector_name | String | The name of the destination in this connection (as it appears in the Catalog page) | "BigQuery" |
destination_connection_name | String | Your name to this destination (as it appears in the Destinations page) | "My BigQuery Prod" |
connection_deleted
A user deleted a Connection.
| Variable | Type | Description | Sample Value |
|---|---|---|---|
event | String | The name of the event | "connection_deleted" |
timestamp | String | The timestamp of the event | "2024-04-14T10:33:44Z" |
deleted_by | String | The email of the user who updated this connection | admin@company.com |
source_connector_name | String | The name of the source in this connection (as it appears in the Catalog page) | "Salesforce" |
source_connection_name | String | Your name to this source (as it appears in the Sources page) | "Main Salesforce Instance" |
destination_connector_name | String | The name of the destination in this connection (as it appears in the Catalog page) | "BigQuery" |
destination_connection_name | String | Your name to this destination (as it appears in the Destinations page) | "My BigQuery Prod" |
trigger_added
A user created a new Trigger.
| Variable | Type | Description | Sample Value |
|---|---|---|---|
event | String | The name of the event | "trigger_added" |
timestamp | String | The timestamp of the event | "2024-04-14T10:33:44Z" |
created_by | String | The email of the user who created this trigger | admin@company.com |
name | String | The name of the trigger | Connection Failure Errors |
rule | String | The rule of the trigger | event == "connection_failed" |
trigger_updated
A user updated a Source or Destination (see connector_type).
| Variable | Type | Description | Sample Value |
|---|---|---|---|
event | String | The name of the event | "trigger_updated" |
timestamp | String | The timestamp of the event | "2024-04-14T10:33:44Z" |
updated_by | String | The email of the user who updated this trigger | admin@company.com |
name | String | The name of the trigger | Connection Failure Errors |
rule | String | The rule of the trigger | event == "connection_failed" |
trigger_deleted
A user deleted a Source or Destination (see connector_type).
| Variable | Type | Description | Sample Value |
|---|---|---|---|
event | String | The name of the event | "trigger_deleted" |
timestamp | String | The timestamp of the event | "2024-04-14T10:33:44Z" |
deleted_by | String | The email of the user who updated this trigger | admin@company.com |
name | String | The name of the trigger | Connection Failure Errors |
rule | String | The rule of the trigger | event == "connection_failed" |
stream_schema_change
A stream schema change
| Variable | Type | Description | Sample Value |
|---|---|---|---|
event | String | The name of the event | "stream_schema_change" |
connector_name | String | The name of the relevant connector | "Apple App Store Rating" |
schema_change_type | String | what change took place within a stream | stream_added |
account_connector_name | String | The name of the relevant account connector | "My Apple App Store Rating" |