Skip to content

Hourly

Email new leads in your sheet from Outlook

Each new lead added to your sheet gets a personal email from your Outlook, and the row is marked as sent with the date.

Runs
Hourly
Apps
Google Sheets, Outlook
AI
Optional
Access
sheet edit; Mail.Send

Send this to your assistant

Create a ClickRuntime automation: every hour, find rows in my Leads sheet with status 'new'. Send each a short personal email from my Outlook using their name and company, then set the status to 'emailed' and add today's date.

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 consultant collects leads from events, referrals and a website form into one Google Sheet. Following up within a day makes a big difference, but on busy weeks leads sit for days, and it is easy to email someone twice or not at all.

Sending the first email from the sheet, and marking each row as it goes, makes sure every lead hears back quickly and only once.

What you get out of it

  • Every lead hears back quickly

    New rows get an email within the hour, while the conversation is still fresh.

  • From your own mailbox

    The email comes from your Outlook address and replies land in your inbox, like any email you write.

  • The sheet shows who was contacted

    Status and date are filled in, so the whole team can see where each lead stands.

  • No double emails

    Only rows marked new are emailed, and each is marked straight after.

How it works

What happens, step by step

  1. Every hour, ClickRuntime reads your Leads sheet and finds rows with the status new.

  2. For each lead it writes the email from your template, with an optional AI-written opening line based on the notes.

  3. The email is sent from your Outlook address.

  4. The row's status is changed to emailed with today's date, so the lead is never emailed twice.

Before it runs live

  • Connect your Google Sheets account and pick the spreadsheets it may use
  • Connect Outlook

What you get

RunsHourly
Email new leads in your sheet from Outlooktoday, 9:00Succeeded
Outlook · Sent ItemsHi Jordan, great to meet you at the Acme retail meetup on Thursday. Would a 20-minute call next week be useful?

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

  • Run it at a different time, more or less often, or only on weekdays
  • 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 Google Sheets and Outlook 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.
email_new_leads_in_my_sheet_from_outlook.pyexample
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from datetime import date
from clickruntime import on_trigger, http, credentials, ai

api = lambda name, version: build(name, version, credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)

def graph(method, path, **kw):
    r = http.request(method, "https://graph.microsoft.com/v1.0" + path, headers={"Authorization": f"Bearer {credentials.connection('microsoft', 'work')}"}, **kw)
    return r.raise_for_status() or (r.json() if r.content else None)

def send_mail(to, subject, text):
    graph("POST", "/me/sendMail", json={"message": {"subject": subject, "body": {"contentType": "Text", "content": text},
          "toRecipients": [{"emailAddress": {"address": a}} for a in to.split(",")]}})

SHEET_ID = "your-spreadsheet-id"

@on_trigger
def run(event):
    sheet = api("sheets", "v4").spreadsheets().values()
    rows = sheet.get(spreadsheetId=SHEET_ID, range="Leads!A2:F").execute().get("values", [])
    sent = 0
    for n, r in enumerate(rows, start=2):
        if len(r) < 5 or r[4] != "new" or sent >= 20:
            continue
        name, email, company, notes = r[0], r[1], r[2], r[3]
        try:
            opener = ai.generate(f"{name} at {company}. Notes: {notes}", system="Write one friendly opening sentence for a first email.", max_output_tokens=60).text.strip()
        except ai.AIError:
            opener = f"Thanks for your interest in working together."
        send_mail(email, f"Hello from Northwind Consulting, {name.split()[0]}",
                  f"Hi {name.split()[0]},\n\n{opener}\n\nWould a 20-minute call next week be useful?\n\nBest,\nAlex")
        sheet.update(spreadsheetId=SHEET_ID, range=f"Leads!E{n}:F{n}", valueInputOption="RAW", body={"values": [["emailed", date.today().isoformat()]]}).execute()
        sent += 1
    return {"sent": sent}

FAQ

Common questions

Can the emails be personalised?
Yes. The template uses columns such as name, company and how you met. With AI turned on, it can write a sentence tailored to each lead's notes.
How many does it send at once?
Up to 20 an hour by default, to keep your mailbox in good standing. You can change that.
Will it follow up if they don't reply?
This automation sends the first email. A follow-up after a few days can be added as a second step.
What permissions does it need?
sheet edit; Mail.Send. 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 each time it runs (hourly). Checks that find nothing to do 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 “Email new leads in your sheet from Outlook” from your assistant

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