Skip to content

On a schedule

Get yesterday's new leads by source

One morning email listing yesterday's leads, grouped by where they came from.

Runs
On a schedule
Apps
Zoho CRM
AI
Not needed
Access
read

Send this to your assistant

Create a ClickRuntime automation: every day at 8am, email me the leads created in Zoho CRM yesterday, grouped by lead source, with name and company.

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 sales director wants to know each morning what the marketing machine produced yesterday, but Zoho CRM's lead list is only useful if you filter by date and sort by source. In practice that means logging in, building a view and counting. The director skips it, and the team only learns a webinar produced 30 leads or a campaign produced none when someone mentions it a week later.

Each morning, a COQL query pulls leads created yesterday. They are grouped by Lead_Source and an email goes out with a count for each source and the names behind them. You see, in one message, how many came from the website, the webinar and referrals, with the actual leads listed for follow-up.

Suits sales leaders and marketing managers who like numbers before the first meeting.

What you get out of it

  • Campaign results appear the next day

    Seeing 30 webinar leads the morning after means follow-up begins while interest is high. Waiting for a weekly report loses days, and a lead that is a week old is already a colder lead.

  • Sources are compared side by side

    Grouping by lead source shows which channel is producing and which has gone quiet. A sudden zero from a normally active source suggests something broke, and you can look into it that day.

  • Reps know who to call

    The digest includes names, so a rep can start dialing without opening Zoho CRM. The first calls happen earlier in the day, which matters when the lead came in expecting a quick answer.

  • Broken forms are noticed

    If the website form stops working, the digest shows zero website leads. Catching that within a day saves a week of lost submissions and the ad spend behind them. Fewer surprises.

  • Leadership stays in the loop

    Executives who never open the CRM still see lead flow each morning. Marketing gets credit for results, and gaps are discussed with facts instead of impressions. Meetings go better. Everyone stays informed.

  • Marketing and sales stay in sync

    A shared morning email gives both teams the same view of yesterday. Marketing sees what its campaigns produced, and sales sees what has arrived to work on. Everyone starts the day informed.

How it works

What happens, step by step

  1. Every morning at 8 ClickRuntime finds all the Zoho CRM leads created yesterday.

  2. It groups them by lead source, such as web download or trade show.

  3. You get one email with each source, how many leads came from it and their names and companies.

Before it runs live

  • Connect Zoho CRM

What you get

RunsOn a schedule
Get yesterday's new leads by sourcetoday, 9:00Succeeded
Email · 9 new Zoho CRM leadsWeb Download (5) Dana Lee (Acme) Trade Show (4) Sam Rivera (Northwind)

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
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other Zoho CRM 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.
daily_new_leads_digest.pyexample
from collections import defaultdict
from datetime import date, timedelta
from clickruntime import on_trigger, credentials, http, notify

@on_trigger
def run(event):
    y = date.today() - timedelta(days=1)
    query = ("select Full_Name, Company, Lead_Source from Leads "
             f"where Created_Time between '{y}T00:00:00+00:00' and '{y}T23:59:59+00:00' limit 2000")
    r = http.post("https://www.zohoapis.com/crm/v8/coql", json={"select_query": query},
                  headers={"Authorization": f"Zoho-oauthtoken {credentials.connection('zoho', 'work')}"})
    leads = r.json()["data"] if r.status_code == 200 else []
    groups = defaultdict(list)
    for l in leads:
        groups[l.get("Lead_Source") or "No source"].append(f"  {l['Full_Name']} ({l.get('Company') or '-'})")
    body = "\n\n".join(f"{src} ({len(rows)})\n" + "\n".join(rows) for src, rows in sorted(groups.items()))
    notify.email_me(f"{len(leads)} new Zoho CRM leads on {y}", body or "No new leads.")
    return {"leads": len(leads)}

FAQ

Common questions

Does yesterday follow my time zone?
The query uses the date range based on your Zoho CRM account's time zone setting. If your team spans multiple zones, check that the CRM time zone matches the day you want. The query uses the time zone set in your Zoho CRM account.
What if there were no new leads?
The email still arrives and shows zero, which is itself informative. A zero day after a campaign launch or form change is a signal worth checking. A day with no leads still produces an email.
Can I see leads by owner instead of source?
Yes. The grouping field can be changed to Lead Owner, Industry or another field, if you prefer to review who received what. The default groups by Lead_Source. Grouping can be changed to owner or industry.
What permissions does it need?
read. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run each time it runs (on a schedule). 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 “Get yesterday's new leads by source” from your assistant

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