Every 30 minutes
Post new articles to X and get an email copy
New articles from your blog or news feeds are summarised into X posts, and you get an email with what was posted.
- Runs
- Every 30 minutes
- Apps
- Gmail, X
- AI
- Yes, uses the built-in AI allowance
- Access
- X tweet.write; Gmail gmail.send
Send this to your assistant
Create a ClickRuntime automation: every 30 minutes, check my blog feed for new articles, write an X post summarising each one, publish it, and email me what was posted.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Writers and small media teams want each new article shared on X straight away, but the person who wrote it has usually moved on to the next piece. Posting by hand happens for some articles and not others.
Summarising each new article into a post and publishing it automatically means everything gets shared. The email copy keeps a record in your inbox, so you know what went out and can respond if needed.
What you get out of it
Every article is shared
Articles are posted within half an hour of going live, whether or not anyone remembers.
Posts that make sense on their own
Each post is a short summary rather than just a headline, which gives followers a reason to click.
A record in your inbox
The email copy shows exactly what was posted, so there are no surprises on your account.
No repeats
Articles already posted are remembered, so updating an old article does not post it again.
How it works
What happens, step by step
Every 30 minutes ClickRuntime checks your feeds for articles it has not seen before.
AI summarises each new article into a post that fits X's length limit, with the link.
The post is published on X.
You get an email from your Gmail with the post text and a link to it.
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 X
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 X steps into one automation
Under the hood
The code that runs this automation
import base64
from email.message import EmailMessage
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
import feedparser
from clickruntime import on_trigger, report_fetched, credentials, http, state, ai
FEED, ME = "https://blog.example.com/feed", "me@example.com"
def send_email(subject, text):
msg = EmailMessage()
msg["To"], msg["Subject"] = ME, subject
msg.set_content(text)
gmail = build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
gmail.users().messages().send(userId="me", body={"raw": base64.urlsafe_b64encode(msg.as_bytes()).decode()}).execute()
@on_trigger
def run(event):
seen = state.get("seen")
entries = feedparser.parse(FEED).entries[:20]
new = [e for e in entries if seen is not None and e.link not in seen]
report_fetched(len(new))
if seen is None:
state.set("seen", [e.link for e in entries])
if not new:
return {"posted": 0}
for e in new:
text = ai.generate(f"Summarise as an X post under 230 characters:\n{e.title}\n{e.get('summary', '')[:1500]}",
max_output_tokens=90).text.strip() + f"\n{e.link}"
resp = http.post("https://api.x.com/2/tweets", headers={"Authorization": "Bearer " + credentials.connection("x", "main")}, json={"text": text})
resp.raise_for_status()
send_email(f"Posted on X: {e.title}", f"{text}\n\nhttps://x.com/i/status/{resp.json()['data']['id']}")
state.set("seen", (seen + [e.link for e in new])[-300:])
return {"posted": len(new)}FAQ
Common questions
Can it watch news for keywords, not just my blog?
Will it post articles that were already published?
Can I get the email before it posts instead of after?
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
Approve X posts by replying to an email
Send a topic, get an X post draft by email, and reply "approve" to publish it.
See how it worksGet a morning digest of competitors' X posts
Every morning one email sums up what your competitors posted on X in the last day.
See how it worksPost an hourly price update to X and your inbox
Every hour a short price update for the assets you follow is posted on X and emailed to you.
See how it worksKeep exploring
Set up “Post new articles to X and get an email copy” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.