Messenger Bot

I have been playing around with things like ManyChat and wanted to learn how to set up my own webhook for a messenger bot I wanted to make, but I am having some issues getting started with the webhook.

Is it possible to host the bot’s webhook on Github? I sort of jumped into all of this head first and am learning as I go with everything. From what I understand, any files that the bot would need to process messages and requests would be drawn from on github, correct? If so, then how do I exactly set up the files to be used by the bot and get that linked to the bot when uploading to my repo?

I was trying to follow a tutorial by Hartley Brody which used Heroku, but I was having issues with commands like mkvirtualenv, so that makes me think I am neglecting a program that should be installed on my computer.

I tried following the basic webhook development creation on facebook, but I would get 

npm ERR! path filepath\messenger-webhook\node_modules.staging
npm ERR! code EEXIST
npm ERR! errno -4075
npm ERR! syscall mkdir
npm ERR! EEXIST: file already exists, mkdir ‘filepath\messenger-webhook\node_modules.staging’
npm ERR! File exists: filepath\messenger-webhook\node_modules.staging
npm ERR! Move it away, and try again.

Am I neglecting something with the npm package.json?

Is there something overall that may help me get a better start in creating all of this?

Thank you for your help!

Receiving a webhook requires a publicly accessible server on the Internet somewhere. Whether that is on a service like Heroku or AWS, or run out of your home because you have arranged for a publicly accessible IP address and know how to handle NAT translation. GitHub doesn’t provide persistent public hosting like that, so you would need to find some other service to stand up a server.

I haven’t seen the tutorial you mention, so I can’t hazard a guess as no what might be going wrong. If you want to start with Heroku and Node.js, you may want to use Heroku’s own quick start guide. Once you have a server up and running, then you can customize it to receive webhooks and do something useful with them.

I hope that helps!

Hi lee-dohm,

Thank you for the information.

I will try Heroku’s own quick start guide and let you know how it goes. Thank you!