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
Chatting with Japanese using Firebase Extensions
Search
Firebase Thailand
November 09, 2019
Technology
0
270
Chatting with Japanese using Firebase Extensions
Get to know how to build Translator Chatbot in LINE using Firebase Extensions
Firebase Thailand
November 09, 2019
Tweet
Share
More Decks by Firebase Thailand
See All by Firebase Thailand
Say Hello to Cloud Functions for Firebase 2nd Gen
firebasethailand
1
230
What's New in Firebase 2023
firebasethailand
3
520
Building a more Efficient Firestore Web App
firebasethailand
1
150
Developing with Firebase - Best Practices
firebasethailand
0
150
Analyze your production issue on Firebase Crashlytics more efficient with BigQuery
firebasethailand
0
240
What I learn from Firebase when build Saifah
firebasethailand
0
120
Security Rules Unit Testing Pipeline Integration for Firestore
firebasethailand
0
100
Building Simple Collaborative Online IDE with AngularFire and Firepad
firebasethailand
0
96
Full-Stack Development with FlutterFire
firebasethailand
0
130
Other Decks in Technology
See All in Technology
Delivering Millions of Messages within seconds @ Duolingo
pelelgrino
0
350
エンジニアのキャリアをちょっと楽しくする3本の軸/Three Pillars to Make an Engineer's Career More Enjoyable
kwappa
0
2.6k
Google Cloud Next '24でブログを10本書いた方法と勉強会を沸かせた方法
yasumuusan
0
290
テストプロセスで大事にしていること #jasstnano
makky_tyuyan
0
160
推しは推せるときに推せ! プロダクトにフィードバックしていこう
nakasho
0
280
コンパウンドスタートアップのためのスケーラブルでセキュアなInfrastructure as Codeパイプラインを考える / Scalable and Secure Infrastructure as Code Pipeline for a Compound Startup
yuyatakeyama
4
4.7k
Compose Compiler Metricsを使った実践的なコードレビュー
tomorrowkey
1
220
開発生産性向上サービスを作るFindyが自分たちで開発生産性を爆上げした組織づくりの歩み / Findy's path to boosting its own development productivity 2024-04-17
ma3tk
3
610
コンテナセキュリティの基本と脅威への対策
kyohmizu
3
750
長期運用プロジェクトでのMySQLからTiDB移行の検証
colopl
2
820
Hands-on Gemini, the Google DeepMind LLM
meteatamel
1
110
プロトタイピングによる不確実性の低減 / Reducing Uncertainty through Prototyping
ohbarye
5
380
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
21
1.6k
Facilitating Awesome Meetings
lara
42
5.6k
Designing on Purpose - Digital PM Summit 2013
jponch
110
6.5k
Stop Working from a Prison Cell
hatefulcrawdad
266
19k
The Straight Up "How To Draw Better" Workshop
denniskardys
227
130k
Fantastic passwords and where to find them - at NoRuKo
philnash
37
2.5k
Fontdeck: Realign not Redesign
paulrobertlloyd
76
4.9k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
25
2.3k
Building a Scalable Design System with Sketch
lauravandoore
456
32k
Reflections from 52 weeks, 52 projects
jeffersonlam
345
19k
The Invisible Side of Design
smashingmag
294
49k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
352
28k
Transcript
GDG Thailand Firebase Thailand Organized by Chatting with Japanese using
Firebase Extensions Firebase Extensionsを使用して日本人とチャットする Warit Wanwithu LINE Thailand
#FirebaseDevDay DEVELOPERS นักพัฒนา デベロッパーズ
#FirebaseDevDay “How’s it Going” “Hello!”
None
#FirebaseDevDay Sending Email Resize Images Deleted User Data
https://github.com/firebase/functions-samples
#FirebaseDevDay ファイアーベース エクステンションズ
None
#FirebaseDevDay Install Functions Firestore Send email
None
#FirebaseDevDay DEMO デモ
#FirebaseDevDay CHATTING チャッティング
#FirebaseDevDay Functions Extensions Firestore 1.Webhook 2.Save 3.Translated 5.Push 4.Trigger
#FirebaseDevDay ❤ 0. Install Translation extension 1. Create LINE Chatbot
2. Handle LINE Webhook using Cloud Functions and save to Firestore 3. Listen to Firestore trigger and push message back to LINE group
1. Create LINE Chatbot https://developers.line.biz/
#FirebaseDevDay { "destination": "xxxxxxxxxx", "events": [{ "replyToken": "0f3779fba3b349968c5d07db31eab56f", "type": "message",
"timestamp": 1462629479859, "source": { "type": "user", "userId": "U4af4980629..." }, "message": { "id": "325708", "type": "text", "text": "Hello" } }]} 2. Handle LINE Webhook
#FirebaseDevDay exports.LineWebhook = functions.region(region).runWith(runtimeOpts) .https.onRequest(async (req, res) => { let
event = req.body.events[0]; if (event.message.type === 'text') { let input = event.message.text; await admin.firestore().collection('translations').doc('inputText') .set({ input: input }); } return res.status(200).send(req.method);; });
#FirebaseDevDay Functions Extensions Firestore Webhook Save Translated Push Trigger 3.
Listen to Firestore trigger
#FirebaseDevDay exports.LineBotPush = functions.region(region).runWith(runtimeOpts) .firestore.document('translations/inputText').onWrite(async (change, context) => { let
latest = change.after.data(); let input = latest.input; let containsJapanese = input.match(/[\u3000-\u303f\u3040-...]/); if (containsJapanese) { push(GROUP_ID, latest.translated.th); } else { push(GROUP_ID, latest.translated.ja); } });
None
#FirebaseDevDay MISSION ミッション
#FirebaseDevDay INSTALL CLOUD FUNCTIONS OPEN SOURCE CONFIG BETA
Thank You! #FirebaseDevDay Helpful resources fb.com/LINEDevTH fb.com/groups/LINEDevTH medium.com/LINEDevTH Warit Wanwithu
ありがとうございます