# Automation

Automation allows creating automation rules, that trigger actions based on JovianX events. Once a rule is triggered it calls an action webhook, that can send information from JovianX to external cloud services. **Automation** effectively allows integration with external services such as [HubSpot](https://hubspot.com), [Slack](https://slack.com), [Jira](https://www.atlassian.com/software/jira), [Freshdesk](https://freshdesk.com/), [Pager Duty](https://pagerduty.com/) and others.&#x20;

![](https://2226616041-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdZQYW5C5jmCEGbhAlO%2F-M51A7FngVbA9gFNT1XQ%2F-M51upCQXOztDq-zvHDW%2Fimage.png?alt=media\&token=5d23afcc-4c9c-4d3f-8b97-70b46f2aa03d)

### Events‌

JovianX allows configuring automation rules for the following events:

* Customer account created
* Customer account deleted
* Customer account trial is over
* Customer account user created
* Customer account user logged in
* Application helm parameters changed
* Application launch settings changed
* Application upgraded
* Application error
* Email notification sent

### Actions

JovianX supports the following action Types:

{% tabs %}
{% tab title="Webhook" %}

### Webhook

JovianX calls a webhook when an automation rule is triggered. ‌To configure a Webhook set the following settings:

#### URL&#x20;

The URL of the Webhook Must be a valid web address URI.

#### ‌Method

You can define the URL method for JovianX to trigger, following methods are supported:

* GET
* POST
* PUT
* PATCH

#### **Headers**

Custom headers are supported, you can  define a custom `key: value` pairs of headers. Additionally, you can use **variables** as header `values`:

![](https://2226616041-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdZQYW5C5jmCEGbhAlO%2F-M521M7oMBq8prHJZ4bT%2F-M52302G5MpGk6aa7uRW%2Fimage.png?alt=media\&token=7cf3b8c3-c641-4fad-a0a5-064fa3e66abf)

**Content:**&#x20;

The content section holds the Webhook request content data, you can define the content type and configure the data to send.&#x20;

**Content Type**

* JSON
* MULTIPART/FORM-DATA
* X-WWW-FORM-URLENCODED

**JSON** content-type allows defining the JSON content data:

![](https://2226616041-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdZQYW5C5jmCEGbhAlO%2F-M526Vs1ClKbF24CT1hU%2F-M52AjgWSpuL21Ky9Ye1%2Fimage.png?alt=media\&token=5c62fde0-b1be-44dd-9ae7-844cbe1bae04)

**MULTIPART/FORM-DATA** and **X-WWW-FORM-URLENCODED** allow setting the `key:value` data:

![](https://2226616041-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdZQYW5C5jmCEGbhAlO%2F-M526Vs1ClKbF24CT1hU%2F-M52B31pSxB1IUn8dBak%2Fimage.png?alt=media\&token=aba8e9c8-eec6-4915-9fd5-61a2709b4c24)
{% endtab %}
{% endtabs %}

### Available Variables

Events expose a set of **variables** that can be used as event data or headers when triggering an action:

| Event                                                                                                                                     | Supported Variables                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ----------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>Customer account created</strong></p><p>Event triggered on successful customer account creation.</p>                           | <p><strong>{{account\_id}}</strong>: Account identifier</p><p><strong>{{account\_display\_name}}</strong>: Account company name provided during registration</p>                                                                                                                                                                                                                                                                                                          |
| <p><strong>Customer account deleted</strong></p><p>Event triggered on deletion of customer account.</p>                                   | <p><strong>{{account\_id}}</strong>: Account identifier</p><p><strong>{{account\_display\_name}}</strong>: Account company name provided during registration</p>                                                                                                                                                                                                                                                                                                          |
| <p><strong>Customer account trial is over</strong></p><p>Event triggered when customer account trial period is over.</p>                  | <p><strong>{{account\_id}}</strong>: Account identifier</p><p><strong>{{account\_display\_name}}</strong>: Account company name provided during registration</p>                                                                                                                                                                                                                                                                                                          |
| <p><strong>Customer account user created</strong></p><p>Event triggered on creation of new account user</p>                               | <p><strong>{{account\_id}}</strong>: Account identifier</p><p><strong>{{account\_display\_name}}</strong>: Account company name provided during registration</p><p><strong>{{user\_email}}</strong>: User email address</p><p><strong>{{user\_name}}</strong>: User full name</p>                                                                                                                                                                                         |
| <p><strong>Customer account user logged in</strong></p><p>Event triggered when account user logs into the customer console.</p>           | <p><strong>{{account\_id}}</strong>: Account identifier</p><p><strong>{{account\_display\_name}}</strong>: Account company name provided during registration</p><p><strong>{{user\_email}}</strong>: User email address</p><p><strong>{{user\_name}}</strong>: User full name</p>                                                                                                                                                                                         |
| <p><strong>Application helm parameters changed</strong></p><p>Event triggered on update of application ' 'components helm parameters.</p> | <p><strong>{{account\_id}}</strong>: Account identifier</p><p><strong>{{account\_display\_name}}</strong>: Account company name provided during registration</p><p><strong>{{parameters}}</strong>: Application components helm parameters after successful update</p>                                                                                                                                                                                                    |
| <p><strong>Application launch settings changed</strong></p><p>Event triggered when account settings are changed.</p>                      | <p><strong>{{account\_id}}</strong>: Account identifier</p><p><strong>{{account\_display\_name}}</strong>: Account company name provided during registration</p><p><strong>{{parameters}}</strong>: Application components helm parameters after successful update</p><p><strong>{{application\_settings}}</strong>: New application settings chosen by user.</p>                                                                                                         |
| <p><strong>Application upgraded</strong></p><p>Event triggered after successful application blueprint ' 'version change.</p>              | <p><strong>{{account\_id}}</strong>: Account identifier</p><p><strong>{{account\_display\_name}}</strong>: Account company name provided during registration</p><p><strong>{{parameters}}</strong>: Application components helm parameters after successful upgrade.</p><p><strong>{{old\_blueprint\_version}}</strong>: Application blueprint version before upgrade</p><p><strong>{{new\_blueprint\_version}}</strong>: Application blueprint version after upgrade</p> |
| <p><strong>Application error</strong></p><p>Event triggered when application state changes to "error".</p>                                | <p><strong>{{account\_id}}</strong>: Account identifier</p><p><strong>{{account\_display\_name}}</strong>: Account company name provided during registration</p><p><strong>{{previous\_state}}</strong>: Application state before it was changed to "error"</p><p><strong>{{parameters}}</strong>: Application components helm parameters</p><p><strong>{{application\_settings}}</strong>: Application settings chosen by user</p>                                       |
| <p><strong>Email notification sent</strong></p><p>Event triggered after an email notification is sent.</p>                                | <p><strong>{{account\_id}}</strong>: Account identifier</p><p><strong>{{account\_display\_name}}</strong>: Account company name provided during registration</p><p><strong>{{receiver}}</strong>: To whom notification was sent</p><p><strong>{{subject}}</strong>: Subject of the email notification</p><p><strong>{{message}}</strong>: Body of the email notification</p>                                                                                              |

### Creating a new automation Rule

To create a new automation rule :

1. Navigate to `Settings` > `Automation` on the side-menu.
2. Click on Create rule button on the upper left side

![](https://2226616041-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdZQYW5C5jmCEGbhAlO%2F-M51A7FngVbA9gFNT1XQ%2F-M51uyyrMT3UXRFx5Dzd%2FJovianX%20SaaS%20Platform%20\(1\).gif?alt=media\&token=7571cf83-36fe-4b2d-b86b-e0c59c2df682)

#### Example JovianX > Slack integration:

![](https://2226616041-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdZQYW5C5jmCEGbhAlO%2F-M51A7FngVbA9gFNT1XQ%2F-M51vkKOSP7DCCn0caOd%2Fimage.png?alt=media\&token=2610d9d9-ac5c-4c9f-9d32-1e61fa68f55e)
