Daily
Get warned before your Facebook token expires
You get an email a week before your token stops working, so your Page automations don't fail quietly.
- Runs
- Daily
- Apps
- Facebook Pages
- AI
- Not needed
- Access
- app token
Send this to your assistant
Create a ClickRuntime automation: check my Facebook token every day and email me if it expires in the next 7 days.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A Facebook Page connection runs on an access token, and when that token expires every automation that depends on it stops working at once. Auto-posts do not go out, comment moderation goes quiet, and reports stop arriving. Nothing warns you, so the first sign is a customer saying you have not posted for a week, and a person with Page admin access has to reconnect. Renewing in advance avoids all of it.
Each day, ClickRuntime asks Facebook to inspect the token, reads its expiry date, and sends you an email only if fewer than seven days remain. On the other days it stays silent, so the message is a clear signal that action is due.
This is worth having for any Page that runs scheduled posts or monitoring, especially where the admin is not the person who built the setup.
What you get out of it
Avoid a silent outage
A token that lapses over a weekend can mean several missed posts and unreviewed comments. A warning a week ahead gives you time to renew on a quiet weekday. Consistent posting matters to followers who expect it.
Protect scheduled campaigns
Launches and promotions depend on posts going out on time. Renewing before expiry means the campaign never pauses because the credential behind it quietly ran out. A launch that stalls halfway is hard to recover.
Find the right person early
Reconnecting needs someone with admin rights on the Page. A week's notice gives you time to reach that person, who may be traveling or on leave, before it becomes urgent.
Cut debugging time
When automations fail, token expiry is a common cause that takes time to find. Knowing the date in advance rules it out and keeps real problems easier to diagnose. One less mystery in a long list of possible causes.
Stay quiet until needed
The reminder only appears inside the final seven days, so it does not add to your daily email. When it arrives, it means something real. Warning fatigue never sets in.
How it works
What happens, step by step
Every day ClickRuntime checks the Facebook connection your Page automations use.
If it has already stopped working, you get an email asking you to reconnect Facebook in the ClickRuntime dashboard.
If it will expire within 7 days, you get an email saying how many days are left, so you can renew it before anything fails. Otherwise it stays quiet.
Before it runs live
- Connect Facebook Pages
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 Facebook Pages steps into one automation
Under the hood
The code that runs this automation
from datetime import datetime, timezone
from clickruntime import on_trigger, credentials, http, notify
@on_trigger
def run(event):
app = f"{credentials.secret('FB_APP_ID')}|{credentials.secret('FB_APP_SECRET')}"
data = http.get("https://graph.facebook.com/v21.0/debug_token",
params={"input_token": credentials.connection("facebook", "work"), "access_token": app}).json()["data"]
expires = data.get("expires_at") or 0
if not data["is_valid"]:
notify.email_me("Facebook token is no longer valid", "Reconnect Facebook in the ClickRuntime dashboard.")
return {"valid": False}
if expires == 0:
return {"valid": True, "expires": "never"}
days = (datetime.fromtimestamp(expires, timezone.utc) - datetime.now(timezone.utc)).days
if days < 7:
notify.email_me(f"Facebook token expires in {days} day(s)", "Reconnect Facebook in the ClickRuntime dashboard to renew it.")
return {"valid": True, "days_left": days}FAQ
Common questions
How long does a Facebook Page token last?
Is seven days fixed?
What if the token has no expiry date?
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 your Page's weekly reach by email
Every Monday you see last week's reach, engagement and follower change for your Page.
See how it worksGet a weekly table of post engagement
Every Friday you see each post from the week with its reactions, comments and shares.
See how it worksPublish an AI-written post with an image every day
Your Page gets a fresh post with a picture each day on topics you chose, and you get the link by email.
See how it worksKeep exploring
Set up “Get warned before your Facebook token expires” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.