Skip to content

Every 15 minutes

Sort outreach replies in Gmail into interested and not

Replies to your SendGrid outreach are read as they land in Gmail, labelled interested or not, and the hot ones are flagged in Slack.

Runs
Every 15 minutes
Apps
Gmail, SendGrid
AI
Yes, uses the built-in AI allowance
Access
SendGrid Mail Send; Gmail modify

Send this to your assistant

Create a ClickRuntime automation: every 10 minutes, check Gmail for replies to my outreach campaign. Label each as Interested, Not interested or Out of office, and post the interested ones in #sales.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

A recruiter sends a few hundred outreach emails a week through SendGrid. Replies pile up in Gmail mixed with out-of-office notes and polite refusals, and the few people who said yes wait a day or two for an answer.

Every reply is now read as it arrives and labelled in Gmail. Interested replies are posted in Slack straight away, so a person can answer within the hour, and the rest are already sorted.

What you get out of it

  • Interested replies answered first

    The people who said yes get a quick response, which is when they're most likely to book a call.

  • An inbox that sorts itself

    Out-of-office notes and refusals are labelled and out of the way.

  • The team sees wins in Slack

    Interested replies posted to #sales let anyone pick them up.

  • Nothing deleted

    Every reply stays in Gmail with a label, so you can always check how something was sorted.

How it works

What happens, step by step

  1. Every 10 minutes, ClickRuntime checks Gmail for new replies to your campaign.

  2. AI reads each reply and decides whether it is interested, not interested or an out-of-office note.

  3. The reply gets a matching label in Gmail, which also stops it being read twice.

  4. Interested replies are posted in your #sales Slack channel with the sender and a short quote.

Before it runs live

  • Connect Google through your own Google app (a one-time, 10-minute setup), so it works with your own Gmail
  • Connect SendGrid

What you get

RunsEvery 15 minutes
Sort outreach replies in Gmail into interested and nottoday, 9:00Succeeded
Slack · #sales🎉 Alex at Northwind Health is interested: "Yes, happy to chat. Does Thursday work?"

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Act only on the items that match your own rules, and skip the rest
  • Change what the AI looks for, or how it writes the result
  • Add another app, for example also send it to Slack
  • Combine it with other Gmail and SendGrid steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
lead_campaign_send_via_sendgrid_triage_replies_in_gmail.pyexample
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, ai, notify, report_fetched

LABELS = {"interested": "Label_Interested", "not_interested": "Label_NotInterested", "out_of_office": "Label_OOO"}

@on_trigger
def run(event):
    gmail = build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
    query = 'subject:"Re: Quick question about hiring" -label:Interested -label:NotInterested -label:OOO newer_than:7d'
    msgs = gmail.users().messages().list(userId="me", q=query).execute().get("messages", [])
    report_fetched(len(msgs))
    if not msgs:
        return {"summary": "No new replies"}
    for m in msgs:
        full = gmail.users().messages().get(userId="me", id=m["id"], format="metadata", metadataHeaders=["From"]).execute()
        sender = full["payload"]["headers"][0]["value"]
        label = ai.generate(f"Classify this reply as interested, not_interested or out_of_office: {full['snippet']}",
                            max_output_tokens=10).text.strip().lower()
        label = label if label in LABELS else "not_interested"
        gmail.users().messages().modify(userId="me", id=m["id"], body={"addLabelIds": [LABELS[label]]}).execute()
        if label == "interested":
            notify.slack(f":tada: {sender} is interested: \"{full['snippet'][:140]}\"", channel="#sales")
    return {"sorted": len(msgs)}

FAQ

Common questions

How does it know which emails are campaign replies?
It looks at replies to the subject line or reply-to address you used for the campaign, so other mail in your inbox is left alone.
What if it labels something wrongly?
Change the label in Gmail. Nothing is sent to the lead automatically, so a wrong label only affects sorting.
Does it answer the replies?
No. It labels and alerts; the reply comes from you.
What permissions does it need?
SendGrid Mail Send; Gmail modify. Nothing else in your accounts is used.
Does it need AI?
Yes. It uses ClickRuntime's built-in AI, so you don't need an OpenAI or Anthropic key. Every plan includes a monthly AI allowance.
How many runs does it use?
One run each time it checks. Checks that find nothing new and stop right away aren't counted.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Sort outreach replies in Gmail into interested and not” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.