Skip to content

Every 15 min for new published posts

Share each new WordPress post on your Facebook Page

Every time you publish a blog post, a Facebook post with a short caption and the link goes out on your Page within 15 minutes.

Runs
Every 15 min for new published posts
Apps
Facebook Pages, WordPress
AI
Yes, uses the built-in AI allowance
Access
WordPress read; Page token with pages_manage_posts, pages_read_engagement

Send this to your assistant

Create a ClickRuntime automation: every 15 minutes, check for newly published WordPress posts, write a short Facebook caption for each with AI, and post it with the link to my Facebook Page.

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 neighbourhood bakery posts recipes and news on its WordPress blog, and most of its regulars follow its Facebook Page. Sharing each post on Facebook is meant to happen straight after publishing, but it is easy to forget in the middle of a morning rush.

This automation shares for them. Every 15 minutes it checks WordPress for new posts, AI writes a friendly caption from the title and excerpt, and the post goes out on the Facebook Page with the link. If AI is unavailable, the excerpt is used as the caption, so the post is still shared.

What you get out of it

  • Every post reaches your followers

    No blog post is published without being shared. Your Facebook audience sees everything you write.

  • A caption that fits the feed

    AI writes a short, friendly caption instead of pasting the title. Posts look like you wrote them for Facebook.

  • Readers come to your site

    Each Facebook post links to the article, so followers visit your website, where your menu and orders are.

  • Still works without AI

    If AI is not available, the post's excerpt is used as the caption. Sharing never stops.

How it works

What happens, step by step

  1. Every 15 minutes, ClickRuntime checks your WordPress site for posts published since its last check.

  2. It remembers the newest post it has shared, so each post is only shared once.

  3. AI writes a short Facebook caption from the post's title and excerpt, or the excerpt is used if AI is unavailable.

  4. The caption and link are posted to your Facebook Page.

Before it runs live

  • Connect Facebook Pages
  • Connect WordPress

What you get

RunsEvery 15 min for new published posts
Share each new WordPress post on your Facebook Pagetoday, 9:00Succeeded
Facebook · Northwind BakeryOur cinnamon buns finally have a recipe page! Here's how we get them so soft. 🥐

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

  • Act only on the items that match your own rules, and skip the rest
  • 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 WordPress 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.
share_new_wordpress_posts_to_your_facebook_page.pyexample
import re
from datetime import datetime, timezone
from clickruntime import on_trigger, credentials, http, state, ai, log, report_fetched

PAGE_ID = "your-page-id"
WP = "https://blog.example.com/wp-json/wp/v2"

def wp(method, path, **kw):
    r = http.request(method, f"{WP}/{path}", auth=(credentials.secret("WP_USER"), credentials.secret("WP_APP_PASSWORD")), **kw)
    r.raise_for_status()
    return r.json()
def post_to_page(message, link):
    r = http.post(f"https://graph.facebook.com/v21.0/{PAGE_ID}/feed", data={"message": message, "link": link, "access_token": credentials.secret("FACEBOOK_PAGE_TOKEN")})
    r.raise_for_status()
    return r.json()["id"]

@on_trigger
def run(event):
    after = state.get("after") or datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%S")
    posts = wp("GET", "posts", params={"after": after, "status": "publish", "orderby": "date", "order": "asc", "_fields": "date,link,title,excerpt"})
    report_fetched(len(posts))
    if not posts:
        return {"shared": 0}
    for p in posts:
        excerpt = re.sub("<[^>]+>", "", p["excerpt"]["rendered"]).strip()
        try:
            caption = ai.generate(f"Write a warm 1-2 sentence Facebook caption for: {p['title']['rendered']}\n{excerpt[:600]}", max_output_tokens=80).text.strip()
        except (ai.AINotIncluded, ai.AILimitReached) as e:
            log.warning("AI unavailable, using excerpt", {"code": e.code})
            caption = excerpt[:300]
        post_to_page(caption, p["link"])
    state.set("after", posts[-1]["date"])
    return {"shared": len(posts)}

FAQ

Common questions

Will it share old posts?
No. It starts with posts published after you turn it on, and remembers which it has shared.
Can I set the tone of captions?
Yes. Describe your style once, such as warm and chatty with one emoji, and every caption follows it.
Does Facebook show a preview?
Yes. Facebook builds a preview card from the article's title and featured image.
What permissions does it need?
WordPress read; Page token with pages_manage_posts, pages_read_engagement. 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 checks. Checks that find nothing new 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 “Share each new WordPress post on your Facebook Page” from your assistant

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