A template Facebook Messenger bot using Typescript, Koa and DialogFlow.
This template repo helps you get started running your own Facebook Messenger bot.
A messenger bot has the following architecture:
- Users talk to and receive messages from Facebook Messenger
- When a message is sent to your bot, Messenger calls a webhook with the message details
- This repo is the service that runs that webhook, receiving the message
- This repo calls Dialogflow to classify the message and propose content to respond with
- This repo then calls Facebook Messenger's API with a message to respond with
See: Getting started for instructions on setting up your first messenger bot using this template.
You can run make
to see available development commands.
make test
This project uses sequelize-typescript, check that project for examples on querying.
To create the basic database, run:
./bin/sequelize db:create
./bin/sequelize db:migrate
To create a new migration, run:
./bin/sequelize db:migrate:create my-migration-name
Then you edit the file generated in src/migrations
- Basic TS agent
- Unit tests
- Sequelize with migrations
- End-to-end run-through with new Dialogflow agent
- Full docs on getting set up
- Add fulfillment webhook