Dialogflow Inbox
Dialogflow Inbox operates Dialogflow Agents inside a mail server
Schema
Features and Drawbacks
- Automatic language detection
- Session, thread detection
- Reply recognition
- No HTML parsing
- No component rendering (only text is sent)
Setup
Preparation
- Connect your Agents to a Dialogflow Gateway implementation (more here)
- Install SMTP and IMAP server on your machine, i recommend docker-mailserver
- Point DNS MX record to the SMTP and IMAP server
- Create a user, which will recieve E-Mails for your agent
- Assign alias: your-google-cloud-project-id@yourdomain or *@yourdomain (if you have multiple Agents) to the user
Installation
Kubernetes
See k8s for examples
Manual
- Confirm your Mailserver operates correctly
- Clone the repository
- Install Python and cron
- Install the requirements with
pip install -r requirements.txt
- Configure the environment variables (below)
- Send a test E-Mail to your-google-cloud-project-id@yourdomain and run the inbox.py script with
python
- Setup a cronjob to run it automatically over a interval
Configuration
Environment Variable |
Description |
Value |
INBOX_USER |
E-mail user |
- |
INBOX_PASSWORD |
E-mail user's password |
- |
INBOX_HOST |
SMTP and IMAP server hostname |
- |
FALLBACK_LANG |
Fallback language if language detection fails |
en |
ENDPOINT |
Dialogflow Gateway Endpoint. * for wildcard |
https://*.core.ushaflow.io |
CATCHALL |
Catch-all address |
- |