Skip to content

The moment it happens

Email hot leads and alert sales in Slack

When a lead shows strong buying signals or abandons a cart, they get a personal email and sales gets a Slack ping.

Runs
The moment it happens
Apps
SendGrid, Slack
AI
Optional
Access
SendGrid Mail Send; Slack chat:write

Send this to your assistant

Create a ClickRuntime automation: when a lead visits pricing twice or abandons a cart, send them a personalised SendGrid email and ping #sales with who they are and what they looked at.

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

An online software company sees visitors return to the pricing page, start a trial checkout and then leave. Sales only finds out days later from a report, long after the lead has cooled or picked another product.

Now each high-intent signal triggers a personal email to the lead, mentioning what they were looking at, and a Slack ping to sales with enough context to follow up the same day.

What you get out of it

  • Reach buyers while they're deciding

    A helpful email within minutes of a cart abandon catches people before they move on.

  • Sales knows who to call

    The Slack ping names the lead, company and what they looked at, so the follow-up is specific.

  • Personal, not generic

    The email can mention the plan or product they viewed instead of a one-size reminder.

  • Only real signals count

    Your own rules decide what counts as high intent, so casual visitors aren't chased.

How it works

What happens, step by step

  1. Your site or shop sends ClickRuntime a high-intent signal, such as a cart abandon.

  2. It checks that this lead hasn't been emailed recently, so nobody is chased twice.

  3. The lead gets a short personal email through SendGrid about what they were looking at.

  4. Sales gets a ping in #sales with the lead's name, company and the signal.

Before it runs live

  • Connect SendGrid
  • Connect Slack, then invite the app to the channel (type /invite @ClickRuntime there)
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Email hot leads and alert sales in Slackjust nowSucceeded
Slack · #sales🔥 Jordan at Northwind Retail abandoned checkout on the Team plan. Email sent.

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 Google Sheets
  • Combine it with other SendGrid and Slack 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.
high_intent_lead_personalised_email_and_slack_alert.pyexample
from clickruntime import on_event, credentials, http, ai, state, notify

@on_event
def handle(event):
    lead = event.json or {}
    if state.get(f"emailed:{lead.get('email')}"):
        return {"skipped": "recently emailed"}
    try:
        body = ai.generate(f"Write a 3-sentence helpful email to {lead.get('name')} who looked at {lead.get('interest')} "
                           f"and {lead.get('signal')}. No pressure, offer to answer questions.", max_output_tokens=200).text
    except (ai.AINotIncluded, ai.AILimitReached):
        body = f"Hi {lead.get('name')}, saw you were looking at {lead.get('interest')}. Happy to answer any questions."
    http.post("https://api.sendgrid.com/v3/mail/send",
              headers={"Authorization": f"Bearer {credentials.secret('SENDGRID_API_KEY')}"},
              json={"from": {"email": "sales@acme.example"}, "subject": f"Questions about {lead.get('interest')}?",
                    "personalizations": [{"to": [{"email": lead["email"]}]}], "content": [{"type": "text/plain", "value": body}]})
    notify.slack(f":fire: {lead.get('name')} ({lead.get('company')}) {lead.get('signal')} on {lead.get('interest')}. Email sent.",
                 channel="#sales")
    state.set(f"emailed:{lead['email']}", True)
    return {"emailed": True}

FAQ

Common questions

What counts as a high-intent lead?
Whatever your site or shop sends: a cart abandon, a second pricing page visit, a demo page view. You decide in the prompt which events trigger it.
Will a lead get several emails if they keep browsing?
No. Each lead gets at most one email in the period you set, such as a week, however many signals arrive.
Is AI needed for the email?
No. Without AI, a fixed template is filled with their name and what they looked at. With AI, the wording is tailored a little more.
What permissions does it need?
SendGrid Mail Send; Slack chat:write. Nothing else in your accounts is used.
Does it need AI?
No, but you can ask for an AI step (for example a summary). It then uses ClickRuntime's built-in AI allowance.
How many runs does it use?
One run for each event the app sends.
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 “Email hot leads and alert sales in Slack” from your assistant

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