🎫 Draft Gmail reply suggestions with Groq Llama 3.3

⚑ 4 views · 🎫 Ticket Management & Triage

Description

Quick overview

This workflow polls Gmail for new emails, sends the message content to Groq’s Llama 3.3 chat completions API to generate a JSON reply draft decision, and creates a Gmail draft reply only when the message appears to need a human response.

How it works

  1. Polls Gmail every minute for newly received emails.
  2. Sends the email text (up to 3,000 characters) to the Groq Chat Completions API (Llama 3.3 70B) to decide whether a reply is needed and to generate a reply draft in JSON.
  3. Parses the model’s JSON response and extracts the decision, draft text, and original subject.
  4. Creates a Gmail draft reply with a subject like β€œRe: ” when the message is marked as needing a reply.

Setup

  1. Connect a Gmail OAuth2 credential and select it in both the Gmail Trigger and Gmail Draft nodes.
  2. Create a Groq API key and replace Bearer YOUR_GROQ_API_KEY in the Authorization header of the HTTP Request node.
  3. Customize the system prompt (for example, replace [YOUR COMPANY / SHOP NAME] and adjust tone and rules) to match your support style.

Requirements

Customization

πŸ”— Nodes Used

HTTP Request, Gmail, Gmail Trigger

πŸ“₯ Import

Download workflow.json and import into n8n: Workflow menu β†’ Import from File

πŸ“– Importing guide Β· πŸ”‘ Credential setup