GithubHelp home page GithubHelp logo

isabella232 / google-assistant-greeting-cards Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jam3/google-assistant-greeting-cards

0.0 0.0 0.0 16.91 MB

License: MIT License

JavaScript 99.84% HTML 0.16%

google-assistant-greeting-cards's Introduction

Greeting Cards for Google Assistant

Greeting Cards Actions is a Voice Experiment that lets you create customized shareable greeting cards from Google Assistant.

Greeting Cards

Try it on a Google Assistant or Google Home by saying “Hey Google, talk to Greeting Cards”.

This is an experiment, not an official Google product. We will do our best to support and maintain this experiment but your mileage may vary.

Technology

Greeting Cards is built on Actions on Google, the platform that allows you to make things for the Google Assistant and the Google Home. It uses Dialogflow to handle understanding what the user says, Firebase Cloud Functions for backend code, Firebase Cloud Firestore to save data, Cloud Storage for Firebase to store the templates and generated cards, and Firebase Hosting to host the shareable page. The project is written in JavaScript, using Actions on Google’s Node.js client library.

This repo contains a pre-built Dialogflow Agent you can import into your own project. It contains all the Intents and Entities for Greeting Cards. This is all in the dialogflow_agent folder.

Everything in the functions folder is used in Firebase Cloud Functions, which hosts the webhook code for Dialogflow as well as the share page entrypoint. The webhook handles all the response logic for Greeting Cards.

The public folder contains all the assets that will be hosted by Firebase Hosting once the project is deployed.

The storage folder contains all the template files (and font) that are used to render the final cards. The contents of the folder needs to be uploaded to Cloud Storage for Firebase for your project.

Importing the Dialogflow Agent

Go to the Actions on Google developer console, and create a new project.

Click “BUILD” on the Dialogflow card, and follow the flow to create a new Dialogflow agent.

When your agent is created, click on the gear icon to get to the “Export and Import” tab. You can then compress the dialogflow_agent folder from this repo into a zip file, and then import it. You should then see all of Greeting Card’s Intents and Entities in your project.

Here’s some more info about how Dialogflow works in general.

Setting up

Install the Firebase CLI

npm i -g firebase-tools

On the root project folder, install dependencies

npm i

Login to Firebase

firebase login

Check list of Firebase projects

firebase list

Set Firebase project as default

firebase use [FIREBASE_PROJECT_ID]

Customize the "variables" from the npm script deploy inside root package.json

  • [GCLOUD_PROJECT] with your FIREBASE_PROJECT_ID
  • [SECURITY_HEADER] with any string you wish to secure your webhook connection.

Deploy to Firebase

npm run deploy

Get your webhook URL and put it in Dialogflow

Once you’ve successfully deployed the project to Firebase, your terminal should give you a url called Function URL (fulfillmentEntryPoint):. In Dialogflow, click the “Fulfillment” tab and toggle the “Enable” switch for the webhook. Paste that url into the text field, and add to headers the key x-security-content and the value you used to replace [SECURITY_HEADER].

You can read more documentation about using Firebase Cloud Functions for Dialogflow fulfillment here.

Contributors

Mike Nowak,Santiago D'Antuoni, Guillermo Figueroa and Craig Hill.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

google-assistant-greeting-cards's People

Contributors

n0wak avatar peteraltamirano avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.