The moment it happens
Log every sale to Airtable and a sheet
Each sale from your store is recorded in Airtable and a Google Sheet, and a note goes to Slack.
- Runs
- The moment it happens
- Apps
- Airtable, Google Sheets
- AI
- Not needed
- Access
- Airtable write; Sheets edit
Send this to your assistant
Create a ClickRuntime automation: when my store sends a sale webhook, add the sale to my Airtable 'Sales' table and my 'Sales' sheet, and post it to #sales in Slack.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A small digital products shop sells templates and courses through an online store. The founder tracks customers and refunds in Airtable, but the accountant and a business partner want a plain Google Sheet of every sale for the monthly numbers. Copying sales across by hand means the sheet is always a week behind, and the odd sale gets missed.
Writing each sale to both places the moment the store reports it keeps the customer view and the finance view in agreement, and the Slack note gives the team a real-time sense of how the day is going.
What you get out of it
Both records from one event
The same sale lands in Airtable and the sheet within seconds, with the same amount and product.
Retries do not double count
Each sale id is remembered, so if the store sends the same sale twice it is recorded once.
Finance gets a plain sheet
Your accountant works from a sheet they already understand, with no Airtable seat needed.
The team sees sales as they happen
A short line in #sales shows the product and amount.
How it works
What happens, step by step
Your store notifies a private ClickRuntime link each time a sale is made.
It checks whether this sale has already been logged, so a repeated notice is ignored.
The sale is added to your Airtable Sales table with product, amount and customer email.
The same sale is added as a new row in your Sales sheet.
A short message with the product and amount is posted to #sales in Slack.
Before it runs live
- Connect Airtable
- Connect your Google Sheets account and pick the spreadsheets it may use
- 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
- 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 and Google Sheets steps into one automation
Under the hood
The code that runs this automation
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_event, credentials, http, notify, state
BASE_ID = "appXXXXXXXXXXXXXX"
SHEET_ID = "1AbCdEfGhIjKlMnOpQrStUvWxYz"
@on_event
def handle(event):
sale = event.json or {}
sale_id = str(sale.get("sale_id") or event.event_id)
if state.get(f"sale:{sale_id}"):
return {"duplicate": True}
product, email = sale.get("product_name", ""), sale.get("email", "")
amount = round(float(sale.get("price") or 0) / 100, 2)
http.post(f"https://api.airtable.com/v0/{BASE_ID}/Sales",
headers={"Authorization": f"Bearer {credentials.connection('airtable', 'work')}"},
json={"typecast": True, "records": [{"fields": {"Sale ID": sale_id, "Product": product,
"Amount": amount, "Email": email, "Date": event.received_at[:10]}}]}).raise_for_status()
sheets = build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
sheets.spreadsheets().values().append(spreadsheetId=SHEET_ID, range="Sales!A:E", valueInputOption="USER_ENTERED",
body={"values": [[event.received_at[:10], sale_id, product, amount, email]]}).execute()
state.set(f"sale:{sale_id}", True)
notify.slack(f"New sale: {product} for ${amount:.2f}", channel="#sales")
return {"logged": sale_id}FAQ
Common questions
Which stores does this work with?
What if the store sends the amount in cents?
Can refunds be logged too?
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
Save every form entry to Airtable and a sheet
Each form submission becomes an Airtable record and a sheet row, and you get an email confirming it arrived.
See how it worksImport leads from a sheet into your Airtable CRM
New leads pasted into a sheet are added to Airtable as companies, without duplicates, and marked imported.
See how it worksResearch companies from a sheet into Airtable
Companies you add to a sheet are looked up and saved in Airtable with industry, size and a short summary.
See how it worksKeep exploring
Set up “Log every sale to Airtable and a sheet” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.