Overview
When your team tracks work on a Trello board, Formalize can keep the related Formalize incidents in step with the Trello board. With the Formalize webhook trigger, Trello sends an event to Formalize every time a card changes. The Formalize workflow in this article checks that each event really comes from Trello, finds the incident that belongs to the card, and updates the incident when the card moves to one of the lists you check for. This article uses the lists To do, Doing and Done, and resolves the incident when the card moves to Done.
This article covers the Trello-specific setup. For the webhook trigger in general, see Trigger workflows from external systems with webhooks. For verification rules, shared secrets and IP allowlists, see Verify and secure webhooks in Formalize workflows.
Before you start
To connect Trello to Formalize incidents, you need:
Everything listed under Before you start in Trigger workflows from external systems with webhooks: the Automations feature, a company account that isn't a trial account, and Automations access rights.
An incident text custom field that stores the Trello card ID, for example Trello card ID, filled in on every incident you want to keep in sync with Trello.
Another incident text custom field that stores the name of the card's current Trello list, for example Current list status in Trello. The workflow writes the list name to this field.See Custom Fields.
From Trello: an API key, an API token for a Trello user who is a member of the board, the API secret and the ID of the board to watch. The API key and API secret are both shown on the API key page of your Trello Power-Up, in the Trello Power-Up admin portal. See Trello's API introduction.
A tool that can send HTTP requests, such as curl or Postman. Trello creates webhooks only through its REST API.
Create the Trello webhook workflow in Formalize
Follow Create a webhook workflow to create a webhook workflow, and copy the webhook URL from the Trigger node. For Trello:
When you add the required Run code action, name it Verify Trello signature. The Verify Trello signature action checks the Trello signature in a later section of this article.
Don't register the webhook in Trello yet. Trello checks the webhook URL as soon as you register it, so create the verification rule first.
Answer Trello's verification request
When you register a webhook, Trello sends a HEAD request to the Formalize webhook URL and expects the status 200. If Formalize doesn't answer the HEAD request, Trello doesn't create the webhook.
Create a verification rule with the condition Method Equals HEAD that responds with the status 200 and an empty body. For the steps, see Create a verification rule in Verify and secure webhooks in Formalize workflows.
Register the webhook in Trello
Trello creates webhooks through its REST API, not in the Trello app. In Postman or another API client, send a POST request to https://api.trello.com/1/webhooks/:
1. Under Params, add your Trello credentials as query parameters:
Parameter | Value |
key | Your Trello API key. |
token | Your Trello API token. |
2. Under Body, select raw and JSON, and enter the webhook details:
Field | Value |
description | A name for the webhook, for example Board activity webhook. |
callbackURL | The Formalize webhook URL you copied from the Trigger node. |
idModel | The ID of the Trello board to watch. |
For example:
{
"description": "Board activity webhook",
"callbackURL": "<your webhook URL>",
"idModel": "<your board ID>"
}
3. Click Send.
When Trello creates the webhook, it returns the webhook details, including its id. If Trello returns an error instead, see Trello can't create the webhook under Troubleshooting. For all webhook options, see Trello's webhooks documentation.
Send a test event from Trello
Move a card on the Trello board to another list. Then copy the event's payload from the Inbound events tab, as described in Send a test event.
Create the Trello trigger variables
Paste the Trello payload into Sample payload and derive the variables, as described in Create trigger variables. After you derive the variables, adjust them for Trello:
1. Keep the three variables in the table below and remove the others. Rename them as shown, because the derived names come from the path (action.data.card.id becomes actionDataCardId):
Name | Source | Path | Type |
cardId | Body | action.data.card.id | Text |
eventType | Body | action.type | Text |
listName | Body | action.data.listAfter.name | Text |
2. Click Add variable and add the Trello signature header: set Name to trelloSignature, Source to Headers, Path to x-trello-webhook and Type to Text.
3. Click Save.
Verify the Trello signature
Anyone who knows the Formalize webhook URL can send events to it. Trello signs every event it sends: the X-Trello-Webhook header contains a signature computed from the event body, the webhook URL and your Trello API secret. Check this signature so the workflow acts only on events from Trello.
In Run code, context.trigger.bodyRaw holds the event body exactly as Trello sent it. The code signs context.trigger.bodyRaw rather than the trigger variables, because Trello computes the signature over the original text.
Go to Operations > Workflows, open the workflow and click Builder.
Click the Verify Trello signature Run code action below the Trigger node.
Paste the following code. Replace <your Trello API secret> with your Trello API secret, and <your webhook URL> with the webhook URL you copied from the Trigger node. Type the webhook URL into the code. Don't read it from the event, because the sender controls the event.
const trelloSecret = "<your Trello API secret>";
const callbackURL = "<your webhook URL>";
const encoder = new TextEncoder();
const key = await crypto.subtle.importKey(
"raw",
encoder.encode(trelloSecret),
{ name: "HMAC", hash: "SHA-1" },
false,
["sign"]
);
const signature = await crypto.subtle.sign(
"HMAC",
key,
encoder.encode(context.trigger.bodyRaw + callbackURL)
);
const expected = btoa(String.fromCharCode(...new Uint8Array(signature)));
const received = context.trigger.trelloSignature || "";
// Compare every character so the check takes the same time for any signature.
let diff = expected.length ^ received.length;
for (let i = 0; i < expected.length; i++) {
diff |= expected.charCodeAt(i) ^ received.charCodeAt(i);
}
return {
signatureValid: diff === 0 ? true : null
};Click + below the Verify Trello signature action, select Condition, then select True / False and set signatureValid is not empty.
Build the rest of the workflow in the True branch. Leave the False branch empty, so runs started by events without a valid Trello signature stop before any action.
Click Save.
⚠️ Warning: The Trello API secret is visible to anyone who can view this workflow. Limit who has View automations and Add/Edit/Delete automations rights, and regenerate the secret in Trello if it leaks.
Find and update the incident that matches the Trello card
Trello sends an updateCard event for every change to a card, such as a new name, due date or description. Only events for a card that moved to another list contain the name of the new list. In the True branch of the signature check:
Click +, select Condition, then select True / False. Set eventType Equals updateCard, click Add condition, and set listName to Is not empty, and then one more condition to check cardId Is not empty. The True branch runs only when all conditions match. Build the next steps in the True branch.
Click +, select Action, then click Select action > Find Records. Select Incidents, select your Trello card ID custom field, and select the cardId variable as the value. Turn on Return first, so Find Records returns only the first matching incident.
Click +, select Condition, then select IF / ELSE IF / ELSE. For each IF / ELSE IF, add a condition to set Find Incident -> found to Is checked, and another condition to set listName → Equals → To do in the first IF statement, Doing in the proceeding ELSE IF, and finally Done in the last ELSE IF statement. The final ELSE statement catches all remaining scenarios if no branch was executed prior and requires no additional configuring.
For each branch of the IF / ELSE IF condition, click +, select Action, then click Select action and choose Update Incident. Under Select incident, select the incident returned by Find Records. Under Fields to update, select the field(s) to change.
Select Current list status in Trello and select the variable listName.
In the ELSE IF branch for Done, under Fields to update, also select the resolution fields: Set Description to a static text such as ‘Resolved in Trello’, or alternatively you may choose to use a variable from the dropdown that displays when you click in the text field; Set Resolution Date to Relative, 0 days before workflow triggered; and select the checkbox for Resolve incident so the incident is resolved.
Click Save.
Test the Trello workflow
Move a card on the Trello board to another list. The card must belong to an incident whose Trello card ID field holds the card's ID.
In the Inbound events tab, click View run on the newest event to see the result of each step. See Check inbound events.
Open the incident and check that the field, Current list status in trello, you chose in Fields to update shows the new Trello list.
Troubleshooting
Trello can't create the webhook
Trello creates the webhook only if the Formalize webhook URL answers its HEAD request with the status 200. Check that callbackURL is exactly the URL you copied from the Trigger node. For the other checks, see The external system can't verify the webhook URL.
Runs stop at the signature check
The signature the code computed doesn't match the X-Trello-Webhook header. Check that:
The code uses your Trello API secret, not the API key or token.
The webhook URL in the code is exactly the callbackURL you registered in Trello, including any trailing slash.
The code signs context.trigger.bodyRaw.
Click View run on the event to see the output of the Verify Trello signature action.
Runs stop at the card-moved condition
The event wasn't a move to another list, for example the card was renamed. This is expected. If the card did move, click Payload on the event and compare its body with the listName path, action.data.listAfter.name.
The incident isn't updated
Find Records didn't find an incident. Check that the incident's Trello card ID field holds the card's ID exactly as it appears at action.data.card.id in the event payload. The card ID is a long ID, not the short code in the Trello card URL.
Other Trello webhook errors
For these webhook errors, see Troubleshooting in Trigger workflows from external systems with webhooks:
Trello events show the status Rejected in the Inbound events tab.
Trello reports a 404 error for the Formalize webhook URL.
The Trello trigger variables are empty.








