Create a Trello card

Website: https://trello.com/ API Docs: https://developers.trello.com/advanced-reference

Trello is a task management and organization app. You can connect Customer.io to Trello using Webhook Actions to add cards on your chosen list. In our example, we will create a card to contact a customer after they agreed to give us additional feedback regarding our product.

Show me how!

The finished product:

Create a Trello card with Customer.io

If you don’t have a Trello account, you can create one here. Then, after you log in, retrieve your developer API key.

Get your token

You’ll also need a token. To get one, paste your own API key into the URL below:

https://trello.com/1/authorize?expiration=never&scope=read,write,account&response_type=token&name=Server%20Token&key=YourAPIKeyHere
Allow access

Click the Allow button to give access to your boards and teams. If you're successful, you’ll see a white page with the following content...

You have granted access to your Trello information.
To complete the process, please give this token:

...and your token should be there!

Find the List ID

There is one more piece of data you need: the id of the list where you want to post your cards. To find this ID:

  1. Open the board that contains your chosen list.
  2. Add one card to that list (if one does not exist already).
  3. Open the card and copy the URL that you see in the address bar.
  4. It should be short URL that looks like https://trello.com/c/DcqBrqdx/1-target-card
  5. Take that URL and add ".json" to the end, like this: https://trello.com/c/DcqBrqdx/1-target-card.json
  6. Go to this URL. In the code, you will see a field called idList.
  7. Copy the idList:

Create your campaign

Inside your Customer.io account, create a new campaign (event triggered or segment triggered depending on what should trigger the Trello card creation.

In our example we’ll use the event FeedbackRequest with an attribute filter “Accepted is equal to true”.

Add a webhook action

Add a webhook action to your workflow, and give it a name. We’ll call our webhook “Contact customer”:

After adding the webhook, click Add Request.

Set your endpoint in the composer

Next to POST add the Trello endpoint, with your API key and token pasted into it:

https://api.trello.com/1/cards?key=YOUR-API-KEY&token=YOUR-TOKEN

Be careful not to add any extra spaces before or after this URL.

Customize your webhook body

For the body of our new card we’ll use this sample content:

idList needs to be replaced with the idList we retrieved from Trello. Only the due and idList attributes are mandatory. You can find more information about other attributes here.

Send Request

When you’re ready to test, you can click Send Request. Customer.io will show you the response from the Trello API.

If you’re successful you’ll see a 200 OK Response.

Success!

In Trello you will see this card created.

We’re excited to hear how you end up using Trello with Customer.io’s Webhook Action. If you have any trouble, let us know! We're happy to help.