The Error Notification feature warns users when they encounter an error during automation configuration. Execution logs record this error, and the recipient is notified via email.
Follow the steps below to configure the error notification settings for your automation:
- Log in to your Contentstack account.
- On the left navigation panel, click Automation Hub.
- Within the Projects page, click the Settings icon on the right.
- Within the settings modal, enable the Email Notifications toggle button to send an email notification to the recipient. You can choose the recipient from the dropdown,
i.e., Creator, Owner, or Admin and Save your settings. If you select the recipient as Creator, an email notification will be sent to the creator of that automation. If it is set to either Owner or Admin, then the notification will be sent to the owner or the admin.
Note: Initially, the setting is disabled, you need to enable it once you land on the projects page.
Let’s understand how a recipient is notified via mail through a simple use case. Create a new automation and follow the steps given below:
Configure Trigger
- In the Configure Trigger section, click HTTP.
- Select HTTP Request Trigger and click Proceed.
Note: You can add security to the HTTP trigger using an API key. To do so, enable the toggle button.
- Send a request to the URL mentioned. Once done, click Test Trigger.
- Click Save and Exit.
Configure Action
Select the Transform connector and the Transform action.
- In the Transformation box, input the data as for ex: {'name': 'Error Notification'}. The JSON syntax for the transformation box data is incorrect. It is kept so to check if the user gets error notification for the same. Click Proceed.
- Click Test Action. You will get an error message. Click Save and Exit.
- Once done, enable the automation and navigate to the Execution Log section.
- Send the request to the URL mentioned in the HTTP Trigger to execute the automation.
- You will see a failed execution in Execution Logs.
- Navigate to the email client to check the email received for this error.
With Error Notification, you can get an instant response for your failed or unsuccessful automations.