# Trello

[<mark style="color:blue;">Trello</mark>](https://trello.com/) is a web-based, Kanban-style, list-making application and is developed by Trello Enterprise, a subsidiary of Atlassian.

Route detailed events from Trello to the right users in Squadcast.

## How to integrate Trello with Squadcast

### In Squadcast: Using Trello as an Alert Source

1. Navigate to **Services** -> **Service Overview** -> select or search for your Service. Expand the accordion -> In the Alert Sources section, click **Add**.

![](https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-4fbd74e7ca0b30173c47a1d58ed6a0804a0465aa%2FAlert_Sources.png?alt=media\&token=aaca6610-9d18-4dd4-9cf5-320042f326f1)

2\. Select **Trello.** Copy the displayed **Webhook URL** to [configure](#in-trello-create-a-squadcast-webhook) it within **Trello.** Finish by clicking **Add Alert Source** -> **Done.**

![](https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-cd21ccfe2f65a35c0a0b3da4e3289794f6321fd6%2FTrello.png?alt=media\&token=81cc45ce-2989-4b17-8ac8-b3edccb520dc)

{% hint style="warning" %}
**Important:**

When an alert source turns Active, it’ll show up under Configured Alert Sources, you can either generate a test alert from the integration or wait for a real-time alert to be generated by the Alert Source. An Alert Source is active if there is a recorded incident via that Alert Source for the Service.
{% endhint %}

### In Trello: Create a Squadcast Webhook

You can configure a webhook for either a Group or a Project in Trello.

**Note**: To set up the Squadcast webhook URL, there is no GUI interface in Trello. You can do this by using either of the 2 approaches mentioned below.

#### Approach 1:

You can trigger the webhook by calling it from any application that interacts with HTTP(S) APIs, such as [Postman](https://www.postman.com/), [Insomnia](https://docs.insomnia.rest/insomnia/get-started), etc.

We have considered setting up the webhook by using Postman. Here:

![](https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-bec84fb6702979d488d181c152be881d8501e1a5%2Ftrello_2.png?alt=media\&token=a7e48885-dbd7-460d-85ce-4daf66880fb4)

* Select request type as `POST`
* Paste the URL below in the placeholder for URL

```
https://api.trello.com/1/webhooks?key=YOUR_KEY&token=YOUR_TOKEN&callbackURL=PREVIOUSLY_COPIED_WEBHOOK_URL&idModel=YOUR_idList
```

* For the fields `key`, `token` and `idList`, paste the values as applicable

  * Find your `key` and `token` [<mark style="color:blue;">here</mark>](https://trello.com/app-key)
  * To see your `idList`, open any **card** > click on **Share** > click on **Export JSON** > Find `idList` from the JSON

  <img src="https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-f4ecb55fee3841ec9b3c0845ce7058c22fad71d3%2Ftrello_3.png?alt=media&#x26;token=6cb03a49-552b-4316-81d1-cb81bca0e759" alt="" data-size="original">
* `callbackURl` - paste the previously copied Squadcast webhook URL

**NOTE:** After the `POST` request is made, please ensure that the **status** of the request should return `200 OK`.

![](https://1574591692-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8TaWz01jmUJl58p4ZVel%2Fuploads%2Fgit-blob-474f2a962fb68e31e67581820eaddb95b9f6e150%2Ftrello_4.png?alt=media\&token=b3d00c0d-fd19-49d3-ab65-c3fde07e44dc)

#### Approach 2:

Run below `curl` command after replacing the `YOUR_KEY`, `YOUR_TOKEN`, `PREVIOUSLY_COPIED_WEBHOOK_URL` and `YOUR_idList` fields with `key`, `token`, `callbackURL` and `idList` (as mentioned in the previous approach)

```
curl --request POST 'https://api.trello.com/1/webhooks?key=YOUR_KEY&token=YOUR_TOKEN&callbackURL=PREVIOUSLY_COPIED_WEBHOOK_URL&idModel=YOUR_idList'
```

**NOTE:** After the `curl` request is made, if the request was not successful, you will see this as your response:

```
{"message":"URL (https://webhook.site/df59081f-1ba5-4f4d-b93d-ad4b8efbacbac) did not return 200 status code, got 404","error":"ERROR"}
```

{% hint style="info" %}
**Important:**

Understanding how the integration works:

Since Trello allows users to create and define new lists/columns within each board, the integration considers and works only as per the available defaults. When a user creates a new board, there are 3 columns by default - **To Do**, **Doing** and **Done**.

* Trigger a new incident:

When a new card is added under the **To Do** list, an incident is triggered in Squadcast for it

* Resolve an existing incident:

When a card is moved to the **Done** list, the corresponding incident will get automatically resolved in Squadcast

In case of any queries, please feel free to reach out to our [Support team](mailto:support@squadcast.com).
{% endhint %}

That is it, you are good to go! Everytime a card is created in Trello, an incident for it would be triggered in Squadcast. When the card is marked as done in Trello, the corresponding incident for it will be automatically resolved in Squadcast.

*Have any questions?* [*Ask the community*](https://community.squadcast.com/view/home)*.*
