Daily
Approve trend-based Facebook posts from your inbox
AI drafts posts about trending topics in your field and emails them to you; the ones you approve are published to your Page.
- Runs
- Daily
- Apps
- Facebook Pages, Gmail
- AI
- Yes, uses the built-in AI allowance
- Access
- gmail.send; pages_manage_posts
Send this to your assistant
Create a ClickRuntime automation: every morning at 8, find trending topics in my field, draft a Facebook post for the top two, email them to me with approve links, and publish the ones I approve.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A wedding venue wants its Facebook Page to join in with wedding trends, such as colour of the year or new traditions, but the manager doesn't want anything posted without a look first.
Every morning two drafts arrive in Gmail, each about something trending in weddings, with an approve link. A click publishes the good ones, and the rest are ignored.
What you get out of it
Fresh ideas every morning
No need to hunt for what's trending.
Your approval on every post
Nothing goes live without your click.
Approve from any device
A link in an email works from your phone.
Join conversations early
Trends are caught while they're still being talked about.
How it works
What happens, step by step
Every morning, ClickRuntime reads your trend sources and picks the top new topics.
AI drafts a Facebook post for each and stores the drafts.
You get an email from Gmail with each draft and an approve link.
When you click approve, that post is published to your Page, once.
Before it runs live
- Connect Facebook Pages
- Connect Google through your own Google app (a one-time, 10-minute setup), so it works with your own Gmail
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
- Change what the AI looks for, or how it writes the result
- Add another app, for example also send it to Slack
- Combine it with other Facebook Pages and Gmail steps into one automation
Under the hood
The code that runs this automation
import base64
import feedparser
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, on_event, credentials, http, ai, state
PAGE_ID, LINK = "1234567890", "https://run.clickruntime.example/t/abc123"
@on_trigger
def run(event):
used = state.get("used") or []
topics = [e.title for e in feedparser.parse("https://www.reddit.com/r/weddingplanning/top/.rss?t=day").entries if e.title not in used][:2]
lines = []
for t in topics:
state.set(f"draft:{len(used)}", ai.generate(f"Facebook post for a wedding venue about: {t}", max_output_tokens=200).text.strip())
lines.append(f"{state.get(f'draft:{len(used)}')}\nApprove: {LINK}?approve={len(used)}")
used.append(t)
gmail = build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
raw = f"To: me\r\nSubject: {len(lines)} posts to approve\r\n\r\n" + "\n\n".join(lines)
gmail.users().messages().send(userId="me", body={"raw": base64.urlsafe_b64encode(raw.encode()).decode()}).execute()
state.set("used", used[-300:])
return {"drafts": len(lines)}
@on_event
def approve(event):
key = (event.json or {}).get("approve")
if text := state.get(f"draft:{key}"):
http.post(f"https://graph.facebook.com/v21.0/{PAGE_ID}/feed", data={"message": text, "access_token": credentials.connection("facebook", "work")})
state.delete(f"draft:{key}")
return {"approved": bool(text)}FAQ
Common questions
Where do trends come from?
What happens to drafts I don't approve?
Can I ask for changes?
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
Publish AI posts to your Page with an email record
AI writes and publishes a Facebook post from your topic list, and you get an email with the text and link of what went out.
See how it worksGet a Meta Ads report with commentary by email
Each Monday you get an email with last week's Meta ad results by campaign and a few lines on what they mean.
See how it worksGet a weekly email on how people feel about your posts
Every week you get an email summarising the comments on your recent Facebook posts: overall mood, common themes and anything to follow up.
See how it worksKeep exploring
Set up “Approve trend-based Facebook posts from your inbox” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.