Skip to content

The moment it happens

Approve X posts by replying to an email

Send a topic, get an X post draft by email, and reply "approve" to publish it.

Runs
The moment it happens
Apps
Gmail, X
AI
Yes, uses the built-in AI allowance
Access
Gmail gmail.send + gmail.readonly; X tweet.write

Send this to your assistant

Create a ClickRuntime automation: when I send a topic to the trigger link, write an X post about it and email it to me. Check for my reply every 10 minutes and publish it on X when I reply approve.

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

In many small companies, posts on the company X account need a quick sign-off from a founder or manager. That person lives in email, and asking them to log into a social tool to approve one post rarely works, so posts wait for days.

Putting the draft in an email and treating a one-word reply as approval fits how busy people already work. The post goes out minutes after they reply, and nobody has to chase.

What you get out of it

  • Approval where people already are

    Approvers reply from their inbox or phone, with no new tool to log into.

  • Nothing goes out unapproved

    Only a reply with the word approve publishes the post, so the company account is never used without sign-off.

  • Faster turnaround

    Posts are published within minutes of approval, not when someone next remembers to log in.

  • An email trail of every decision

    The draft and the approval sit in the same thread, so you can always see who approved what and when.

How it works

What happens, step by step

  1. You send a topic to the automation's trigger link.

  2. AI writes an X post about it and emails the draft to you from your Gmail.

  3. Every 10 minutes ClickRuntime checks the email thread for your reply.

  4. When you reply approve, the post is published on X and the draft is cleared, so it cannot be posted twice.

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 X
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Approve X posts by replying to an emailjust nowSucceeded
Email · X post for approval"Acme Books now reconciles card payments overnight, so your morning starts with a balanced ledger." Reply 'approve' to publish.

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 Gmail and X 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.
ai_social_posts_for_x_with_email_approval.pyexample
import base64
from email.message import EmailMessage
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_event, on_trigger, credentials, http, state, ai

ME = "me@example.com"

def gmail():
    return build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).users()

@on_event
def topic(event):
    text = ai.generate(f"Write one X post under 260 characters about: {(event.json or {}).get('topic', '')}", max_output_tokens=100).text.strip()
    msg = EmailMessage()
    msg["To"], msg["Subject"] = ME, "X post for approval"
    msg.set_content(f"{text}\n\nReply 'approve' to publish.")
    sent = gmail().messages().send(userId="me", body={"raw": base64.urlsafe_b64encode(msg.as_bytes()).decode()}).execute()
    state.set("drafts", {**(state.get("drafts") or {}), sent["threadId"]: text})
    return {"thread": sent["threadId"]}

@on_trigger
def check(event):
    drafts = state.get("drafts") or {}
    if not drafts:
        return {"published": 0}
    for thread_id, text in list(drafts.items()):
        replies = gmail().threads().get(userId="me", id=thread_id, format="minimal").execute()["messages"][1:]
        if any("approve" in m.get("snippet", "").lower() for m in replies):
            http.post("https://api.x.com/2/tweets", headers={"Authorization": "Bearer " + credentials.connection("x", "main")},
                      json={"text": text}).raise_for_status()
            del drafts[thread_id]
    state.set("drafts", drafts)
    return {"waiting": len(drafts)}

FAQ

Common questions

How do I send a topic?
Post it to the automation's trigger link from a form, a shortcut on your phone or your AI assistant. A sentence is enough.
What if I want changes?
Reply with anything other than approve and the draft is left unpublished. Send a new topic with more detail to get a fresh draft.
How quickly does it publish after I reply?
Replies are checked every 10 minutes, so the post goes out within about 10 minutes of your approval.
What permissions does it need?
Gmail gmail.send + gmail.readonly; X tweet.write. 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 “Approve X posts by replying to an email” from your assistant

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