Every hour
Draft WordPress posts from new feed articles with an email summary
New articles from your feeds become WordPress drafts written in your own words, and you get an email listing the drafts that were added.
- Runs
- Every hour
- Apps
- Gmail, WordPress
- AI
- Yes, uses the built-in AI allowance
- Access
- WordPress write; Gmail gmail.send
Send this to your assistant
Create a ClickRuntime automation: every hour, check these RSS feeds, create a WordPress draft for each new article, and email me a list of the new drafts.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
The editor of a niche gardening blog follows a dozen seed companies, botanic gardens and horticulture news sites. Writing about their announcements is good for readers, but checking every source and starting each post by hand eats most of the week.
This automation keeps the pipeline full. Every hour it checks the feeds, AI writes a draft for each new article that summarises it in the blog's voice and links the source, and the drafts are saved in WordPress. An email lists what was added, so the editor can pick the best ones to finish and publish.
What you get out of it
Never miss news from your sources
Every feed is checked hourly. Announcements become drafts while they are still news.
Your words, with credit
Drafts summarise rather than copy, and link to the original. You publish something that is your own.
One email to see what is new
The summary email lists each new draft with a link. You decide what to work on without opening WordPress.
Drafts only
Nothing goes live without an editor choosing to publish it.
How it works
What happens, step by step
Every hour, ClickRuntime checks each RSS feed on your list for new articles.
It skips any article it has already drafted.
AI writes a draft for each new article in your blog's voice, linking the source, and it is saved in WordPress.
If any drafts were created, you get an email from your Gmail address listing them with edit links.
Before it runs live
- Connect Google through your own Google app (a one-time, 10-minute setup), so it works with your own Gmail
- Connect WordPress
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
- 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 Gmail and WordPress steps into one automation
Under the hood
The code that runs this automation
import base64
import feedparser
from email.mime.text import MIMEText
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http, state, ai, report_fetched
FEEDS = ["https://seeds.example.com/news/feed", "https://botanic.example.org/rss"]
ME = "you@example.com"
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 send_email(to, subject, text, thread_id=None, reply_to=None):
mime = MIMEText(text)
mime["to"], mime["subject"] = to, subject
if reply_to:
mime["In-Reply-To"] = reply_to
body = {"raw": base64.urlsafe_b64encode(mime.as_bytes()).decode(), **({"threadId": thread_id} if thread_id else {})}
return build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).users().messages().send(userId="me", body=body).execute()
@on_trigger
def run(event):
seen = set(state.get("seen") or [])
new = [e for f in FEEDS for e in feedparser.parse(http.get(f).content).entries[:10] if e.link not in seen]
report_fetched(len(new))
if not new:
return {"drafts": 0}
lines = []
for e in new[:8]:
body = ai.generate(f"Write a 400-word draft (HTML) in our own words for home gardeners, linking {e.link}:\n{e.title}\n{e.get('summary', '')[:2500]}", max_output_tokens=1000).text
post = wp("POST", "posts", json={"title": e.title, "content": body, "status": "draft"})
lines.append(f"{e.title}\nhttps://blog.example.com/wp-admin/post.php?post={post['id']}&action=edit")
seen.add(e.link)
send_email(ME, f"{len(lines)} new blog drafts", "\n\n".join(lines))
state.set("seen", list(seen)[-1000:])
return {"drafts": len(lines)}FAQ
Common questions
Will I get an email every hour?
Can I add feeds later?
Is this allowed by the sources?
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
Draft a weekly SEO blog post and get the link by email
Each week the next keyword on your list becomes a WordPress draft, and an email with the edit link arrives in your inbox for review.
See how it worksTurn a document into a blog post you approve by email
Send a PDF to your trigger link and a WordPress draft is written from it; reply "approve" to the email and the post goes live.
See how it worksLabel new emails automatically
New mail is sorted into labels like Inquiry, Invoice and Newsletter within minutes of arriving.
See how it worksKeep exploring
Set up “Draft WordPress posts from new feed articles with an email summary” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.