Skip to content

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.

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

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

  1. Every morning, ClickRuntime reads your trend sources and picks the top new topics.

  2. AI drafts a Facebook post for each and stores the drafts.

  3. You get an email from Gmail with each draft and an approve link.

  4. 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

RunsDaily
Approve trend-based Facebook posts from your inboxtoday, 9:00Succeeded
Gmail · 2 posts to approveSage green is everywhere this season. Here's how our Garden Room looks dressed in it... Approve: …

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

  • 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

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.
trend_based_posts_approved_by_email.pyexample
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?
From the feeds and forums you choose, such as wedding blogs. Topics already used are skipped.
What happens to drafts I don't approve?
They expire after a few days and are never posted.
Can I ask for changes?
Reply to the email with changes, or edit the draft wording with your AI assistant before approving.
What permissions does it need?
gmail.send; pages_manage_posts. Nothing else in your accounts is used.
Does it need AI?
Yes. It uses ClickRuntime's built-in AI, so you don't need an OpenAI or Anthropic key. Every plan includes a monthly AI allowance.
How many runs does it use?
One run each time it runs (daily). Checks that find nothing to do and stop right away aren't counted.
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 “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.