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.
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
Your site or shop sends ClickRuntime a high-intent signal, such as a cart abandon.
It checks that this lead hasn't been emailed recently, so nobody is chased twice.
The lead gets a short personal email through SendGrid about what they were looking at.
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
Build your own
Need it to work differently?
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
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?
Will a lead get several emails if they keep browsing?
Is AI needed for the email?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Screen each CV, email the candidate and post a Slack summary
Every application is scored against the job, the candidate gets a reply through SendGrid, and HR sees a one-line summary in Slack.
See how it worksAuto-reply to support requests and alert the team in Slack
Each support request gets an immediate reply with a suggested fix, and the team sees it in Slack with a category and urgency.
See how it worksSend a weekly report by email and post it in Slack
Every Friday stakeholders get a written weekly report by email, and the same summary is posted to your team's Slack channel.
See how it worksKeep exploring
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.