Skip to content

The moment it happens

Hear when a Replicate job finishes or fails

As soon as a long prediction completes, you get its status and output link in Slack, with no repeat alerts.

Runs
The moment it happens
Apps
Replicate
AI
Not needed
Access
API key (to create predictions) + webhook signing secret

Send this to your assistant

Create a ClickRuntime automation: run my upscaling model on Replicate and give it a webhook link. When the prediction finishes, post the status and output link to #ml-jobs in Slack, and tell me if it failed.

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

Some Replicate jobs take a long time: fine-tuning a model, rendering a video, upscaling a batch of images or running a large language model over a long document. Waiting means keeping a browser tab open or polling the API in a loop, and a job that failed after ten minutes can go unnoticed for hours while you assume it is still running.

When a prediction reaches a final state, Replicate sends a webhook. ClickRuntime checks its Standard Webhooks signature to confirm it really came from Replicate, reads the status and output, and sends you a message in Slack or by email with the result and a link to the output file. It happens the moment the job ends.

Creators, researchers and developers who start long jobs and move on to other work will find it the most helpful, because waiting is the expensive part.

What you get out of it

  • You stop watching a progress bar

    A job that takes twenty minutes does not need your attention for twenty minutes. You start it, switch to other work, and the message tells you when to come back.

  • Failures are discovered immediately

    A failed run reported the minute it ends can be restarted with a fixed input straight away. Finding out the next morning wastes an entire working day and, for time-sensitive work, a deadline.

  • Outputs are one click away

    The message contains the link to the finished file. You do not need to open Replicate, find the prediction in the list and copy the URL, which is slower than it sounds with many runs.

  • Signatures block fake notifications

    Replicate signs its webhooks, and the signature is verified before anything is sent. That prevents someone who learns your webhook URL from triggering false completion messages. Only genuine Replicate events produce a message.

  • Teams share long-running work

    Posting results in a channel lets a colleague pick up where you left off. A designer waiting for an upscaled image hears about it without asking the person who started the job.

How it works

What happens, step by step

  1. When a Replicate job finishes, Replicate tells ClickRuntime straight away.

  2. ClickRuntime first checks that the message really came from Replicate and rejects anything that doesn't.

  3. If the job succeeded, it posts the job ID and a link to the output in #ml-jobs in Slack.

  4. If the job failed or was cancelled, it posts the error to #ml-jobs and also emails you.

Before it runs live

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

What you get

RunsThe moment it happens
Hear when a Replicate job finishes or failsjust nowSucceeded
Slack · #ml-jobsUpscale p8x2kq succeeded https://replicate.delivery/xezq/upscaled.png

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 Replicate 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.
notify_me_when_a_prediction_finishes_or_fails.pyexample
from clickruntime import on_event, notify, log

@on_event
def handle(event):
    if not event.is_verified:
        log.warning("rejected delivery with a bad webhook signature")
        return {"posted": False}
    p = event.json or {}
    output = p.get("output")
    link = output[0] if isinstance(output, list) and output else output
    if p.get("status") == "succeeded":
        notify.slack(f"Upscale {p['id']} succeeded\n{link}", channel="#ml-jobs")
    else:
        notify.slack(f"Upscale {p['id']} {p.get('status')}: {p.get('error')}", channel="#ml-jobs")
        notify.email_me(f"Replicate prediction {p.get('status')}", f"{p['id']}: {p.get('error')}")
    return {"status": p.get("status")}

FAQ

Common questions

What is a Standard Webhooks signature?
It is a signature that Replicate adds to each webhook request, built with a shared secret, so the receiver can confirm the message is genuine and unmodified. ClickRuntime verifies it before sending any notification, and the secret is stored safely.
Which prediction statuses send a message?
Succeeded, failed and canceled are final statuses, and Replicate can send webhooks for them. You choose which events to subscribe to when creating the prediction, so you can limit messages to completions and failures only.
How do I get Replicate to call the webhook?
When you create a prediction through the API, you include a webhook URL and the events you want. ClickRuntime provides that URL. Predictions started from a script or app then notify you, and those started in the Replicate web interface will not.
What permissions does it need?
API key (to create predictions) + webhook signing secret. 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 “Hear when a Replicate job finishes or fails” from your assistant

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