Skip to content

Weekly

Get a researched LinkedIn draft in your inbox every Monday

Every Monday a trending topic in your field is researched and a LinkedIn post draft arrives in your inbox for you to edit and post.

Runs
Weekly
Apps
Gmail, Perplexity
AI
Optional
Access
Perplexity key; gmail.send

Send this to your assistant

Create a ClickRuntime automation: every Monday at 8, find a trending topic in B2B marketing with Perplexity, write a LinkedIn post draft and email it to me for review.

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

Finding something worth saying is the hard part of posting regularly. By the time you have read enough to have a view on this week's news, the moment has passed.

Consultants, founders and marketing leads use it to start each week with a timely topic and a draft that already has the facts in it.

What you get out of it

  • A timely topic chosen for you

    The draft picks up what people in your field are discussing this week.

  • Facts gathered first

    The post is written from current research, with sources listed below it.

  • Arrives when you plan the week

    A Monday email is easy to turn into a post before the week fills up.

  • Fresh each week

    Topics used before are remembered and not repeated.

How it works

What happens, step by step

  1. Every Monday, ClickRuntime asks Perplexity what is trending in your field this week.

  2. It picks a topic it has not used before and gathers the key facts.

  3. AI writes a LinkedIn post draft from that research.

  4. The draft and its sources are emailed to you from your Gmail.

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 Perplexity

What you get

RunsWeekly
Get a researched LinkedIn draft in your inbox every Mondaytoday, 9:00Succeeded
Email · Draft postDraft post: Why B2B buyers now ask AI tools before they ask sales Three years ago, the first call was the start of the buying process...

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

  • 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 Perplexity 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.
research_backed_post_drafts_for_review.pyexample
import base64
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http, state, ai

FIELD, ME = "B2B marketing", "me@example.com"

def sonar(prompt):
    r = http.post("https://api.perplexity.ai/chat/completions", headers={"Authorization": f"Bearer {credentials.secret('PERPLEXITY_API_KEY')}"},
                  json={"model": "sonar", "messages": [{"role": "user", "content": prompt}]}, timeout=90).json()
    return r["choices"][0]["message"]["content"], [s["url"] for s in r.get("search_results", [])]
def send(to, subject, body):
    raw = f"To: {to}\r\nSubject: {subject}\r\nContent-Type: text/plain; charset=utf-8\r\n\r\n{body}"
    build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).users() \
        .messages().send(userId="me", body={"raw": base64.urlsafe_b64encode(raw.encode()).decode()}).execute()

@on_trigger
def run(event):
    used = state.get("used") or []
    research, links = sonar(f"What is the most discussed topic in {FIELD} this week? Avoid these: {used[-10:]}. "
                            "Start with the topic on one line, then the key facts.")
    topic = research.splitlines()[0][:120]
    try:
        draft = ai.generate(f"Write a 180-word LinkedIn post with a clear opinion, from this research:\n{research[:3000]}",
                            max_output_tokens=450).text
    except (ai.AINotIncluded, ai.AILimitReached):
        draft = research  # AI unavailable: send the research only
    send(ME, f"Draft post: {topic}", draft + "\n\nSources:\n" + "\n".join(links))
    state.set("used", (used + [topic])[-50:])
    return {"topic": topic}

FAQ

Common questions

Can I steer the topic?
Yes. Describe your field and the angles you care about, such as pricing or hiring, and the topic is chosen within them.
Does it post to LinkedIn?
No. The draft comes to your inbox. You edit and post it yourself.
Is the AI step required?
No. Without it you get the research and sources only, as a starting point for writing yourself.
What permissions does it need?
Perplexity key; gmail.send. Nothing else in your accounts is used.
Does it need AI?
No, but you can ask for an AI step (for example a summary). It then uses ClickRuntime's built-in AI allowance.
How many runs does it use?
One run each time it runs (weekly). Checks that find nothing to do and stop right away aren't counted.
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 “Get a researched LinkedIn draft in your inbox every Monday” from your assistant

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