Skip to content
NEWMarketplace and your team: sell what you build, and get plans and changes that are tested before you see them. See what is new

Library / Email Automation

Email Automation

Triage and route Gmail leads with Groq, Notion CRM, and Twilio calls

When a new email arrives, it handles email with Groq and OpenAI / ChatGPT using Groq, Gmail, Notion.

What it does

## Gmail AI Triage & Routing to Notion CRM ### How it works 1. Triggered every hour, fetches 10 new Gmail messages. 2. Uses an AI model to analyze and determine the importance of each message. 3. Queries Notion databases for relevant member, manager, and company data based on importance. 4. Routes tasks to appropriate managers based on skills and updates the AI output. 5. Saves processed information back to Notion and forwards the message via email. 6. Sends a confirmation call through an HTTP request to an external service. ### Setup steps - [ ] Duplicate the Notion databases below into your own workspace first. - [ ] Set up Gmail credentials and configure Gmail Trigger node to fetch 10 messages hourly. - [ ] Configure the Langchain LLM credentials for the AI models in both Chain LLM nodes. - [ ] Set up Notion credentials and permissions for accessing Member/Manager and Companies databases. - [ ] Configure the HTTP request node with appropriate authentication and endpoint for the confirmation call (e.g., Twilio API). - [ ] Ensure Gmail node for forwarding messages is authorized to send emails on your behalf. ### Notion databases (duplicate these first) - Members DB: https://app.notion.com/p/3c3048440fc880c79d6af7bd61eb4979?v=ed05dc0d71bb4ae89b602f2dfe8bf11c&source=copy_link - Companies DB: https://app.notion.com/p/3c3048440fc880718f2def1fec03940e?v=2599243512a244a1be26f0927079f393&source=copy_link Open each link, click "Duplicate" in the top right to copy it into your own workspace, then point the Notion nodes in this workflow to your duplicated databases. ### Customization Customize AI model prompts and logic in the Chain LLM nodes to adjust how message importance and routing are determined. Modify Notion database queries to match your data schema and workflow needs.

The steps

  1. When Gmail Receives Hourly Messages
  2. Determine Task Importance
  3. Groq Chat Model for Importance
  4. Set Importance Field
  5. If Task Is Important
  6. Fetch Member Manager Data
  7. Fetch Company Data
  8. Merge Member and Company Data
  9. Map Emails and Manager Info
  10. Route by Manager Skills
  11. Groq Chat Model for Routing
  12. Set Manager and Company Fields
  13. If Status Is Assigned
  14. Append Data To Notion

16 steps in total.

Similar automations