Getting Started
Issuing HTTP requests
Automation allows you to issue GET, POST, and PUT HTTP requests to external systems from Trello.
In Automation Rules, Card Buttons, and Due Date automation, the get, post to, and put to actions are available on the Content tab.
In Board Button and Calendar automation, these actions are available on the Other tab.
POST and PUT requests
POST and PUT requests allow to specify custom headers to send along with the request:
Headers are specified as a JSON object, for example:
1
{"Content-Type": "text/plain", "X-My-Custom-Header": "My header value"}
The payload's content-type for POST and PUT requests is application/json by default, but you can override it by specifying a custom header.
Variables that are used in the URL are automatically URL-encoded to create valid URLs; variables used in the payload are automatically escaped to be part of a valid JSON string.
Response
After issuing an HTTP request with Automation, the results are stored in the {httpresponse} variable, which can be used as part of the next action(s) in the automation.
When the response is a JSON object, this variable offers an access notation to retrieve properties within the object. For example, {httpresponse.myproperty}.
Example:
The following Card Button automation will post a comment with data extracted from a JSON file that is retrieved with a GET request:
1
2
get url "https://example.com/movie-search?q={cardname}",
and post comment "Result count: {httpresponse.relatedMovies.length} \n\n First result: {httpresponse.relatedMovies[0].title}"
The {httpresponse} variable will contain the following:
1
2
3
4
5
6
{
relatedMovies:[
{title: 'Movie 1'},
{title: 'Movie 2'},
],
};
After Automation executes, it will add the following comment to the card:
Was this helpful?