https://github.com/mishushakov/dialogflow-inbox
📨 AI Mailbox, powered by Dialogflow
https://github.com/mishushakov/dialogflow-inbox
cronjob dialogflow dialogflow-v2 email mailserver
Last synced: about 1 year ago
JSON representation
📨 AI Mailbox, powered by Dialogflow
- Host: GitHub
- URL: https://github.com/mishushakov/dialogflow-inbox
- Owner: mishushakov
- License: agpl-3.0
- Created: 2019-06-19T19:25:25.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-04-18T12:24:32.000Z (about 6 years ago)
- Last Synced: 2025-04-10T18:45:50.228Z (about 1 year ago)
- Topics: cronjob, dialogflow, dialogflow-v2, email, mailserver
- Language: Python
- Homepage:
- Size: 48.8 KB
- Stars: 11
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# 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
1. Connect your Agents to a Dialogflow Gateway implementation ([more here](https://github.com/mishushakov/dialogflow-gateway-docs))
2. Install SMTP and IMAP server on your machine, i recommend [docker-mailserver](https://github.com/tomav/docker-mailserver)
3. Point DNS MX record to the SMTP and IMAP server
4. Create a user, which will recieve E-Mails for your agent
5. Assign alias: your-google-cloud-project-id@yourdomain or *@yourdomain (if you have multiple Agents) to the user
### Installation
#### Kubernetes
See [k8s](k8s) for examples
#### Manual
1. Confirm your Mailserver operates correctly
2. Clone the repository
3. Install Python and cron
4. Install the requirements with `pip install -r requirements.txt`
5. Configure the environment variables (below)
6. Send a test E-Mail to your-google-cloud-project-id@yourdomain and run the [inbox.py](inbox.py) script with `python`
7. 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 | - |