Olmec Dynamics
H
·8 min read

How to Automate Gmail → OpenAI Classification → ClickUp Tasks + Slack Alerts Using Make.com

Automate Gmail email classification with OpenAI, create ClickUp tasks, and notify Slack using Make.com. Includes prompts, mappings, dedupe, and failures.

Introduction

If your inbox touches your delivery process, you know the manual version: someone reads an email, decides what it is, copies details into ClickUp, assigns it, then posts a Slack update so the team stops asking “what about that email?”. It works until volume rises, context gets lost in copy paste, and tasks land in the wrong queue.

In this guide, you will build an XPA that automatically routes inbound Gmail messages by intent and urgency. Make.com will ingest the email, OpenAI will classify it into structured fields, then Make.com will create the correct ClickUp task and post a Slack alert with a task link.

By the end, you will know how to set up Gmail → OpenAI classification → ClickUp + Slack routing in a way you can actually operate: strict JSON, confidence thresholds, dedupe protection, and failure visibility.

Cross-Platform Automation (XPA) overview: Cross-Platform Automation (XPA).

What You'll Need

  • Make.com scenario builder with access to: Gmail, HTTP/OpenAI (depending on which OpenAI integration you use), ClickUp, Slack, and Google Sheets.
  • Google Gmail account connected in Make.com, ideally a shared mailbox you can safely authorize.
  • OpenAI API access (and Make connection if you use an OpenAI app module).
  • ClickUp permissions to create tasks in the target List and set assignees/custom fields.
  • Slack permissions to post messages to the target channels.
  • Google Sheets access to store dedupe keys and run logs.

Paid plan notes: Make.com and OpenAI costs apply based on run volume. Google Sheets is typically fine on a standard plan.

How It Works (The Logic)

When a new Gmail message matches your ingestion filter (label or query), Make.com pulls the message details, normalizes the email text, and sends a controlled prompt to OpenAI.

OpenAI returns a strict JSON payload containing: ai_category, ai_priority, ai_confidence, task_summary, due_date_iso, and an assignee_key.

Make.com then:

  1. Creates a task in ClickUp with mapped fields.
  2. Posts a Slack message to the right channel, including the ClickUp task link.
  3. Writes a log row to Google Sheets to prevent duplicates on retries.

If classification or JSON parsing fails, the scenario posts to an error channel and logs the failure.

Step-by-Step Setup

1) Create a dedupe and audit sheet

In Google Sheets, create columns like:

  • gmail_message_id (required, unique per email)
  • received_at
  • from
  • subject
  • ai_category
  • ai_priority
  • ai_confidence
  • clickup_task_id
  • clickup_task_url
  • slack_message_ts
  • run_status (success/failed)
  • raw_ai_output (optional, but helpful for debugging)

This sheet is what makes the XPA reliable under retries.

2) Build the Make.com scenario skeleton

Create a new scenario in Make.com and add modules in this general order:

  1. Gmail trigger: watch/search for emails matching your filter.
  2. Gmail get email details (if needed): ensure you have body and metadata.
  3. Text preparation: clean and truncate email content.
  4. OpenAI call: classify into strict JSON.
  5. JSON parse + validation: extract fields into Make variables.
  6. Dedupe check: search Sheets by gmail_message_id and stop if found.
  7. Router logic: confidence threshold and category routing.
  8. ClickUp create task.
  9. Slack send message.
  10. Google Sheets add row.
  11. Error handler branch to Slack + Sheets.

Important: your exact module names can vary slightly depending on the app version, but the sequence above is the reliable pattern.

3) Configure Gmail ingestion so it stays deterministic

Pick one:

  • Label-based: you apply a label like autoclassify-xpa to inbox emails you want processed.
  • Query-based: use a Gmail search query that includes the label and excludes your processed label.

Example query pattern:

  • in:anywhere label:autoclassify-xpa -label:xpa-processed

Advanced tip: if you don’t already have a label workflow, create one. It reduces surprises when people change inbox settings.

4) Clean the email before classification

OpenAI classification degrades when you feed quoted history, signatures, and long threads.

Add a Make text preparation step that:

  • Uses the plain body text (or the most readable body field).
  • Truncates to a hard limit (for example, 6,000 to 12,000 characters).
  • Removes or ignores quoted blocks (lines starting with >, or containing common reply markers like On ... wrote:).

Keep it deterministic. Don’t “summarize” the email with another model first, use cleaning and truncation.

5) Prompt OpenAI for strict JSON, with allowed values

Your prompt should demand:

  • JSON only, no markdown.
  • Exact keys.
  • Allowed category set.
  • Confidence as a number between 0 and 1.
  • Nulls when you cannot infer due dates.

Example output schema to request:

  • ai_category: one of task, meeting, billing, support, sales
  • ai_priority: one of low, medium, high, urgent
  • ai_confidence: number
  • task_summary: max 160 characters
  • due_date_iso: YYYY-MM-DD or null
  • assignee_key: from a provided list
  • action_required: 1-2 sentences

Also provide the email metadata in the prompt, include:

  • sender, subject, received timestamp
  • cleaned body

6) Parse and validate the OpenAI JSON output in Make

After OpenAI returns, add parsing so you end up with Make variables for:

  • ai_category, ai_priority, ai_confidence, task_summary, due_date_iso, assignee_key.

Then validate:

  • If ai_category is not in the allowed set, treat as low confidence.
  • If ai_confidence < 0.65, route to a human review queue.

In Make, this is usually a router/switch using conditions on the parsed fields.

7) Dedupe before you create ClickUp tasks

Run the dedupe check early enough that you do not create duplicates.

Workflow:

  • Google Sheets: search for a row where gmail_message_id equals the current message.
  • If a match exists, stop the scenario.
  • If no match exists, proceed to ClickUp creation.

This matters because retries and trigger replays can happen.

8) Create the ClickUp task with exact field mapping

Create a task using:

  • Task name: task_summary
  • Description: include sender, subject, short snippet, and a reference back to the Gmail message.

Map:

  • ClickUp priority/custom fields from ai_priority
  • Due date from due_date_iso when not null
  • Assignee from assignee_key

Advanced tip: if you use ClickUp custom fields for category, SLA, or source, map them explicitly. Relying on task name makes reporting messy.

9) Route Slack alerts by category

Post to Slack only after you successfully create the ClickUp task so the message includes a valid link.

Use a router condition:

  • support#support-triage
  • billing#billing
  • sales#sales-inbox
  • meeting#meetings
  • task or unknown → #inbox-triage

Message format suggestion:

  • Category and priority
  • Confidence score
  • ClickUp task link
  • One line summary

10) Log success to Google Sheets

Add a Sheets row with:

  • Gmail identifiers: gmail_message_id
  • AI fields: category, priority, confidence
  • ClickUp: task id and URL
  • Slack: message timestamp
  • run_status = success

This row also becomes your traceable audit trail.

11) Implement a failure branch that your team can action

If any of these fail:

  • OpenAI call errors
  • JSON parsing fails
  • ClickUp create fails

Route to:

  • A Slack error channel like #inbox-triage-errors
  • Include: Gmail message id, subject, and a short snippet
  • If available, include the raw AI output or parsing error details

Also write run_status = failed to Google Sheets.

You want failures visible, not hidden.

Real-World Business Scenario

A services team running support, billing, and meeting coordination gets 60 to 120 inbound emails per day. Previously, one person triaged, created ClickUp tasks, and posted updates into Slack, which meant:

  • urgent items sometimes waited for manual catch-up
  • misrouted emails went to the wrong list
  • reporting was inconsistent because task metadata lived in copy paste

With this Gmail → OpenAI classification → ClickUp tasks + Slack alerts XPA in Make.com, emails labeled autoclassify-xpa become structured work items automatically. High-confidence support requests land in the support list, billing items land in billing with due dates when present, and meeting requests notify the meetings channel with task links.

The daily admin shrinks to a quick review of low-confidence items.

Common Variations

  1. Add a human feedback loop

    • When a user corrects a ClickUp task category, write that correction back into Google Sheets.
    • Use it later to refine your prompt instructions and allowed categories.
  2. Use attachment text in classification

    • If Gmail has PDFs or images, extract or OCR text (depending on what you can access in your stack).
    • Append the extracted text to the cleaned body before sending to OpenAI.
  3. Escalate low-confidence emails

    • Route ai_confidence < 0.8 to Slack plus create a ClickUp “Review required” task in a dedicated review list.

What you built, and where to go next

You built an end-to-end XPA in Make.com that watches Gmail, classifies emails with OpenAI into strict JSON fields, creates ClickUp tasks with mapped metadata, and sends Slack alerts with direct task links. You also added dedupe via Google Sheets, plus failure branches that your team can actually act on.

If you want the same pattern implemented for your exact Gmail filters, ClickUp lists, custom fields, and Slack channels, Olmec Dynamics builds these workflows for real teams. Start with Cross-Platform Automation (XPA) and explore what we do at Olmec Dynamics.

Internal notes for this run: no related posts were found in the index to link from this draft.