Skip to content
NEWMarketplace and the trig8n Agent: 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

Draft Gmail Replies for Labeled Emails with OpenAI

Every minute, it finds Gmail messages with an AI label, has an OpenAI assistant write a reply and adds it as a draft to the thread.

What it does

## Reply draft with OpenAI Assistant This workflow automatically transfers content of incoming email messages with specific labels into OpenAI Assitant and returns reply draft. After draft is composed, trigger label is deleted from the thread. Please remember to configure your OpenAI Assistant first.

The steps

  1. Convert raw to base64
  2. Add email draft to thread
  3. Remove AI label from email
  4. Schedule trigger (1 min)
  5. Map fields for further processing
  6. Convert response to HTML
  7. Build email raw
  8. Get threads with specific labels
  9. Ask OpenAI Assistant
  10. Loop over threads
  11. Get thread messages
  12. Return last message in thread
  13. Get single message content

Similar automations