mirror of https://github.com/zulip/zulip.git
webhooks/zapier: Add weather update example.
Add documentation for weather update through Zapier. Contains tests and fixtures for weather example. With minor fixes, docs migration to Markdown, and rebasing by Eeshan Garg.
This commit is contained in:
parent
a72b1bd98e
commit
d309cd29f3
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
Binary file not shown.
After Width: | Height: | Size: 45 KiB |
Binary file not shown.
After Width: | Height: | Size: 46 KiB |
Binary file not shown.
After Width: | Height: | Size: 37 KiB |
Binary file not shown.
After Width: | Height: | Size: 53 KiB |
|
@ -1,4 +1,4 @@
|
|||
Get notifications from every event supported by Zapier.
|
||||
### Get notifications from every event supported by Zapier.
|
||||
|
||||
{!create-stream.md!}
|
||||
|
||||
|
@ -33,3 +33,38 @@ Example configuration:
|
|||
{!congrats.md!}
|
||||
|
||||
![](/static/images/integrations/zapier/005.png)
|
||||
|
||||
### Weather Update with Zapier!
|
||||
|
||||
Sign into your Zapier account, then go to the URL
|
||||
`https://zapier.com/app/explore`.
|
||||
|
||||
![](/static/images/integrations/zapier/006.png)
|
||||
|
||||
Choose the trigger app, **Weather by Zapier**.
|
||||
|
||||
![](/static/images/integrations/zapier/007.png)
|
||||
|
||||
Next, select the option **Today's Forecast**.
|
||||
|
||||
![](/static/images/integrations/zapier/008.png)
|
||||
|
||||
Fill in the latitude and longitude of your location.
|
||||
|
||||
Next, fill in your choice of units, Fahrenheit or Celsius.
|
||||
|
||||
![](/static/images/integrations/zapier/009.png)
|
||||
|
||||
Configure **Set up Webhooks by Zapier POST** as follows:
|
||||
|
||||
* `URL` is the webhook 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 a message
|
||||
* `content` is the field corresponding to the content of a message
|
||||
|
||||
![](/static/images/integrations/zapier/010.png)
|
||||
|
||||
**Congratulations! You're done!**
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"content": "Foggy in the morning.\nMaximum temperature to be 24.\nMinimum temperature to be 12",
|
||||
"subject": "Here is your weather update for the day:"
|
||||
}
|
|
@ -11,3 +11,9 @@ class ZapierHookTests(WebhookTestCase):
|
|||
expected_subject = u"New email from zulip@zulip.com"
|
||||
expected_message = u"Your email content is: \nMy Email content."
|
||||
self.send_and_test_stream_message('correct_subject_and_body', expected_subject, expected_message)
|
||||
|
||||
def test_zapier_weather_update(self):
|
||||
# type: () -> None
|
||||
expected_subject = u"Here is your weather update for the day:"
|
||||
expected_message = u"Foggy in the morning.\nMaximum temperature to be 24.\nMinimum temperature to be 12"
|
||||
self.send_and_test_stream_message('weather_update', expected_subject, expected_message)
|
||||
|
|
Loading…
Reference in New Issue