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
LINEBotCourse.pdf
Search
マグロ隊長kinTV
May 15, 2023
Programming
280
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
LINEBotCourse.pdf
マグロ隊長kinTV
May 15, 2023
More Decks by マグロ隊長kinTV
See All by マグロ隊長kinTV
C#未経験の僕がAIに読めるコードを書かせるまで
maguroalternative
0
110
感動を貰う側から与える側へ -アイドルマスターミリオンライブから学ぶCfPに挑むと言うこと-
maguroalternative
1
510
useEffectってなんで非推奨みたいなこと言われてるの?
maguroalternative
11
7.9k
React19.2のuseEffectEventを追う
maguroalternative
2
1.2k
UDDのススメ - 拡張版 -
maguroalternative
2
1.8k
遊戯王GX 丸藤兄弟から学ぶ成長
maguroalternative
1
210
UDDのすすめ
maguroalternative
0
1.5k
LINE Works Bot入門
maguroalternative
0
150
めぐろLT#21 今年一番の仕事の成果
maguroalternative
0
150
Other Decks in Programming
See All in Programming
LoopHub - ローカルで動く GitHub で、AI と共同開発
jugyo
1
560
『寄り添うラジオ』をAIで作る 体験価値から逆算した、会話しないUXと品質設計
theoriatec2024
3
180
市販E-Readerを乗っ取れ 〜Embedded Swiftで電子ペーパーガジェットを制御する〜
trickart
0
190
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
190
The Good Stuff, Not the Slop: Engineering High-Quality Android Apps with Modern AI Tooling
danybony
1
260
Intent as Code
shoppingjaws
6
1k
MVNOの申込からeSIM開通までをiOSアプリでつなぐ- 本人確認・MNP・通信事業者基盤をまたぐ実装
satotakeshi
0
440
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
470
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
210
AWS Step Functions 大規模並列の壁を越える / jaws-sonic-2026-niigata-step-functions
kasacchiful
PRO
1
490
Webの地図
yosuke_furukawa
PRO
6
4.6k
SREの越境 / SRE Collaboration
y0hgi
2
250
Featured
See All Featured
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
460
WENDY [Excerpt]
tessaabrams
14
39k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
550
What does AI have to do with Human Rights?
axbom
PRO
1
2.4k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
580
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
280
Building Adaptive Systems
keathley
44
3.2k
Music & Morning Musume
bryan
48
7.4k
Documentation Writing (for coders)
carmenintech
77
5.5k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
BBQ
matthewcrist
89
10k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
360
Transcript
LINEBot X GAS
本講座の目的 • Webアプリ、通信の基礎を理解し、LINEBotを作成すること。 • 自学習を行い、機能追加を行えるようになること。
自己紹介 • 名前:佐々木陽貴 • 学年:学部4年 • やってること:Pythonでのサーバーサイド、Next.jsでのフロ ント • 実績?:カプコンオープンカンファレンスRE2022
セガプログラマーインターン マーベラスインターン 技育博2022,2023
LINEBotとは?
LINEBotとは? • LINEアカウントの挙動をプログラムで制御したも の。 • 運送情報の確認、クーポン券の配布など企業にも使 われている。
GASとは?
GASとは? • Google Apps Scriptの略 • 簡易的なスクリプトを組むことができる • gsと呼ばれる独自の言語ではあるが、ほぼJavaScriptと同じ •
これを使ってLINEBotを作成していく
設計、仕組み
設計、仕組み Bot APIサーバー メッセージ メッセージイベント 送られてきたイベントを基に処理をプロ グラムで書く!!
サンプル作成
LINE Developer にアクセス • ログインして開発者情報を登録しましょう
プロバイダー作成 • 好きな名前で結構です。入力したら作成をクリックしてください。
チャネル作成 • 新規チャネル作成をクリックし、Messaging APIを選択。
チャネル作成 • 入力項目(必須項目のみ) • 会社・事業者の所在国・地域 日本 • チャネル名 Botのアカウント名(お好きなように) •
チャネル説明 プロフィール欄です。必須なので何か埋めてください。 • 大業種 個人 • 小業種 個人(学生) • 規約に同意して作成
Messaging API設定 • こんな画面がでる。Messaging API設定に遷移。 • QRコードから友達追加が可能。
Messageing API • 以下のように設定しておく
Messaging API設定 • チャネルアクセストークン LINEBotを動かす際に必要。発行ボタンで発行。 GAS側で使うので控えておく。 ※絶対に外部に流失させないでください。
Messaging API設定 • GASのURL Botの情報を送信するところ。 (まだサーバー側を作成していないので)後に指定する。
GASでの作成 • Googleドライブに移動し、選択。 • ない場合はアプリを追加から追加する。
GASでの作成 • エディタが起動。 • サンプルコードをコピペしよう。(QRから) コード内のLINE_BOT_TOKENに先ほどのアクセストークンを 入れること! https://github.com/maguro- alternative/line_callback_bot_for_gas
GASでの作成 • デプロイをクリック→新しいデプロイ。 • 以下の図のように設定。
GASでの設定 • 警告が出る。 • 左下の安全ではないページに移動。 • 認証画面に遷移するので、認証。 ※自分が作ったものなので怪しくな いです。
GASでの作成 • ウェブアプリURLが出るのでコピーする。 • LINE developerに戻り、WebHook設定にURLを貼り付ける!
完成!! • テキストを送ると返信!!