Daily
Get daily LinkedIn drafts on trending topics
Each morning you get a LinkedIn draft about something new in your field, ready to publish with one click.
- Runs
- Daily
- 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 morning, check the news feeds for my industry, pick the most interesting story, draft a LinkedIn post with my take on it, and email it to me with an approve link.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
People who comment on industry news early get noticed on LinkedIn, but keeping up with the news and writing a sharp take every day is a part-time job. By the time a busy marketer or analyst has read the story and thought about it, ten other people have already posted about it.
A daily draft built from the morning's news gives you a starting point while the topic is still fresh. You decide whether it is worth posting, and approving it is one click from your inbox.
What you get out of it
You post while topics are fresh
The draft arrives the same morning the story breaks, so your take reaches people while they are still talking about it.
Research is done for you
The news sources you trust are read for you each day. You no longer need to scan a dozen sites before you can write anything.
You stay in control
Every draft waits for your approval. Days when the news is not relevant to you simply pass without a post.
A visible point of view
Regular comment on what is happening in your field builds a reputation as someone who follows it closely, which helps with hiring, sales and speaking invitations.
How it works
What happens, step by step
Every morning ClickRuntime reads the latest stories from the news feeds you chose.
It skips stories it has already used.
AI picks the most relevant new story and writes a short LinkedIn post with a point of view and the article link.
The draft is emailed to you with an approve link, and clicking it publishes the post on LinkedIn.
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
- 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 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, credentials, http, state, ai
FEEDS = ["https://news.example.org/rss", "https://trade.example.com/feed"]
ME, APPROVE_URL = "me@example.com", "https://your-trigger-link"
@on_trigger
def draft(event):
seen = set(state.get("seen") or [])
items = [e for url in FEEDS for e in feedparser.parse(url).entries[:15] if e.link not in seen]
if not items:
return {"drafted": False}
lines = "\n".join(f"{n}. {e.title} {e.link}" for n, e in enumerate(items[:20]))
text = ai.generate("Pick the most relevant story for a B2B SaaS audience and write a 120-word LinkedIn post "
f"with a clear opinion, ending with its link:\n{lines}", max_output_tokens=350).text.strip()
key = uuid.uuid4().hex
state.set(f"draft:{key}", text)
state.set("seen", (list(seen) + [e.link for e in items])[-500:])
msg = EmailMessage()
msg["To"], msg["Subject"] = ME, "Today's LinkedIn draft"
msg.set_content(f"{text}\n\nApprove and publish: {APPROVE_URL}?draft={key}")
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()
return {"drafted": True}
@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
Where do the trending topics come from?
Will it pick the same story twice?
Does the post link to the original article?
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
Post 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 worksPost ideas from your content list to LinkedIn
Each day the next idea in your content sheet becomes a published LinkedIn post, and you get an email when it is live.
See how it worksKeep exploring
Set up “Get daily LinkedIn drafts on trending topics” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.