Skip to content

The moment it happens

Get the results when a scrape finishes

Each successful run sends you how many items it collected and a link to the dataset.

Runs
The moment it happens
Apps
Apify
AI
Not needed
Access
API token

Send this to your assistant

Create a ClickRuntime automation: when my Apify actor "google-maps-leads" finishes successfully, email me how many items it collected and a link to the dataset.

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

Someone starts an Apify scraper for a lead list, a price check or a batch of product pages, and then waits. The run might take four minutes or four hours, so they keep refreshing the console tab or forget about it entirely. The people who need the data, a sales rep or a merchandiser, wait on a message that never comes, and the dataset sits unused until somebody remembers to look.

When an Apify run finishes successfully, Apify sends an event to ClickRuntime. ClickRuntime then asks Apify for the run's default dataset details, reads the item count, and emails you a short summary containing the actor name, how many items it collected and a link to open or download the dataset.

It is especially handy when someone other than the person who started the scrape needs to know the results are ready.

What you get out of it

  • Nobody sits watching a progress bar

    Long scrapes finish while you are in meetings or offline. The email tells you the moment they are done, so you spend that time on other work instead of checking the console.

  • An item count exposes empty runs

    A run marked succeeded can still return zero rows if a selector broke. Seeing 0 or 12 where you expected 5,000 is the quickest way to catch a hollow success.

  • Handoffs to colleagues are one click

    Forward the email and the recipient has a direct dataset link. The analyst gets the data without asking you which run it came from or where Apify put it. It also saves a round of questions.

  • Follow-up steps start sooner

    Cleaning, importing to a CRM or sending a lead list to a client can begin right away. A faster start shortens the gap between collecting data and acting on it.

  • Every run leaves an email record

    Months later you can search your inbox for when a particular scrape finished and how large it was, which helps when you compare results across runs or answer a client query.

How it works

What happens, step by step

  1. When an Apify scraper run finishes successfully, Apify tells ClickRuntime straight away.

  2. ClickRuntime checks that it is the scraper you chose, such as google-maps-leads, and ignores the rest.

  3. It looks up how many items the run collected.

  4. You get an email with the item count and a link to the results.

Before it runs live

  • Connect Apify
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Get the results when a scrape finishesjust nowSucceeded
Email · google-maps-leads finishedgoogle-maps-leads finished: 412 items Dataset: https://console.apify.com/storage/datasets/k3Lm9Pq2

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
  • 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 Apify 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_me_results_when_a_run_finishes.pyexample
from clickruntime import on_event, credentials, http, notify

ACTOR_NAME = "google-maps-leads"

@on_event
def handle(event):
    payload = event.json or {}
    if payload.get("eventType") != "ACTOR.RUN.SUCCEEDED":
        return {"sent": False}
    headers = {"Authorization": f"Bearer {credentials.secret('APIFY_TOKEN')}"}
    run_id = payload["eventData"]["actorRunId"]
    run = http.get(f"https://api.apify.com/v2/actor-runs/{run_id}", headers=headers).json()["data"]
    actor = http.get(f"https://api.apify.com/v2/acts/{run['actId']}", headers=headers).json()["data"]
    if actor["name"] != ACTOR_NAME:
        return {"sent": False}
    dataset = http.get(f"https://api.apify.com/v2/datasets/{run['defaultDatasetId']}",
                       headers=headers).json()["data"]
    link = f"https://console.apify.com/storage/datasets/{dataset['id']}"
    notify.email_me(f"{ACTOR_NAME} finished: {dataset['itemCount']} items",
                    f"Run {run_id} collected {dataset['itemCount']} items.\n\nDataset: {link}")
    return {"sent": True, "items": dataset["itemCount"]}

FAQ

Common questions

Does the email include the data itself?
No. It contains the item count and a link to the dataset in Apify, where you can export JSON, CSV or Excel. Keeping the rows out of the email avoids huge attachments and keeps scraped personal data out of your inbox.
Will it fire for every actor in my account?
A webhook can be attached to one actor, to one saved task, or to all runs in the account. You decide at registration. Many people start with a single actor and widen the scope later once they trust the summary format.
What happens if the run fails instead of finishing?
This automation is built for successful runs. A failed or timed-out run does not produce a results email, so pair it with the failure alert if you want to hear about both outcomes from your Apify account.
What permissions does it need?
API token. 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 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 “Get the results when a scrape finishes” from your assistant

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