Skip to content

Every 15 minutes

Get new comments by email with spam marked

You hear about each new comment, and the obvious spam is flagged so you can deal with it in one go.

Runs
Every 15 minutes
Apps
WordPress
AI
Optional
Access
read (+write to moderate)

Send this to your assistant

Create a ClickRuntime automation: every 15 minutes, email me new WordPress comments with the post they're on, and mark any that are obviously spam as spam.

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

Comments on a WordPress site are a mix of genuine questions and junk. Without a prompt, the moderation queue sits unread for days, a customer's real question waits behind forty link-stuffed casino comments, and spam that slipped past the filter goes live under your best post.

Every 15 minutes the automation lists comments made since the last check and emails you each one with the author, post and text. If you turn on the optional AI check, ClickRuntime's built-in AI judges whether a comment looks like spam, labels it in the message, and can set the comment's status to spam in WordPress.

Site owners who want to approve comments personally use the alert alone, while busy blogs rely on the spam check to keep the queue clean. Either way, nothing sits unseen between visits to the dashboard of your WordPress site.

What you get out of it

  • Real questions are seen quickly

    A reader's genuine question reaches your inbox within a quarter of an hour, so a reply goes out while they are still interested in the topic. Good replies in that window show readers that real people run the site.

  • Spam is dealt with before it shows

    Marking obvious junk as spam straight away keeps promotional links off your posts, which protects reader trust and avoids search penalties for linking to bad sites. Readers who see junk links under your posts tend to lose trust in everything else.

  • The moderation queue stays short

    With spam removed automatically, the comments that remain in the queue are the ones that need a human decision, rather than an overwhelming mixed list. That leaves your attention for the small number of comments that deserve a considered answer.

  • You decide how aggressive to be

    The AI check is optional and can start as a label only. Once you trust its judgement, you can allow it to change the status and spare yourself the manual clicking.

  • Context is in the email

    Each alert shows the post title, author name and comment text, so you can judge the comment without logging into the WordPress admin first. That saves a round trip to wp-admin just to decide whether a comment is worth opening.

How it works

What happens, step by step

  1. Every 15 minutes, ClickRuntime checks WordPress for comments since its last check.

  2. If you turn it on, AI reads each comment and flags the obvious spam.

  3. You get one email listing each comment with the author and link, with spam clearly marked.

  4. If you choose, flagged comments are also moved to spam in WordPress for you.

Before it runs live

  • Connect WordPress

What you get

RunsEvery 15 minutes
Get new comments by email with spam markedtoday, 9:00Succeeded
Email · 2 new commentsJamie Fox on https://blog.example.com/onboarding-guide/#comment-311 Love this guide! [SPAM] cheap-seo-links on …

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 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.
new_comment_alert_ai_spam_check.pyexample
import re
from clickruntime import on_trigger, credentials, http, state, ai, notify, report_fetched

SITE = "https://blog.example.com"

def wp(method, path, **kw):
    resp = http.request(method, f"{SITE}/wp-json/wp/v2/{path}", **kw,
                        auth=("admin", credentials.secret("WP_APP_PASSWORD")))
    resp.raise_for_status()
    return resp.json()

@on_trigger
def run(event):
    last_id = state.get("last_id") or 0
    comments = [c for c in wp("GET", "comments", params={"status": "all", "context": "edit", "per_page": 50,
                                                          "orderby": "id", "order": "asc"}) if c["id"] > last_id]
    report_fetched(len(comments))
    if not comments:
        return {"summary": "Nothing new"}
    lines = []
    for c in comments:
        text = re.sub(r"<[^>]+>", "", c["content"]["raw"])[:1000]
        try:
            spam = ai.generate(text, max_output_tokens=5, system="Answer SPAM or OK only.").text.strip().upper() == "SPAM"
        except (ai.AINotIncluded, ai.AILimitReached):
            spam = text.count("http") > 2
        if spam:
            wp("POST", f"comments/{c['id']}", json={"status": "spam"})
        lines.append(f"{'[SPAM] ' if spam else ''}{c['author_name']} on {c['link']}\n{text[:300]}")
    notify.email_me(f"{len(comments)} new comments", "\n\n".join(lines))
    state.set("last_id", comments[-1]["id"])
    return {"new": len(comments)}

FAQ

Common questions

Does the AI ever mark a real comment as spam?
It can occasionally misjudge short or unusual comments, which is why labelling in the email first is a sensible start. A comment marked as spam remains in WordPress's spam folder, so you can restore it if needed.
Can I get alerts only for comments on certain posts?
Yes, the comment list can be filtered by post ID, and your AI assistant can set that up. This is handy when one product page or landing article attracts most of the questions you care about.
Do pingbacks and trackbacks count as comments?
WordPress stores them as comments, so they can appear in the list. If they clutter your inbox, you can ask for them to be excluded by comment type so only reader comments trigger an email.
What permissions does it need?
read (+write to moderate). 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 checks. Checks that find nothing new 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 new comments by email with spam marked” from your assistant

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