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 with an OpenAI Assistant

On a schedule, the workflow picks up Gmail messages labeled for AI, has an OpenAI Assistant write a reply and saves it as a draft in 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. Remove AI label from email
  2. Add email draft to thread
  3. Convert raw to base64
  4. Build email raw
  5. Convert response to HTML
  6. Map fields for further processing
  7. Ask OpenAI Assistant
  8. Get single message content
  9. Return last message in thread
  10. Get thread messages
  11. Loop over threads
  12. Get threads with specific labels
  13. Schedule trigger (1 min)
  14. Error Handler

24 steps in total.

Similar automations