Daily
Get yesterday's new Dynamics 365 leads by email
Each morning you see every lead created the day before, with its owner and source, in one email.
- Runs
- Daily
- Apps
- Dynamics 365
- AI
- Not needed
- Access
- read (security role with lead read)
Send this to your assistant
Create a ClickRuntime automation: every weekday at 8am, email me the leads created in Dynamics 365 yesterday with name, company, owner and lead source.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A sales manager using Dynamics 365 wants to know who came in yesterday: new leads from the website, a trade show list or a partner referral. But the leads view needs filtering by created date, and most people never set that up, so they scroll through a long list or look at a dashboard that is cached and unclear. Leads that arrive overnight sit untouched until someone happens to look, and lead response time is one of the strongest predictors of whether a lead converts.
Each morning the automation queries Dynamics 365 for leads whose created date falls on the previous day, formats them into a readable list with name, company and source, and emails it. Your team starts the day with a ready list of people to contact.
Sales managers, inside sales reps and marketing teams that hand leads over will benefit most.
What you get out of it
Faster first contact with every lead
Leads contacted within a day convert far better than ones left a week. A morning list means each new lead is assigned and called while the person's interest is still fresh.
Nothing lost over the weekend
Monday's email covers the leads that arrived while the team was away, so no one waits until Tuesday for a reply. Weekends are where a lot of quiet lead loss happens, because nobody is looking and the enquirer is already talking to a competitor.
Managers see volume and sources
The list shows how many leads came in and from where. A sudden drop in yesterday's numbers is an early sign that a web form, an ad campaign or an integration has broken, and you can fix it before a week of leads is lost.
Fair assignment of leads
With the whole list in view, a manager can hand out leads evenly or by territory. Nobody cherry-picks from a live view, and nothing is left unassigned over a busy Monday, which keeps the team feeling the split is fair.
No need to build a saved view
The filter on created date is built in, so nobody has to maintain a view in Dynamics. It works the same way for everyone and does not break when someone edits a view.
How it works
What happens, step by step
Every morning, ClickRuntime looks up the leads created in Dynamics 365 the day before.
For each lead it notes the name, company, owner and source.
You get one email with a line per lead, like "Priya Shah (Northwind Traders) | owner Sales Team | source Web".
Before it runs live
- Connect Dynamics 365
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
- 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 Dynamics 365 steps into one automation
Under the hood
The code that runs this automation
from datetime import date, timedelta
from clickruntime import on_trigger, credentials, http, notify
ORG = "https://acme.crm.dynamics.com"
FMT = "@OData.Community.Display.V1.FormattedValue"
@on_trigger
def run(event):
yesterday, today = date.today() - timedelta(days=1), date.today()
resp = http.get(f"{ORG}/api/data/v9.2/leads", params={
"$select": "fullname,companyname,leadsourcecode,_ownerid_value",
"$filter": f"createdon ge {yesterday}T00:00:00Z and createdon lt {today}T00:00:00Z",
"$orderby": "createdon asc"},
headers={"Authorization": f"Bearer {credentials.connection('dynamics-365', 'work')}",
"Accept": "application/json", "Prefer": 'odata.include-annotations="*"'})
resp.raise_for_status()
leads = resp.json()["value"]
lines = [f"{l['fullname']} ({l.get('companyname') or '-'}) | owner {l.get('_ownerid_value' + FMT, '-')} "
f"| source {l.get('leadsourcecode' + FMT, '-')}" for l in leads]
notify.email_me(f"{len(leads)} new leads yesterday", "\n".join(lines) or "No new leads.")
return {"leads": len(leads)}FAQ
Common questions
Which leads are included?
Does it need special permissions in Dynamics 365?
Can I get it only on weekdays?
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
Get alerts about Dynamics 365 deals nobody has touched
Each week you see the open opportunities that haven't changed in 30 days, grouped by owner, before they go cold.
See how it worksKnow the moment your website goes down
Your team hears in Slack when the site stops responding or slows down, and again when it's back.
See how it worksPost a morning briefing to Slack
Your team starts the day with the weather, a reminder or anything else you'd like in #general.
See how it worksKeep exploring
Set up “Get yesterday's new Dynamics 365 leads by email” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.