mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	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:
		
							
								
								
									
										
											BIN
										
									
								
								static/images/integrations/zapier/006.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								static/images/integrations/zapier/006.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 17 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								static/images/integrations/zapier/007.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								static/images/integrations/zapier/007.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 45 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								static/images/integrations/zapier/008.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								static/images/integrations/zapier/008.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 46 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								static/images/integrations/zapier/009.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								static/images/integrations/zapier/009.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 37 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								static/images/integrations/zapier/010.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								static/images/integrations/zapier/010.png
									
									
									
									
									
										Normal file
									
								
							
										
											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!}
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
### Weather Update with Zapier!
 | 
			
		||||
 | 
			
		||||
Sign into your Zapier account, then go to the URL
 | 
			
		||||
`https://zapier.com/app/explore`.
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
Choose the trigger app, **Weather by Zapier**.
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
Next, select the option **Today's Forecast**.
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
Fill in the latitude and longitude of your location.
 | 
			
		||||
 | 
			
		||||
Next, fill in your choice of units, Fahrenheit or Celsius.
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
**Congratulations! You're done!**
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								zerver/webhooks/zapier/fixtures/weather_update.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								zerver/webhooks/zapier/fixtures/weather_update.json
									
									
									
									
									
										Normal file
									
								
							@@ -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)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user