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.
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
You send a topic to the automation's trigger link.
AI writes an X post about it and emails the draft to you from your Gmail.
Every 10 minutes ClickRuntime checks the email thread for your reply.
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
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 Gmail and X steps into one automation
Under the hood
The code that runs this automation
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?
What if I want changes?
How quickly does it publish after I reply?
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 new articles to X and get an email copy
New articles from your blog or news feeds are summarised into X posts, and you get an email with what was posted.
See how it worksGet a morning digest of competitors' X posts
Every morning one email sums up what your competitors posted on X in the last day.
See how it worksPost an hourly price update to X and your inbox
Every hour a short price update for the assets you follow is posted on X and emailed to you.
See how it worksKeep exploring
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.