Skip to main content

Triage and reply to Gmail with Groq Llama 3.3, Slack and Google Sheets

Workflow preview

Workflow preview
100%
Triage and reply to Gmail with Groq Llama 3.3, Slack and Google Sheets preview
Open on n8n.io

1. Workflow Overview

Quick overview This workflow monitors unread Gmail messages, uses Groq’s Chat Completions API (LLama 3.3) to classify and draft replies, routes key emails to Slack or Gmail labels, logs triage deta...

Best for

  • Ticket Management automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.gmailtrigger, n8n-nodes-base.code, n8n-nodes-base.httprequest, n8n-nodes-base.switch, n8n-nodes-base.slack, n8n-nodes-base.gmail, n8n-nodes-base.if, n8n-nodes-base.googlesheets

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Salman Sikandar.

Original n8n.io source

1.1 Workflow description

Title
Triage and reply to Gmail with Groq Llama 3.3, Slack and Google Sheets
Workflow name
Triage and reply to Gmail with Groq Llama 3.3, Slack and Google Sheets

Quick overview

This workflow monitors unread Gmail messages, uses Groq’s Chat Completions API (LLama 3.3) to classify and draft replies, routes key emails to Slack or Gmail labels, logs triage details to Google Sheets, and sends a separate Gmail alert when an email is marked Critical.

How it works

  1. Triggers every minute when a new unread Gmail message arrives that does not already have the AI-Processed label.
  2. Extracts and normalizes key email fields (sender, subject, snippet, message ID, and thread ID) for consistent processing.
  3. Sends the email content to Groq’s Chat Completions API to return a JSON triage result (urgency, category, intent, summary, action, route, and an optional reply draft).
  4. Routes the message based on the AI-selected destination by posting a summary to Slack (#incidents or #sales) or applying predefined Gmail labels.
  5. If the AI provides a draft and the route indicates replying directly, sends a reply via Gmail.
  6. Appends the triage outcome (classification fields, summary, action, routing, and IDs) to a Google Sheets “Triage Log” worksheet.
  7. If the logged urgency is Critical, sends a separate critical alert email via Gmail to a configured address.

Setup

  1. Connect your Gmail OAuth2 account and confirm/create the Gmail label used by the trigger query (AI-Processed) and the label IDs used for Gmail label application.
  2. Add an HTTP Header Auth credential containing your Groq API key (Authorization header) and confirm the model endpoint settings.
  3. Connect your Slack OAuth credential and ensure the target channels (#incidents and #sales) exist or update the workflow to use your channel names.
  4. Connect your Google Sheets OAuth credential and update the spreadsheet ID and sheet tab used for the “Triage Log”, ensuring the expected columns exist.
  5. Update the recipient address for the critical alert email and verify the “reply to” target mapping matches how your Gmail trigger exposes the sender address.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Gmail – New Email

Type / Role
n8n-nodes-base.gmailTrigger - gmailTrigger
Config choices
Version 1

Block 2 - Normalise Email

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 3 - Claude – Classify & Draft

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.1

Block 4 - Parse AI Response

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 5 - Route by Destination

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3

Block 6 - Slack – Post to #incidents

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2

Block 7 - Slack – Post to #sales

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2

Block 8 - Gmail – Apply Labels

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2

Block 9 - Should Draft Reply?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2

Block 10 - Gmail – Send Draft Reply

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2

Block 11 - Sheets – Log Triage

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4

Block 12 - Is Critical?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2

Block 13 - Gmail – Critical Alert Email

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2

Block 14 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Triage and reply to Gmail with Groq Llama 3.3, Slack and Google Sheets
Complexity advanced
Nodes 17
Categories Ticket Management, AI Summarization
Author Salman Sikandar
Published 22 May 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/15916/15916.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Triage and reply to Gmail with Groq Llama 3.3, Slack and Google Sheets do?

Quick overview This workflow monitors unread Gmail messages, uses Groq’s Chat Completions API (LLama 3.3) to classify and draft replies, routes key emails to Slack or Gmail labels, logs triage deta...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Ticket Management, AI Summarization use case.