mirror of https://github.com/zulip/zulip.git
webhooks/trello/doc: Require users to download Trello script.
We now have a standalone zulip_trello.py script that can be run on Python2 and Python3 without having to install the `zulip` package.
This commit is contained in:
parent
bd6a5ed7af
commit
0012e76123
|
@ -1,7 +1,7 @@
|
|||
Get Zulip notifications from your Trello boards!
|
||||
|
||||
!!! tip ""
|
||||
Note that [the Zapier integration][1] is usually a simpler way to
|
||||
Note that [Zapier][1] is usually a simpler way to
|
||||
integrate Trello with Zulip.
|
||||
|
||||
[1]: ./zapier
|
||||
|
@ -10,8 +10,7 @@ Get Zulip notifications from your Trello boards!
|
|||
|
||||
1. {!create-bot-construct-url-indented.md!}
|
||||
|
||||
1. We will first collect three items: a **Board ID**, an **API Key**, and a
|
||||
**User Token**.
|
||||
1. **Log in to Trello**, and collect the following three items:
|
||||
|
||||
* **Board ID**: Go to your Trello board. The URL should look like
|
||||
`https://trello.com/b/<BOARD_ID>/<BOARD_NAME>`. Note down the
|
||||
|
@ -24,45 +23,32 @@ Get Zulip notifications from your Trello boards!
|
|||
**Developer API Keys**, click on the **Token** link. Click on **Allow**.
|
||||
Note down the token generated.
|
||||
|
||||
1. Download and install our
|
||||
[Python bindings and example scripts](/api/installation-instructions).
|
||||
1. Make sure you have a working copy of Python. If you're running macOS or
|
||||
Linux, you very likely already do. If you're running Windows you may or
|
||||
may not. If you don't have Python, follow the installation instructions
|
||||
[here](https://realpython.com/installing-python/). Note that you do not
|
||||
need the latest version of Python; anything 2.7 or higher will do.
|
||||
|
||||
Trello supports outgoing webhooks, but unfortunately, doesn't have a UI
|
||||
for configuring them. Instead, you have to use the Trello API to create
|
||||
webhooks. We have provided a convenient script for doing this with the
|
||||
Trello API in the Zulip Python bindings. You'll need to run this script
|
||||
once on any machine (it doesn't have to be your Zulip server) to setup
|
||||
the webhook; after you've done that, Trello will send the notifications
|
||||
directly to your Zulip server.
|
||||
1. Download [zulip-trello.py][2]. `Ctr+s` or `Cmd+s` on that page should
|
||||
work in most browsers.
|
||||
|
||||
1. Open `/usr/local/share/zulip/integrations/trello/zulip_trello_config.py`
|
||||
with your favorite editor and change the following lines to specify
|
||||
the Trello **API Key**, **User Token**, and the webhook URL constructed
|
||||
above:
|
||||
1. Run the `zulip-trello` script in a terminal, after replacing the
|
||||
arguments with the values collected above.
|
||||
|
||||
```
|
||||
TRELLO_API_KEY = "<Trello API key generated above>"
|
||||
TRELLO_TOKEN = "<Trello User Token generated above>"
|
||||
ZULIP_WEBHOOK_URL = "<URL constructed above>"
|
||||
python zulip_trello.py --trello-board-name <trello_board_name> \
|
||||
--trello-board-id <trello_board_id> \
|
||||
--trello-api-key <trello_api_key> \
|
||||
--trello-token <trello_token> \
|
||||
--zulip-webhook-url <zulip_webhook_url>
|
||||
```
|
||||
|
||||
1. Go to the `/usr/local/share/zulip/integrations/trello/` directory
|
||||
and run the `zulip_trello.py` script, like so:
|
||||
The `zulip_trello.py` script only needs to be run once, and can be run
|
||||
on any computer with python.
|
||||
|
||||
```
|
||||
python zulip_trello.py <trello_board_name> <trello_board_id>
|
||||
```
|
||||
1. You can delete `zulip_trello.py` from your computer if you'd like.
|
||||
|
||||
Replace `<trello_board_name` and `<trello_board_id>` with the Trello
|
||||
board's name and **Board ID**, respectively.
|
||||
|
||||
The `zulip_trello.py` script needs to be run only once to register
|
||||
the webhook, and can be run from any machine.
|
||||
|
||||
!!! tip ""
|
||||
To learn more, see [Trello's webhooks documentation][2].
|
||||
|
||||
[2]: https://developers.trello.com/page/webhooks
|
||||
[2]: https://raw.githubusercontent.com/zulip/python-zulip-api/master/zulip/integrations/trello/zulip_trello.py
|
||||
|
||||
{!congrats.md!}
|
||||
|
||||
|
|
Loading…
Reference in New Issue