Skip to content

Hourly

Clean up and check Airtable fields

Image links become attachments and records with bad email addresses are flagged, every hour.

Runs
Hourly
Apps
Airtable
AI
Not needed
Access
data.records:read, data.records:write

Send this to your assistant

Create a ClickRuntime automation: every hour, in my Airtable Contacts table, turn the Image URL field into an attachment in the Photo field, and tick Check Email on rows whose email address looks invalid.

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

Airtable bases decay quietly. Someone pastes an image URL into a text field when the field should hold an attachment. Marketing writes descriptions in markdown that a website needs as HTML. A sales rep types an email address with a typo, and the next campaign bounces. Each issue is small, but they pile up across thousands of rows, and fixing them by hand means filtering, copying and pasting during hours nobody can spare.

Every hour, the automation lists records flagged as needing work, applies the correct transformation to each and writes the result back with a PATCH. An image URL becomes a proper attachment, markdown becomes HTML, and email addresses are checked for valid syntax and for a mail server (MX record). Records with problems are flagged so you can fix them.

Content teams, marketers and operations people who publish or email from Airtable get the most from it; it also helps anyone who keeps data in Airtable.

What you get out of it

  • Bounced emails stop before the campaign

    Checking syntax and MX records catches typos like gmial.com early. Your next send reaches more people, and your sender reputation is not damaged by hard bounces. Fewer bounces also mean fewer deliverability warnings from your email provider.

  • Images show up where they should

    Turning a URL into a real Airtable attachment makes the picture display in grid, gallery and interface views, and lets automations or exports use the file reliably. Gallery cards and exports stop showing blank cells or raw links.

  • Website content publishes without manual conversion

    Markdown converted to HTML means the text is ready for your CMS or page builder. Editors write in a simple format and nobody reformats at publishing time. That removes a manual reformatting step from every publish.

  • Quality problems are found by the system

    Instead of someone scanning thousands of rows, each record is checked every hour, so errors are fixed in the same day they are made rather than discovered when something breaks.

  • Your base stays trustworthy

    When people know the data is cleaned continuously, they trust reports built on it. Decisions rest on records that have been validated, not on whatever was last pasted in. Dashboards and exports then match reality.

How it works

What happens, step by step

  1. Every hour, the automation finds Airtable records that still need tidying.

  2. Image links are turned into real attachments, and formatted text is converted so it displays properly.

  3. Each email address is checked to make sure it looks valid and its domain can receive mail.

  4. Records are updated in place, and ones with a bad email are flagged with Check Email.

Before it runs live

  • Connect Airtable

What you get

RunsHourly
Clean up and check Airtable fieldstoday, 9:00Succeeded
Airtable · Contacts12 photos attached · 3 rows flagged Check Email (e.g. "sam@acme")

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
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other Airtable 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.
clean_up_and_validate_record_fields.pyexample
import re
from clickruntime import on_trigger, credentials, http

BASE_ID = "appXXXXXXXXXXXXXX"
EMAIL_RE = re.compile(r"^[^@\s]+@[^@\s]+\.[a-z]{2,}$", re.I)

@on_trigger
def run(event):
    api = f"https://api.airtable.com/v0/{BASE_ID}/Contacts"
    headers = {"Authorization": f"Bearer {credentials.connection('airtable', 'work')}"}
    records = http.get(api, headers=headers, params={
        "filterByFormula": "OR(AND({Image URL}, NOT({Photo})), AND({Email}, NOT({Check Email})))"}).json()["records"]
    updates = []
    for r in records:
        f, fields = r["fields"], {}
        if f.get("Image URL") and not f.get("Photo"):
            fields["Photo"] = [{"url": f["Image URL"]}]
        if f.get("Email") and not EMAIL_RE.match(f["Email"].strip()):
            fields["Check Email"] = True
        if fields:
            updates.append({"id": r["id"], "fields": fields})
    for i in range(0, len(updates), 10):
        http.patch(api, headers=headers, json={"records": updates[i:i + 10]}).raise_for_status()
    return {"updated": len(updates)}

FAQ

Common questions

How does it know which records need work?
It looks for a flag, such as a Needs cleanup checkbox or an empty target field, in your table. Once a record is processed, the flag clears, so it is not handled again unless something is changed.
What does the MX check actually test?
It checks that the domain after the @ has mail servers configured. It cannot confirm that a specific mailbox exists, but it catches domains that do not accept mail at all, which is a common cause of bounces.
Will it overwrite the original value?
The transformed result is written to the field you choose, which can be the original or a new one. If you want to keep the raw text, point the output at a separate field. Keeping the raw text in a second field is a simple way to stay safe.
What permissions does it need?
data.records:read, data.records:write. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run each time it runs (hourly). 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 “Clean up and check Airtable fields” from your assistant

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