Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
PythonでSlack通知botを作る
Search
Ryosuke Uchiyama
April 04, 2024
Technology
24
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
PythonでSlack通知botを作る
Ryosuke Uchiyama
April 04, 2024
More Decks by Ryosuke Uchiyama
See All by Ryosuke Uchiyama
AWSでサーバレスな書籍管理アプリを作る
step63r
0
75
ChatGPT実践
step63r
1
410
IoT実践! 行先予定表を電子ペーパーで作る
step63r
0
54
React x Socket.ioで人狼サーバを作る 第一章 フロントエンド実装
step63r
0
36
深層強化学習で東方AI 第一章 DQNの基本
step63r
0
430
Build 2021 プレイバック
step63r
0
45
WPFで実践アプリ開発! 第四章 機能の実装 Part 2
step63r
0
63
WPFで実践アプリ開発! 第三章 機能の実装 Part 1
step63r
0
140
WPFで実践アプリ開発! 第二章 UI
step63r
0
190
Other Decks in Technology
See All in Technology
その Valkey 使いこなしていますか?
onk
PRO
5
1.9k
CSS2026:OWS研究会・招待講演「世界観を、実装する」
atsush1_sada
2
230
DBについての基礎説明(MySQL編) - コロプラ 2026年度 新卒研修
colopl
0
160
アカウント統制の健康診断
kenichinakamura
1
140
CTO Night|NotionのAIエージェントとFDE
kzkhykw1991
0
300
Let's Change Our World—Again
snoozer05
PRO
5
360
野良MCPサーバーを排除せよ!MCPサーバーのガバナンス
yukiogawa
1
160
国際カードブランドルール変更に伴うクレジットカード決済取引仕様変更について
k1style
0
160
DevelopersIO 2026 Tokyo 現時点の衛星通信サービスの現状を整理してみる
maroon1st
0
200
日本語に強いオープンな大規模言語モデル「LLM-jp」
odashi
5
1.2k
Browser Spec: Testing Hotwire with Ruby
takahashim
1
160
AIにシークレットを見せない、WSL2で安全な開発環境
yazm
0
340
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
How STYLIGHT went responsive
nonsquared
100
6.3k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
500
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
Documentation Writing (for coders)
carmenintech
77
5.6k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
3.5k
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
270
Are puppies a ranking factor?
jonoalderson
2
4.1k
Mind Mapping
helmedeiros
1
400
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
Transcript
PythonでSlack通知botを作る Ryosuke Uchiyama 1 © 2023 minato project. step63r step63r
2 AGENDA © 2023 minato project. 1. 概要 • 作るもの
• 前提知識 • 開発環境 • Webhookとは 2. 実践 • Slackでアプリを作成する • Pythonでプログラムを書く • Azureにデプロイする
1. 概要 3 © 2023 minato project. Overview
4 作るもの © 2023 minato project. • 毎朝9時にその日の東京の天気をSlackにお知らせするbotを作ります • 気象情報の取得にはOpen-Meteoを利用します
• プログラムのデプロイ先はAzureとします Open-MeteoのAPI仕様は こちら をご確認ください。 タイマーイベント 天気を通知 Azure Functions Slack データ取得
前提知識 © 2023 minato project. 5 • HTTP通信の基礎知識 • Python
(3.7以降) の基本構文 • Slackの操作方法 • Azureの基礎知識
開発環境 © 2023 minato project. 6 • Windows 11 Pro
23H2 • Visual Studio Code • Azure Tools v1.2.0 • Azurite v3.29.0 • Python v2024.2.1 • Python 3.11.2 • Azure Functions Core Tools 4.0.5441
Webhookとは © 2023 minato project. 7 • アプリケーションの更新情報を他のアプリケーションへリアルタイム提供する仕組みや概念のこと。 • イベント(リポジトリにプッシュなど)発生時、指定したURLにPOSTリクエストする仕組みのこと。
git push等 Webhook通知 Webhookとは? #初心者 - Qiita GitHub Slack
2. 実践 8 © 2023 minato project. Practice
9 Slackでアプリを作成する © 2023 minato project. 1. あらかじめSlackのアカウントとワークスペースを作成しておく 2. Slack
APIにアクセスする 3. 「Create an App」を押下する 4. 「From scratch」→ 名前とワークスペースを入力・選択し「Create App」を押下する 5. 「Incoming Webhooks」→「Activate Incoming Webhooks」を「On」にする 6. 「Add New Webhook to Workspace」を選択、投稿先のチャンネルを選択し「許可する」を押下する 7. 「Sample curl request to post a channel」のコードをコピーし、PowerShellに貼り付け、実行 8. 設定したチャンネルに投稿がされていれば設定完了
10 Pythonでプログラムを書く © 2023 minato project. step63r/uchi-notify-weather-slack-bot https://github.com/step63r/uchi-notify-weather-slack-bot
Azureにデプロイする © 2023 minato project. 11
ご清聴ありがとうございました