On a schedule
Share new blog posts on LinkedIn after a quick review
Each new article on your blog becomes a LinkedIn post draft in your inbox, published when you click approve.
- Runs
- On a schedule
- Apps
- Gmail, LinkedIn
- AI
- Yes, uses the built-in AI allowance
- Access
- gmail.send; w_member_social
Send this to your assistant
Create a ClickRuntime automation: every hour, check our blog feed for new articles. For each one, write a LinkedIn post that makes people want to read it, email it to me, and publish it only when I approve.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A small marketing team publishes good articles, then forgets to promote them. Someone is meant to write a LinkedIn post for each one, but it slips, and the article gets a fraction of the readers it could have had.
Drafting the LinkedIn post the moment an article appears, and putting it in front of the right person for a one-click review, means every article gets promoted without anyone remembering to do it.
What you get out of it
Every article gets promoted
No post is forgotten, so each article gets the extra readers that LinkedIn brings, not only the ones someone remembered.
A human still signs off
The draft waits for your approval, so the wording that represents your company is always checked.
Promotion happens on publish day
The draft is ready within the hour, when the article is newest and most worth sharing.
Writers keep writing
The person who wrote the article does not also have to write the social post, which keeps them on the work they do best.
How it works
What happens, step by step
Every hour ClickRuntime checks your blog's feed for articles it has not seen before.
For each new article, AI writes a short LinkedIn post with the article link.
The draft is emailed to you from your Gmail with an approve link.
Clicking approve publishes the post on LinkedIn, and each draft can only be published once.
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 LinkedIn
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 LinkedIn steps into one automation
Under the hood
The code that runs this automation
import base64, uuid
import feedparser
from email.message import EmailMessage
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, on_event, report_fetched, credentials, http, state, ai
FEED, ME, APPROVE_URL = "https://blog.example.com/feed", "me@example.com", "https://your-trigger-link"
@on_trigger
def check(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 {"drafts": 0}
gmail = build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
for e in new:
text = ai.generate(f"Write a 100-word LinkedIn post promoting this article, ending with the link.\n{e.title}\n{e.get('summary', '')[:1500]}\n{e.link}",
max_output_tokens=300).text.strip()
key = uuid.uuid4().hex
state.set(f"draft:{key}", text)
msg = EmailMessage()
msg["To"], msg["Subject"] = ME, f"LinkedIn draft: {e.title}"
msg.set_content(f"{text}\n\nApprove and publish: {APPROVE_URL}?draft={key}")
gmail.users().messages().send(userId="me", body={"raw": base64.urlsafe_b64encode(msg.as_bytes()).decode()}).execute()
state.set("seen", (seen + [e.link for e in new])[-300:])
return {"drafts": len(new)}
@on_event
def approve(event):
key = (event.json or {}).get("draft", "")
text = state.get(f"draft:{key}")
if not text:
return {"published": False}
headers = {"Authorization": "Bearer " + credentials.connection("linkedin", "main"), "LinkedIn-Version": "202405"}
me = http.get("https://api.linkedin.com/v2/userinfo", headers=headers).json()["sub"]
http.post("https://api.linkedin.com/rest/posts", headers=headers, json={
"author": f"urn:li:person:{me}", "commentary": text, "visibility": "PUBLIC", "lifecycleState": "PUBLISHED",
"distribution": {"feedDistribution": "MAIN_FEED", "targetEntities": [], "thirdPartyDistributionChannels": []}}).raise_for_status()
state.delete(f"draft:{key}")
return {"published": True}FAQ
Common questions
Which feeds can it watch?
Will older articles be posted when I first turn it on?
What if I don't approve a draft?
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
Turn newsletters you read into LinkedIn posts
Newsletters you label in Gmail become LinkedIn posts in your own voice, sharing what you learned.
See how it worksPost to LinkedIn daily and get an email copy
A fresh LinkedIn post goes out each weekday from your topic list, and a copy with the link lands in your inbox.
See how it worksApprove LinkedIn posts from your inbox
Each week AI drafts a LinkedIn post and emails it to you; one click on the approve link publishes it.
See how it worksKeep exploring
Set up “Share new blog posts on LinkedIn after a quick review” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.