dialogflow-sendgrid
                                
                                 dialogflow-sendgrid copied to clipboard
                                
                                    dialogflow-sendgrid copied to clipboard
                            
                            
                            
                        📮 Dialogflow + Sendgrid = AI Mailbox
Dialogflow Sendgrid
Mail your Dialogflow Agents with Sendgrid
For features and drawbacks, see the original repo
Schema

Setup
Preparation
- 
Connect your Agents to a Dialogflow Gateway implementation (more here) 
- 
Visit "Settings" > "Sender Authentication" and "Authenticate Your Domain":  
- 
Verify your DNS records:  
- 
Go to "API Keys" and generate API Key with full access to "Mail Send":  
- 
Install Dialogflow Sendgrid (below) and add "Inbound Parse" entry in "Settings" with following options:  - Receiving Domain: your domain
- Destination URL: endpoint to Dialogflow Sendgrid
- Check incoming emails for spam: up to you
- POST the raw, full MIME message: yes (check)
 
Installation
Kubernetes
See k8s for examples
Manual
- Python should be installed on the target
- Install the requirements with pip install -r requirements.txt
- Run python inbox.py
Configuration
| Environment Variable | Description | Value | 
|---|---|---|
| INBOX_USER | Sendgrid user | apikey | 
| INBOX_PASSWORD | Sendgrid API Key | - | 
| INBOX_HOST | SMTP and IMAP server hostname | smtp.sendgrid.net | 
| FALLBACK_LANG | Fallback language if language detection fails | en | 
| CATCHALL | Catch-all address | - | 
| ENDPOINT | Dialogflow Gateway Endpoint. *for wildcard | https://*.core.ushaflow.io | 
| DEBUG | Debug mode | true | 
| PORT | Listen on port | 5000 | 
Testing
Send a test mail to a agent in the following format: your-google-cloud-project-id@yourdomain