I. Introduction.
This is a Facebook Messenger Bot. It lets people who have Gmail and FB accounts to both receive and reply to their emails in the FB Messenger app, just like they would do it with FB messages.
II. Setup Instructions.
-
Current files should be located in /var/www/mailbotapp directory
-
You also need to add /etc/apache2/sites-available/mailbotapp.conf file with following contents: <VirtualHost *:6680> ServerName localhost ServerAlias *.ngrok.io ServerAdmin [email protected] WSGIScriptAlias / /var/www/mailbotapp/mailbotapp.wsgi <Directory /var/www/mailbotapp/mailbotapp/> Require all granted Alias /static /var/www/mailbotapp/mailbotapp/static <Directory /var/www/mailbotapp/mailbotapp/static/> Require all granted ErrorLog
${APACHE_LOG_DIR}/error.log LogLevel warn CustomLog $ {APACHE_LOG_DIR}/access.log combined
III. File strutcture and overall architecture.
Most important files:
- The "database" folder contains MySQL functions, and "database.py" - a python API for interactions with the DB.
- "gbot.py" - for interactions with the Gmail end using Gmail API.
- "init.py" - uses Flask to handle the communications with the client side (FB Messenger and the web-form).
- "mbot.py" - serves as a middleware between "database.py" and "init.py".
IV. Credits.
The code was written and developed by me (Olzhas Kadyrakunov), Alisher Tortay and Yekaterina Abileva. Roughly speaking, Kate was responsible for the Gmail end of the system, I was responsible for the "middle part" (interactions with the database), and Alisher was responsible for the FB Messenger end.