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
230
感動を貰う側から与える側へ -アイドルマスターミリオンライブから学ぶCfPに挑むと言うこと-
maguroalternative
1
520
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
Streamlitで実現する自然言語データアプリ開発
ayumu_yamaguchi
1
300
Verilogで学ぶCPU自作入門.pdf
uyuki234
2
640
市販E-Readerを乗っ取れ 〜Embedded Swiftで電子ペーパーガジェットを制御する〜
trickart
0
200
Intent as Code
shoppingjaws
6
1.1k
一人だけ、Kiroが静止する日
hideg
0
120
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
280
Omarchy Tokyo やると聞いて UMPC 買ってセットアップしてきた
mtsmfm
0
150
すこし踏み込む CancellationToken
htkym
2
720
モジュールの視点からSwiftを読み解く #iosdc
s_shimotori
0
190
App Storeの外へ──日本のiOSサイドローディング入門 for iOSDC Japan 2026
yuukiw00w
0
230
GraphRAGのKnowledge Graphを 直接!見る/View-GraphRAG's-KnowledgeGraph-directly!
tyumugi1113
1
370
AWS DevOps Agentで インシデント対応をAIに任せたい
honmarkhunt
7
3.1k
Featured
See All Featured
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
680
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
990
Are puppies a ranking factor?
jonoalderson
2
3.9k
Making Projects Easy
brettharned
120
6.8k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
340
SEO for Brand Visibility & Recognition
aleyda
0
4.7k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
940
Side Projects
sachag
456
43k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
520
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.3k
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を貼り付ける!
完成!! • テキストを送ると返信!!