Every 30 minutes
Turn each new YouTube video into a blog post
Every new video on your channel becomes a WordPress article with the video embedded, and Telegram tells you when it is up.
- Runs
- Every 30 minutes
- Apps
- Telegram, WordPress
- AI
- Yes, uses the built-in AI allowance
- Access
- WordPress author+; bot token
Send this to your assistant
Create a ClickRuntime automation: when my YouTube channel posts a new video, write a blog post from its title and description, publish it to WordPress with the video embedded and tell me on Telegram.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A woodworking teacher publishes a tutorial on YouTube every week and has a WordPress site that sells courses. Search engines send far more visitors to written articles than to videos, but writing up each tutorial as a blog post is extra work the teacher never gets around to.
This automation does the write-up. Every 30 minutes it checks the channel's feed, and when a new video appears, AI writes an article from the title and description, the video is embedded at the top, and the post is published on WordPress. A Telegram message with the link lets the teacher know it is live.
What you get out of it
Each video works twice
A written article brings in search visitors who would never find the video on YouTube. The same effort reaches two audiences.
Visitors land on your own site
Readers arrive on your WordPress site, where your courses and newsletter sign-up are. That is worth more than a view on someone else's platform.
Video embedded in the post
Every article includes the video, so readers can watch without leaving your site.
You know when it is live
A Telegram message with the link arrives as soon as the post is published, so you can share it or make a quick edit.
How it works
What happens, step by step
Every 30 minutes, ClickRuntime checks your YouTube channel's public feed for new videos.
It skips any video it has already turned into a post.
AI writes an article from the video's title and description, and the video is embedded at the top.
The post is published on WordPress, and your Telegram bot sends you the link.
Before it runs live
- Connect Telegram
- 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 Telegram and WordPress steps into one automation
Under the hood
The code that runs this automation
import feedparser
from clickruntime import on_trigger, credentials, http, state, ai, report_fetched
CHANNEL_ID = "UCxxxxxxxxxxxxxxxxxxxxxx"
CHAT_ID = 123456789
SCHEMA = {"type": "object", "properties": {k: {"type": "string"} for k in ["title", "excerpt", "body_html"]}, "required": ["title", "excerpt", "body_html"]}
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 telegram(method, **payload):
return http.post(f"https://api.telegram.org/bot{credentials.secret('TELEGRAM_BOT_TOKEN')}/{method}", json=payload).json()
@on_trigger
def run(event):
seen = set(state.get("seen") or [])
feed = feedparser.parse(http.get(f"https://www.youtube.com/feeds/videos.xml?channel_id={CHANNEL_ID}").content)
new = [e for e in feed.entries if e.yt_videoid not in seen]
report_fetched(len(new))
if not new:
return {"posts": 0}
for e in new[:3]:
art = ai.generate(f"Write a blog article (HTML body, H2 headings) from this video.\nTitle: {e.title}\nDescription: {e.get('summary', '')[:3000]}", json_schema=SCHEMA, max_output_tokens=1800).json
embed = f'<!-- wp:embed {{"url":"{e.link}","type":"video","providerNameSlug":"youtube"}} --><figure class="wp-block-embed"><div class="wp-block-embed__wrapper">{e.link}</div></figure><!-- /wp:embed -->'
post = wp("POST", "posts", json={"title": art["title"], "excerpt": art["excerpt"], "content": embed + art["body_html"], "status": "publish"})
telegram("sendMessage", chat_id=CHAT_ID, text=f"New post from your video: {art['title']}\n{post['link']}")
seen.add(e.yt_videoid)
state.set("seen", list(seen)[-500:])
return {"posts": min(3, len(new))}FAQ
Common questions
Does it use the video transcript?
Can it save drafts instead?
Which channel does it watch?
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
Rewrite new feed articles for your site and share them on Telegram
New articles from the feeds you follow are rewritten as posts on your WordPress site and shared on your Telegram channel with the link.
See how it worksPublish a weekly SEO blog post and get the link on Telegram
Every week the next keyword on your list becomes a blog post on your WordPress site, and Telegram sends you the link as soon as it is up.
See how it worksTurn a PDF sent to Telegram into a blog post you approve
Send a PDF to your bot and it becomes a WordPress draft; tap Approve in Telegram and the post goes live.
See how it worksKeep exploring
Set up “Turn each new YouTube video into a blog post” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.