The moment it happens
Refresh a dataset when your data load finishes
Your report updates right after new data lands, and you get an email saying whether it worked.
- Runs
- The moment it happens
- Apps
- Power BI
- AI
- Not needed
- Access
- write (workspace Member/Contributor)
Send this to your assistant
Create a ClickRuntime automation: give me a link that refreshes my Sales dataset in the Power BI Sales Reporting workspace, and email me when the refresh has finished or failed.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A scheduled Power BI refresh runs at a fixed time whether or not the data is ready. If the nightly warehouse load finishes at 2:40 and the refresh runs at 2:30, the dashboard shows yesterday's numbers all morning. Data engineers end up padding schedules by an hour, and the reports still break whenever a load runs late.
When the data load finishes, it sends a request to ClickRuntime. That triggers a refresh of the dataset through the Power BI REST API, then polls the refresh status until it completes or fails and emails you the result. The refresh begins when the data is actually ready, with no guessed delay.
It also works from a link or button you click yourself, which is handy for analysts who want a refresh on demand without opening the Power BI service.
What you get out of it
Reports refresh when data is ready
Triggering from the end of the load removes the gap between load time and refresh time. Morning dashboards show the new numbers as soon as the pipeline completes, even on days when the load runs long.
Fewer wasted refreshes
A fixed schedule refreshes whether anything changed or not. Event-driven refreshes use your capacity only after new data arrives, which matters when you are close to the daily refresh limit for a dataset.
You hear the outcome, good or bad
The email reports whether the refresh completed or failed, so you do not have to open the refresh history. A failure message lands in the same minute you would have been waiting for the dashboard.
Analysts stop asking engineers
A person who needs fresh numbers for a meeting can use the link instead of messaging someone with workspace admin rights. That shortens a request that used to take an hour to a few seconds.
Pipeline and report stay in sync
Because the refresh is tied to the load completing, a delayed upstream job delays the refresh with it. The dashboard is never newer than its source, which avoids half-loaded numbers appearing in front of executives.
How it works
What happens, step by step
When your ClickRuntime link is called, for example right after new data lands, the automation asks Power BI to refresh your dataset.
It checks back every 20 seconds until the refresh finishes.
You get an email saying whether it completed or failed, with the finish time or the error.
Before it runs live
- Connect Power BI
- Paste your automation's link into the other app's webhook settings
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
- 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 Power BI steps into one automation
Under the hood
The code that runs this automation
import time
from clickruntime import on_event, credentials, http, notify
GROUP_ID = "0f1e2d3c-4b5a-6978-8796-a5b4c3d2e1f0" # Sales Reporting
DATASET_ID = "cfafbeb1-8037-4d0c-896e-a46fb27ff229" # Sales
URL = f"https://api.powerbi.com/v1.0/myorg/groups/{GROUP_ID}/datasets/{DATASET_ID}/refreshes"
@on_event
def handle(event):
headers = {"Authorization": f"Bearer {credentials.connection('power-bi', 'work')}"}
resp = http.post(URL, headers=headers, json={"notifyOption": "NoNotification"})
if resp.status_code != 202:
notify.email_me("Sales refresh could not start", resp.text[:1000])
return {"started": False}
for _ in range(40): # check every 20 s for up to ~13 minutes
time.sleep(20)
last = http.get(URL, params={"$top": 1}, headers=headers).json()["value"][0]
if last["status"] in ("Completed", "Failed"):
notify.email_me(f"Sales refresh {last['status'].lower()}",
f"Finished at {last.get('endTime')}\n{last.get('serviceExceptionJson', '')}")
return {"status": last["status"]}
notify.email_me("Sales refresh still running", "It started but hadn't finished after 13 minutes.")
return {"status": "Unknown"}FAQ
Common questions
How does the refresh get started from my pipeline?
How long does it wait for the refresh to finish?
Is there a limit on how often a dataset can refresh?
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 an email when a dataset refresh fails
You hear about a failed refresh once, before anyone reads yesterday's numbers.
See how it worksPost new orders and sign-ups to Slack
When something happens in your shop, app or form, the details land in the right channel straight away.
See how it worksBook appointments only when you're free
Booking requests are accepted only for free slots within your hours, and land on your calendar with the attendee.
See how it worksKeep exploring
Set up “Refresh a dataset when your data load finishes” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.