Sync your tasks from multiple sources in one Trello board
APACHE-2.0 License
entrello
Servicesentrello
synchronizes your tasks from one or more sources in one Trello board by:
Synchronization feature is supported by both the runner and server modes.
entrello
lets you build custom automations based on archived card events:
POST
s this event to the matching HTTP service, if any.POST
request and take further actions, e.g. it could update some value in a spreadsheet.Automation feature is supported only by the server mode, which listens for Trello webhooks.
See config.example.json
for reference.
Your custom HTTP services must each return a JSON array of Trello card objects upon GET
requests.
name
— Service name.
endpoint
— Service endpoint URL.
label_id
— Trello label ID. A label ID can be associated with no more than one service.
list_id
— Trello list ID, i.e. where to insert new cards. The list must be in the board specified by the root-level board_id
config parameter.
period
— Polling period. A few examples:
// poll on 3rd, 6th, 9th, ... of each month, at 00:00
"period": {
"type": "day",
"interval": 3
}
// poll every day at 00:00, 02:00, 04:00, ...
"period": {
"type": "hour",
"interval": 2
}
// poll every hour at XX:00, XX:15, XX:30, XX:45
"period": {
"type": "minute",
"interval": 15
}
// poll on each execution
"period": {
"type": "default"
}
secret
— Alphanumeric API secret. If present, entrello
will put it in the X-Api-Key
HTTP header.
strict
— Whether stale cards should be deleted from the board upon synchronization. false
by default.
Create a service configuration file based on config.example.json
. You can trigger a one-off synchronization by executing the runner:
# run this as a scheduled (cron) job
go run ./cmd/runner -c /path/to/config/file
If the -c
flag is omitted, the runner looks for a file called config.json
in the current working directory:
# these two are equivalent:
go run ./cmd/runner
go run ./cmd/runner -c ./config.json
Put your environment variables in a file called .env
based on .env.example
and start the server:
go run ./cmd/server
You can trigger a one-off synchronization by making a POST
request to the server with the service configuration in the request body:
# run this as a scheduled (cron) job
curl <SERVER_URL> \
-d @<path/to/config.json> \
-H "Authorization: Basic <base64(<USERNAME>:<PASSWORD>)>"
To enable automation for one or more services:
<ENTRELLO_SERVER_URL>/trello-webhook
SERVICES
environment variable, a comma-separated list of service configuration strings:
<TRELLO_LABEL_ID>@<SERVICE_ENDPOINT_URL>
# the HTTP header "X-Api-Key" will be set to "SuPerSecRetPassW0rd" in each request
<TRELLO_LABEL_ID>:SuPerSecRetPassW0rd@<SERVICE_ENDPOINT_URL>
A new Docker image will be created upon each release.
Authenticate with the GitHub container registry (only once):
echo $GITHUB_ACCESS_TOKEN | docker login ghcr.io -u GITHUB_USERNAME --password-stdin
Pull the latest Docker image:
docker pull ghcr.io/utkuufuk/entrello/image:latest
Spawn & run a container:
# server
docker run -d \
-p <PORT>:<PORT> \
--env-file </absolute/path/to/.env> \
--restart unless-stopped \
--name entrello-server \
ghcr.io/utkuufuk/entrello/image:latest
# runner
docker run --rm \
-v </absolute/path/to/config.json>:/bin/config.json \
ghcr.io/utkuufuk/entrello/image:latest \
./runner
entrello
ServicesYou may use these as references for developing your own services:
# create new webhook
curl -X POST -H "Content-Type: application/json" -d \
'{
"key": "<TRELLO_API_KEY>",
"callbackURL": "<ENTRELLO_SERVER_CALLBACK_URL>",
"idModel": "<TRELLO_BOARD_ID>",
"description": "<DESCRIPTION>"
}' https://api.trello.com/1/tokens/<TRELLO_API_TOKEN>/webhooks/
# list all webhooks
curl https://api.trello.com/1/members/me/tokens?webhooks=true&key=<TRELLO_API_KEY>&token=<TRELLO_API_TOKEN>
# delete existing webhook
curl -X DELETE https://api.trello.com/1/webhooks/<TRELLO_WEBHOOK_ID>?key=<TRELLO_API_KEY>&token=<TRELLO_API_TOKEN>
For more information on Trello webhooks: