33

Dialogflow and Sendgrid = AI Mailbox

 4 years ago
source link: https://github.com/mishushakov/dialogflow-sendgrid
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Dialogflow Sendgrid

Mail your Dialogflow Agents with Sendgrid

For features and drawbacks, see the original repo

Schema

uquyie7.png!web

Setup

Preparation

  1. Connect your Agents to a Dialogflow Gateway implementation ( more here )

  2. Make a SendGrid account

  3. Visit "Settings" > "Sender Authentication" and "Authenticate Your Domain":

    qEZ3Unz.png!web

  4. Verify your DNS records:

    FR3aIjf.png!web

  5. Go to "API Keys" and generate API Key with full access to "Mail Send":

    f6rIryR.png!web

  6. Install Dialogflow Sendgrid (below) and add "Inbound Parse" entry in "Settings" with following options:

    BZNB3mV.png!web

    • 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

pip install -r requirements.txt
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 GATEWAY Dialogflow Gateway Implementation https://cloud.ushakov.co

Testing

Send a test mail to a agent in the following format: your-google-cloud-project-id@yourdomain


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK