diff --git a/templates/zerver/integrations/asana.html b/templates/zerver/integrations/asana.html deleted file mode 100644 index 07ec8cba9e..0000000000 --- a/templates/zerver/integrations/asana.html +++ /dev/null @@ -1,76 +0,0 @@ -

Get Zulip notifications for your Asana projects via Zapier!

- -

- First, create the stream you'd like to use for Asana notifications, and - subscribe all interested parties to this stream. We recommend the - name asana. -

- -

{{ external_api_uri_subdomain }}/v1/external/zapier?api_key=abcdefgh&stream=asana

- -

Start by setting up a Zapier account.

- -

- Next, create a ZAP, picking Asana as the app you'd like - to receive notifications from as Trigger (Step 1): -

- - -

- Next, select the Asana event that you'd like to receive notifications - for (Choose Trigger), such as when you add a new Task in - an Asana project: -

- - -

- Next, click on Connect a New Account and follow the steps - to connect your Asana account to the Zap: -

- - -

- Select the Asana project you'd like to receive notifications for: -

- - -

- In Action (Step 2), select Webhooks by Zapier - as the app: -

- - -

and POST as the action:

- - -

- Configure Set up Webhooks by Zapier POST as follows: - -

-

- -

- Finally, configure Data. - You have to add 2 fields: -

- You can format the content of the content and subject - fields in a number of ways as per your requirements. -

- -

Here's an example configuration:

- - -

You're done! Example message:

- - -

- You can repeat the above process and create Zaps for different projects - and/or different kinds of Asana events that you'd like to receive - notifications about. -

diff --git a/templates/zerver/integrations/asana.md b/templates/zerver/integrations/asana.md new file mode 100644 index 0000000000..495ac243a0 --- /dev/null +++ b/templates/zerver/integrations/asana.md @@ -0,0 +1,64 @@ +Get Zulip notifications for your Asana projects via Zapier! + +{!create-stream.md!} + +Next, on your {{ settings_html|safe }}, create a bot for Asana. +Construct the URL for the Asana bot using the bot API key and +stream name, like so: + +`{{ external_api_uri_subdomain }}/v1/external/zapier?api_key=abcdefgh&stream=asana` + +Start by setting up a [Zapier](https://zapier.com/) account. + +Next, create a ZAP, picking Asana as the app you'd like +to receive notifications from as the **Trigger (Step 1)**: + +![](/static/images/integrations/asana/001.png) + +Next, select the Asana event that you'd like to receive notifications +for (**Choose Trigger**), such as when you add a new **Task** in +an Asana project: + +![](/static/images/integrations/asana/002.png) + +Next, click on **Connect a New Account** and follow the steps +to connect your Asana account to the Zap: + +![](/static/images/integrations/asana/003.png) + +Select the Asana project you'd like to receive notifications for: + +![](/static/images/integrations/asana/004.png) + +In **Action (Step 2)**, select **Webhooks by Zapier** as the app: + +![](/static/images/integrations/asana/005.png) + +and `POST` as the action: + +![](/static/images/integrations/asana/006.png) + +Configure **Set up Webhooks by Zapier POST** as follows: + +* `URL` is the URL we created above +* `Payload Type` set to `JSON` + +Finally, configure **Data**. You have to add 2 fields: + +* `subject` is the field corresponding to the subject of the message +* `content` is the field corresponding to the content of the message + +You can format the content of the `content` and `subject` fields +in a number of ways as per your requirements. + +Here's an example configuration: + +![](/static/images/integrations/asana/007.png) + +{!congrats.md!} + +![](/static/images/integrations/asana/008.png) + +You can repeat the above process and create Zaps for different projects +and/or different kinds of Asana events that you'd like to be notified +about in Zulip. diff --git a/zerver/lib/integrations.py b/zerver/lib/integrations.py index eff8a5c4e5..3520453d96 100644 --- a/zerver/lib/integrations.py +++ b/zerver/lib/integrations.py @@ -249,7 +249,7 @@ WEBHOOK_INTEGRATIONS = [ ] # type: List[WebhookIntegration] INTEGRATIONS = { - 'asana': Integration('asana', 'asana', doc='zerver/integrations/asana.html'), + 'asana': Integration('asana', 'asana', doc='zerver/integrations/asana.md'), 'capistrano': Integration('capistrano', 'capistrano', display_name='Capistrano', doc='zerver/integrations/capistrano.md'), 'codebase': Integration('codebase', 'codebase', doc='zerver/integrations/codebase.md'), 'email': EmailIntegration('email', 'email', doc='zerver/integrations/email.html'),