Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
PythonでSlack通知botを作る
Search
Ryosuke Uchiyama
April 04, 2024
Technology
21
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
54
ChatGPT実践
step63r
1
370
IoT実践! 行先予定表を電子ペーパーで作る
step63r
0
27
React x Socket.ioで人狼サーバを作る 第一章 フロントエンド実装
step63r
0
22
深層強化学習で東方AI 第一章 DQNの基本
step63r
0
300
Build 2021 プレイバック
step63r
0
38
WPFで実践アプリ開発! 第四章 機能の実装 Part 2
step63r
0
53
WPFで実践アプリ開発! 第三章 機能の実装 Part 1
step63r
0
130
WPFで実践アプリ開発! 第二章 UI
step63r
0
170
Other Decks in Technology
See All in Technology
When Platform Engineering Meets GenAI
sucitw
0
200
週末にループ・エンジニアリングの理解を深めるためのスライド
nagatsu
0
560
10年間のブログ発信を振り返って見えたWebアプリケーションエンジニアとしての軌跡
stefafafan
0
190
AI 不只幫你寫 Code: 當專案從 300 暴增到 1500, 我們如何撐住 DevOps
appleboy
0
280
Deep Data Security 機能解説
oracle4engineer
PRO
2
230
技術・能力を向上する原理原則 #きのこセッションa #きのこ2026
bash0c7
0
140
自作お家AIエージェントスタックチャンFWで困っている所紹介
74th
0
110
【FinOps】データドリブンな意思決定を目指して
z63d
2
480
製造現場での生成AIの活用、およびエージェントAIの実装のあり方、AVEVAの取り組み
iotcomjpadmin
0
180
時期が悪い!それでもRaspberry Piを買って遊んで活用するには / 20260627-osc26do-rpi-jikigawarui
akkiesoft
1
890
螺旋型キャリアの生存戦略 / kinoko-conf2026
rakus_dev
1
1.2k
FPGAの開発コンペでZephyrを使ってみた
iotengineer22
0
210
Featured
See All Featured
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
210
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2.1k
SEO for Brand Visibility & Recognition
aleyda
0
4.6k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.2k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
620
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6k
Mind Mapping
helmedeiros
PRO
1
260
Skip the Path - Find Your Career Trail
mkilby
1
150
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
1
360
Build your cross-platform service in a week with App Engine
jlugia
234
18k
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
ご清聴ありがとうございました