Integrating Botfuel with Actions On Google:

Wassim Chegham aka. @ManekiNekko

Head Of Open Source Program Office at SFEIR

#AoG

A Beginner Guide

Olivier LePlus aka. @olivierleplus

Developer Advocate at Botfuel

Google Developer Expert

Web Technologies

Do open source at tagazok

Botfuel

Developer Advocate

Tweet at @olivierleplus

Blog at @olivierleplus

Olivier LePlus

@olivierleplus

Google Developer Expert

Angular core team

Core Team (ESM Modules)

Node.js Foundation

Do open source at manekinekko

SFEIR

Head Of Open Source Program Office

Google Assistant team

Google Cloud Platform team

Google Developer Expert

Google Developer Expert

Tweet at @manekinekko

Blog at @wassimchegham

Wassim Chegham

@ManekiNekko

Let's chat #IRL

A bit of vocabulary

Google Assistant — a conversation between you and Google to help GTD

Google Home — voice activated speaker powered by the Google Assistant

Agent / Chatbot / Action — an actual app serving a particular purpose

Actions on Google — developer platform to build apps for the Assistant

Apps for the Google Assistant — 3rd party apps integrated to the Assistant

Actions SDK — a software SDk for creating apps

DialogFlow — Google's platform for creating conversational interfaces

Botfuel — a platform for creating conversational interfaces

 

Can you book an Indian style restaurant for 2 people for tomorrow at 7pm near my address?

"Ok Google, talk to Botfuel Weather"

"Sure! Here is..."

Invoke an action

"Hi!  Welcome. How can I help you?"

"What's the forecast in London?"

"The temperature in London…"

Speech to Text, NLP, Knowledge Graph, ML Ranking, User Profile Text to Speech

Speech to Text = ASR

Text to speech = TTS

Intents matching

"Sure! Here is..."

Invoke an action

"Hi!  Welcome. How can I help you?"

"What's the forecast in London?"

Speech to Text = ASR

Speech to Text = ASR

Text to speech = TTS

Intents matching, NLP

"The temperature in London…"

"Ok Google, talk to Botfuel Weather"

Install Botfuel Adapter for The AoG

npm install --save botfuel-module-adapter-assistant
// assistant-config.js
module.exports = {
  adapter: {
    name: 'assistant',
  },
  modules: ['botfuel-module-adapter-assistant']
};

Add a configuration

actions.json

{
  "actions": [
    {
      "description": "Default Welcome Intent",
      "name": "MAIN",
      "fulfillment": {
        "conversationName": "botfuel-weather"
      },
      "intent": {
        "name": "actions.intent.MAIN",
        "trigger": {
          "queryPatterns": ["talk to Botfuel Weather"]
        }
      }
    }
  ],
  "conversations": {
    "botfuel-weather": {
      "name": "botfuel-weather",
      "url": "https://<SERVER>/webhook"
    }
  },
  "locale": "en"
}

Mark a question when needed

new BotTextMessage(..., {question: true})
new BotImageMessage(..., { accessibility_text, title })

Add a11y fields for images

Deploy your AoG project

gactions update --action_package action.json \
                --project botfuel-weather

Deploy Your Bot's Logic

(bonus)

Cloud Functions

Cloud Storage

Cloud Pub/Sub

Direct HTTP calls

Cloud Firestore*

Real-time Database*

Firebase Authentication*

Google Analytics for Firebase*

Testing Locally (debugging)

# Test locally with firebase
$ firebase serve --only functions


# Test locally with GCP
$ functions deploy botfuel --trigger-http


# Open a remote tunnel
$ ngrok http 8010
$ ngrok http -subdomain=wassim 8010

Deploying a Cloud Function to Production

# With gcloud
$ gcloud beta functions 
                deploy 
                botfuel --trigger-http



# With Firebase
$ firebase deploy --only functions

Deploying to App Engine for Production

# app.yaml
runtime: nodejs8

env_variables:
  BOTFUEL_APP_TOKEN: "xxxx"
  BOTFUEL_APP_ID: "xxxx"
  BOTFUEL_APP_KEY: "xxxx"

network:
  forwarded_ports:
    - 8080

Deploy to production

$ gcloud app deploy

THANK YOU

WE ARE HIRING

http://bit.ly/botfuel-dev-1

Google Assistant and Botfuel: A beginner Guide

By Wassim Chegham

Google Assistant and Botfuel: A beginner Guide

How to integrate Botfuel technology with the Actions On Google

  • 1,278
Loading comments...

More from Wassim Chegham