Skip to content

The moment it happens

Send a link to Telegram and get a WordPress draft

Share a product page, article or forum thread with your bot and a WordPress draft based on it is created, with the edit link sent back to you.

Runs
The moment it happens
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 I send a URL to my Telegram bot, fetch the page, write a WordPress post from it with AI, save it as a draft and reply with the edit link.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

An affiliate blogger who reviews kitchen gadgets finds most of their ideas on the go: a new product page, a review thread, an article about a recall. They save links in a notes app and rarely get back to them, because starting a post from a link means reading the page again and writing from scratch.

With this bot, they send the link to Telegram the moment they find it. The page is fetched, AI writes a draft post from its content with a link back, and it is saved in WordPress. The bot replies with the edit link, so the idea is already a draft by the time they sit down.

What you get out of it

  • Ideas captured as drafts

    A link sent from your phone becomes a draft within a minute. Good ideas stop dying in a notes app.

  • A head start on every post

    The draft pulls in the key facts from the page. You add your own opinion and experience instead of starting with a blank editor.

  • Works with almost any page

    Product pages, news articles and forum threads all work. Anything you can open in a browser can become a draft.

  • Drafts only

    Nothing is published until you edit and publish it yourself. Your site only shows posts you are happy with.

How it works

What happens, step by step

  1. When you send a link to your Telegram bot, ClickRuntime fetches that page and pulls out its main text.

  2. AI writes a blog draft from the page, following any note you added, and links back to the source.

  3. The draft is saved in WordPress.

  4. The bot replies with the draft's title and edit link.

Before it runs live

  • Connect Telegram
  • Connect WordPress
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Send a link to Telegram and get a WordPress draftjust nowSucceeded
Telegram · Blog botDraft saved: Acme's New Air Fryer Has a Window. Is It Worth the Extra $30?

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • 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

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
send_a_link_to_telegram_get_a_wordpress_post.pyexample
import re
from bs4 import BeautifulSoup
from clickruntime import on_event, credentials, http, ai
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_event
def handle(event):
    msg = (event.json or {}).get("message") or {}
    found = re.search(r"https://\S+", msg.get("text", ""))
    if not found:
        return {"ignored": True}
    url, note = found.group(0), msg["text"].replace(found.group(0), "").strip()
    page = BeautifulSoup(http.get(url, headers={"User-Agent": "Mozilla/5.0"}).text, "html.parser")
    text = " ".join(p.get_text(" ", strip=True) for p in page.find_all(["h1", "h2", "p", "li"]))[:6000]
    if len(text) < 200:
        telegram("sendMessage", chat_id=msg["chat"]["id"], text="I couldn't read that page.")
        return {"read": False}
    art = ai.generate(f"Write a blog draft (HTML body) based on this page, linking to {url}. Note: {note or 'none'}\n{text}", json_schema=SCHEMA, max_output_tokens=1800).json
    post = wp("POST", "posts", json={"title": art["title"], "excerpt": art["excerpt"], "content": art["body_html"], "status": "draft"})
    telegram("sendMessage", chat_id=msg["chat"]["id"], text=f"Draft saved: {art['title']}\nhttps://blog.example.com/wp-admin/post.php?post={post['id']}&action=edit")
    return {"draft": post["id"]}

FAQ

Common questions

What if the page cannot be read?
Some pages block automated visits or load their content with scripts. The bot tells you it could not read the page instead of creating an empty draft.
Does it link to the original page?
Yes. Each draft includes a link to the page it was based on, so you can credit it or use your own affiliate link.
Can I add notes with the link?
Yes. Type a note after the link, such as "focus on price", and the draft follows it.
What permissions does it need?
WordPress author+; bot token. Nothing else in your accounts is used.
Does it need AI?
Yes. It uses ClickRuntime's built-in AI, so you don't need an OpenAI or Anthropic key. Every plan includes a monthly AI allowance.
How many runs does it use?
One run for each event the app sends.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Send a link to Telegram and get a WordPress draft” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.