Skip to main content

Events & Triggers

info

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:

  1. Triggers run as a result of platform events
  2. Triggers rules can support very simple logic as well as more advanced logic
  3. 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:

  1. event == "connection_failed" - trigger when a connection has failed
  2. event == "connection_succeeded" - trigger when a connection has succeeded
  3. event == "connection_failed" && retry_count >= 3 - trigger when a connection failed for 3 or more consecutive times
  4. event == "connection_succeeded" && retry_count >= 3 - trigger when a connection has recovered after 3 or more attempts
  5. event == "connection_failed" && destination_connector_name == "BigQuery" - trigger when a connection with BigQuery destination has failed
  6. event == "user_added" && !str::regex_matches(email, ".*@singular[.]net$") - trigger when a user gets added outside of your domain
  7. event == "account_connector_deleted" - trigger when an account connector (source or destination) gets deleted
  8. event == "account_connector_deleted" && connector_type == "SOURCE" - monitor triggers when a source is deleted

Create a new trigger

  1. Navigate to the Triggers page within the platform (Automation->Triggers)
  2. Click "Create Trigger" on the upper right corner
  3. Name your trigger
  4. Configure your rule - This rule will be evaluated against system events, and if the expression returns True, it will trigger the associated actions.
  5. 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.

VariableTypeDescriptionSample Value
eventStringThe name of the event"connection_queued"
timestampStringThe timestamp of the event"2024-04-14T10:33:44Z"
source_connector_nameStringThe name of the source in this connection (as it appears in the Catalog page)"Salesforce"
source_account_connector_nameStringYour name to this source (as it appears in the Sources page)"Main Salesforce Instance"
destination_connector_nameStringThe name of the destination in this connection (as it appears in the Catalog page)"BigQuery"
destination_account_connector_nameStringYour name to this destination (as it appears in the Destinations page)"My BigQuery Prod"
next_scheduleStringThe next time this connector is going to run according to the schedule"2024-04-15T10:33:43Z"
next_retryStringThe next time this connector will run according to the retry schedule"2024-04-15T10:33:43Z" or null
retry_countStringThe number of attempts we retried before quitting retries3

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.

VariableTypeDescriptionSample Value
eventStringThe name of the event"connection_queued_manually"
timestampStringThe timestamp of the event"2024-04-14T10:33:44Z"
source_connector_nameStringThe name of the source in this connection (as it appears in the Catalog page)"Salesforce"
source_account_connector_nameStringYour name to this source (as it appears in the Sources page)"Main Salesforce Instance"
destination_connector_nameStringThe name of the destination in this connection (as it appears in the Catalog page)"BigQuery"
destination_account_connector_nameStringYour name to this destination (as it appears in the Destinations page)"My BigQuery Prod"

connection_started

Sent once a connection actually starts running.

VariableTypeDescriptionSample Value
eventStringThe name of the event"connection_started"
timestampStringThe timestamp of the event"2024-04-14T10:33:44Z"
source_connector_nameStringThe name of the source in this connection (as it appears in the Catalog page)"Salesforce"
source_account_connector_nameStringYour name to this source (as it appears in the Sources page)"Main Salesforce Instance"
destination_connector_nameStringThe name of the destination in this connection (as it appears in the Catalog page)"BigQuery"
destination_account_connector_nameStringYour name to this destination (as it appears in the Destinations page)"My BigQuery Prod"
retry_countStringWhat retry attempt this was. Useful to find connections that had failures that recovered.3

connection_succeeded

Sent once a connection had a successful run.

VariableTypeDescriptionSample Value
eventStringThe name of the event"connection_succeeded"
timestampStringThe timestamp of the event"2024-04-14T10:33:44Z"
source_connector_nameStringThe name of the source in this connection (as it appears in the Catalog page)"Salesforce"
source_account_connector_nameStringYour name to this source (as it appears in the Sources page)"Main Salesforce Instance"
destination_connector_nameStringThe name of the destination in this connection (as it appears in the Catalog page)"BigQuery"
destination_account_connector_nameStringYour name to this destination (as it appears in the Destinations page)"My BigQuery Prod"
retry_countNumberWhat retry attempt this was. Useful to find connections that had failures that recovered.3
successful_streamsNumberNumber of streams that completed successfully5
total_streamsNumberTotal number of streams in the connection5
source_records_readNumberTotal number of records read from the source12345
source_records_failed_validationNumberNumber of records that failed validation at the source10
source_records_producedNumberNumber of records produced by the source12335
destination_records_readNumberTotal number of records read by the destination12335
destination_records_failed_validationNumberNumber of records that failed validation at the destination5
destination_records_producedNumberNumber of records successfully loaded to the destination12330
destination_loaded_rows_by_streamObjectRow counts loaded to the destination by stream name{"campaigns": 1000, "accounts": 500}

connection_failed

Sent once a connection had a failed run.

VariableTypeDescriptionSample Value
eventStringThe name of the event"connection_failed"
timestampStringThe timestamp of the event"2024-04-14T10:33:44Z"
source_connector_nameStringThe name of the source in this connection (as it appears in the Catalog page)"Salesforce"
source_account_connector_nameStringYour name to this source (as it appears in the Sources page)"Main Salesforce Instance"
destination_connector_nameStringThe name of the destination in this connection (as it appears in the Catalog page)"BigQuery"
destination_account_connector_nameStringYour name to this destination (as it appears in the Destinations page)"My BigQuery Prod"
errorStringThe error message that led to the failure"403 Error while accessing https://www.api.com: access_token expired"
retry_countStringWhat 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.

VariableTypeDescriptionSample Value
eventStringThe name of the event"account_created"
timestampStringThe timestamp of the event"2024-04-14T10:33:44Z"
created_byStringThe email of the first user who created the accountadmin@company.com
nameStringThe name of the newly created account"Acme"
domainStringThe 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)

VariableTypeDescriptionSample Value
eventStringThe name of the event"account_created_sso"
timestampStringThe timestamp of the event"2024-04-14T10:33:44Z"
created_byStringThe email of the first user who created the accountadmin@company.com
nameStringThe name of the newly created account"Acme"
domainStringThe domain associated with the newly created account"company.com"
sso_serviceStringThe name of the SSO service used"google" or "github"

account_activated

You activated the account by verifying your email.

VariableTypeDescriptionSample Value
eventStringThe name of the event"account_activated"
timestampStringThe timestamp of the event"2024-04-14T10:33:44Z"
activated_byStringThe email of the user who activated the accountadmin@company.com
nameStringThe 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.

VariableTypeDescriptionSample Value
eventStringThe name of the event"user_added"
timestampStringThe timestamp of the event"2024-04-14T10:33:44Z"
created_byStringThe email of the user who created this useradmin@company.com
emailStringThe email of the newly created useruser@company.com
nameStringThe name of the newly created user"John Doe"

user_updated

A user profile has been updated.

VariableTypeDescriptionSample Value
eventStringThe name of the event"user_updated"
timestampStringThe timestamp of the event"2024-04-14T10:33:44Z"
updated_byStringThe email of the user who updated this useradmin@company.com
emailStringThe email of the edited useruser@company.com
nameStringThe name of the edited user"John Doe"

user_deleted

A user has been deleted from this account.

VariableTypeDescriptionSample Value
eventStringThe name of the event"user_deleted"
timestampStringThe timestamp of the event"2024-04-14T10:33:44Z"
deleted_byStringThe email of the user who deleted this useradmin@company.com
emailStringThe email of the deleted useruser@company.com
nameStringThe name of the deleted user"John Doe"

join_account

A user accepted his invite and joined your account.

VariableTypeDescriptionSample Value
eventStringThe name of the event"join_account"
timestampStringThe timestamp of the event"2024-04-14T10:33:44Z"
emailStringThe email of the user who joined the account"user@company.com"
nameStringThe name of the user who joined the account"John Doe"
ip_addressStringThe IP address of the user who joined the account"1.2.3.4"

forgot_password_started

A user started a forgot password process.

VariableTypeDescriptionSample Value
eventStringThe name of the event"forgot_password_started"
timestampStringThe timestamp of the event"2024-04-14T10:33:44Z"
emailStringThe email of the user"user@company.com"
nameStringThe name of the user"John Doe"
ip_addressStringThe IP address of the user"1.2.3.4"

forgot_password_completed

A user completed a forgot password process.

VariableTypeDescriptionSample Value
eventStringThe name of the event"forgot_password_completed"
timestampStringThe timestamp of the event"2024-04-14T10:33:44Z"
emailStringThe email of the user"user@company.com"
nameStringThe name of the user"John Doe"
ip_addressStringThe IP address of the user"1.2.3.4"

user_login

A user in your account logged in to the platform.

VariableTypeDescriptionSample Value
eventStringThe name of the event"user_login"
timestampStringThe timestamp of the event"2024-04-14T10:33:44Z"
emailStringThe email of the logged in useruser@company.com

user_login_sso

A user in your account logged in to the platform via Single Sign On.

VariableTypeDescriptionSample Value
eventStringThe name of the event"user_login_sso"
timestampStringThe timestamp of the event"2024-04-14T10:33:44Z"
emailStringThe email of the logged in useruser@company.com
sso_serviceStringThe name of the SSO service used"google" or "github"

account_connector_added

A user created a new Source or Destination (see connector_type).

VariableTypeDescriptionSample Value
eventStringThe name of the event"account_connector_added"
timestampStringThe timestamp of the event"2024-04-14T10:33:44Z"
created_byStringThe email of the user who created this account connectoradmin@company.com
connector_typeStringThe type of the connector (source / destination)."SOURCE" or "DESTINATION"
connector_nameStringThe name of the connector (as it appears in the Catalog page)"Salesforce"
account_connector_nameStringYour 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).

VariableTypeDescriptionSample Value
eventStringThe name of the event"account_connector_updated"
timestampStringThe timestamp of the event"2024-04-14T10:33:44Z"
updated_byStringThe email of the user who updated this account connectoradmin@company.com
connector_typeStringThe type of the connector (source / destination)."SOURCE" or "DESTINATION"
connector_nameStringThe name of the connector (as it appears in the Catalog page)"Salesforce"
account_connector_nameStringYour name for this connector (as it appears in the Sources/Destinations page)"Main Salesforce Instance"
enabledBooleanWhether the account connector was enabled or disabledtrue or false

account_connector_deleted

A user deleted a Source or Destination (see connector_type).

VariableTypeDescriptionSample Value
eventStringThe name of the event"account_connector_deleted"
timestampStringThe timestamp of the event"2024-04-14T10:33:44Z"
deleted_byStringThe email of the user who updated this account connectoradmin@company.com
connector_typeStringThe type of the connector (source / destination)."SOURCE" or "DESTINATION"
connector_nameStringThe name of the connector (as it appears in the Catalog page)"Salesforce"
account_connector_nameStringYour name for this connector (as it appears in the Sources/Destinations page)"Main Salesforce Instance"

connection_created

A user created a connection.

VariableTypeDescriptionSample Value
eventStringThe name of the event"connection_created"
timestampStringThe timestamp of the event"2024-04-14T10:33:44Z"
created_byStringThe email of the user who created this connectionadmin@company.com
source_connector_nameStringThe name of the source in this connection (as it appears in the Catalog page)"Salesforce"
source_connection_nameStringYour name to this source (as it appears in the Sources page)"Main Salesforce Instance"
destination_connector_nameStringThe name of the destination in this connection (as it appears in the Catalog page)"BigQuery"
destination_connection_nameStringYour 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.

VariableTypeDescriptionSample Value
eventStringThe name of the event"connection_updated"
timestampStringThe timestamp of the event"2024-04-14T10:33:44Z"
updated_byStringThe email of the user who updated this connectionadmin@company.com
source_connector_nameStringThe name of the source in this connection (as it appears in the Catalog page)"Salesforce"
source_connection_nameStringYour name to this source (as it appears in the Sources page)"Main Salesforce Instance"
destination_connector_nameStringThe name of the destination in this connection (as it appears in the Catalog page)"BigQuery"
destination_connection_nameStringYour name to this destination (as it appears in the Destinations page)"My BigQuery Prod"

connection_deleted

A user deleted a Connection.

VariableTypeDescriptionSample Value
eventStringThe name of the event"connection_deleted"
timestampStringThe timestamp of the event"2024-04-14T10:33:44Z"
deleted_byStringThe email of the user who updated this connectionadmin@company.com
source_connector_nameStringThe name of the source in this connection (as it appears in the Catalog page)"Salesforce"
source_connection_nameStringYour name to this source (as it appears in the Sources page)"Main Salesforce Instance"
destination_connector_nameStringThe name of the destination in this connection (as it appears in the Catalog page)"BigQuery"
destination_connection_nameStringYour name to this destination (as it appears in the Destinations page)"My BigQuery Prod"

trigger_added

A user created a new Trigger.

VariableTypeDescriptionSample Value
eventStringThe name of the event"trigger_added"
timestampStringThe timestamp of the event"2024-04-14T10:33:44Z"
created_byStringThe email of the user who created this triggeradmin@company.com
nameStringThe name of the triggerConnection Failure Errors
ruleStringThe rule of the triggerevent == "connection_failed"

trigger_updated

A user updated a Source or Destination (see connector_type).

VariableTypeDescriptionSample Value
eventStringThe name of the event"trigger_updated"
timestampStringThe timestamp of the event"2024-04-14T10:33:44Z"
updated_byStringThe email of the user who updated this triggeradmin@company.com
nameStringThe name of the triggerConnection Failure Errors
ruleStringThe rule of the triggerevent == "connection_failed"

trigger_deleted

A user deleted a Source or Destination (see connector_type).

VariableTypeDescriptionSample Value
eventStringThe name of the event"trigger_deleted"
timestampStringThe timestamp of the event"2024-04-14T10:33:44Z"
deleted_byStringThe email of the user who updated this triggeradmin@company.com
nameStringThe name of the triggerConnection Failure Errors
ruleStringThe rule of the triggerevent == "connection_failed"

stream_schema_change

A stream schema change

VariableTypeDescriptionSample Value
eventStringThe name of the event"stream_schema_change"
connector_nameStringThe name of the relevant connector"Apple App Store Rating"
schema_change_typeStringwhat change took place within a streamstream_added
account_connector_nameStringThe name of the relevant account connector"My Apple App Store Rating"