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

Draft Gmail Replies with OpenAI Assistant for Labeled Threads

Runs on a schedule, sends the content of Gmail messages with a specific label to an OpenAI Assistant for a reply draft, then removes the trigger label.

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)

Similar automations