Skip to content

Instantly share code, notes, and snippets.

@josephsamela
Created December 8, 2020 23:49
Show Gist options
  • Save josephsamela/ea1cfd91245bfe0b6e16432b6ead9751 to your computer and use it in GitHub Desktop.
Save josephsamela/ea1cfd91245bfe0b6e16432b6ead9751 to your computer and use it in GitHub Desktop.
import requests
import json
url = "https://outlook.office.com/webhook/<webhookuuid>/IncomingWebhook/<webhookuuid>"
payload = json.dumps(
{"text":"Hello world!"}
)
headers = {'Content-Type': 'application/json'}
response = requests.request(
"POST",
url,
headers=headers,
data=payload
)
print(response.text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment