Skip to content

Daily

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.

Runs
Daily
Apps
Facebook Pages, Gmail
AI
Yes, uses the built-in AI allowance
Access
pages_manage_posts; gmail.send

Send this to your assistant

Create a ClickRuntime automation: every Tuesday and Thursday at 10, take the next topic from my list, write and publish a Facebook post about it, and email me the post text and link.

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

An accountancy practice knows its Facebook Page should share useful tips, but nobody in the office wants to write posts. When they do get written, nobody is sure what was posted last month.

Twice a week the next topic becomes a published post, and an email confirms exactly what went out with a link. The inbox doubles as a record of everything posted.

What you get out of it

  • Posts go out without anyone writing them

    Your list of topics turns into a steady schedule.

  • A record in your inbox

    Every post is confirmed by email, searchable later.

  • Catch mistakes quickly

    The email lets you check each post and fix it from the link.

  • Consistent voice

    Every post follows the tone you describe once.

How it works

What happens, step by step

  1. On your chosen days, ClickRuntime takes the next topic from your list.

  2. AI writes a Facebook post about it.

  3. The post is published on your Facebook Page and the topic is crossed off.

  4. You get an email from your Gmail with the post text and a link.

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
Publish AI posts to your Page with an email recordtoday, 9:00Succeeded
Gmail · PostedPosted: Self-assessment deadline. Only 3 months until 31 January. Here's a checklist to get ahead...

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.
ai_facebook_posts_with_email_confirmation.pyexample
import base64
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http, ai, state

PAGE_ID = "1234567890"

@on_trigger
def run(event):
    topics = state.get("topics") or []
    gmail = build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
    if topics:
        topic = topics.pop(0)
        text = ai.generate(f"Helpful Facebook post for an accountancy practice about: {topic}", max_output_tokens=250).text.strip()
        post = http.post(f"https://graph.facebook.com/v21.0/{PAGE_ID}/feed",
                         data={"message": text, "access_token": credentials.connection("facebook", "work")}).json()
        subject, body = f"Posted: {topic}", f"{text}\n\nhttps://facebook.com/{post['id']}"
    else:
        subject, body = "Topic list is empty", "Add more topics to keep posting."
    raw = f"To: me\r\nSubject: {subject}\r\n\r\n{body}"
    gmail.users().messages().send(userId="me", body={"raw": base64.urlsafe_b64encode(raw.encode()).decode()}).execute()
    state.set("topics", topics)
    return {"subject": subject}

FAQ

Common questions

How do I add topics?
List them in the prompt or ask your AI assistant to add more to the list.
Can I approve posts first?
Yes. Ask for the email-approval version, where nothing is posted until you click approve.
What if the list is empty?
Nothing is posted and the email asks you for more topics.
What permissions does it need?
pages_manage_posts; gmail.send. 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 “Publish AI posts to your Page with an email record” from your assistant

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