Log every campaign hashtag tweet to Airtable

Every 30 minutes, capture every new public X post that uses your campaign hashtag and save it to Airtable as a clean dataset for reporting.

Deterministic Code
TwitterAPI.ioAirtableMarketingOperationsData SyncResearch & Monitoring
PromptCreate

Build a code workflow that captures every public X post using my campaign hashtag and logs each one as a row in Airtable, so my marketing team has a clean dataset for reporting.

Trigger: cron, every 30 minutes. The workflow runs continuously for the duration of the campaign.

Configurable inputs: the X search query (default a single hashtag like "#YourLaunch2026", but any TwitterAPI.io advanced-search query is valid), the Airtable base ID, and the Airtable table ID. The tweet ID column in Airtable should be named tweet_id.

Step 1. Call TwitterAPI.io Advanced Search with the configured query and a sinceTime cursor. On the first run, set sinceTime to the workflow start time. On every subsequent run, set sinceTime to the largest createdAt seen on the previous run, stored in workflow state, so we never miss tweets and never reprocess pages. Paginate by passing the response's next_cursor back as cursor, and keep calling until has_next_page is false OR the returned data array is empty. TwitterAPI.io's has_next_page flag can flap true past the end of data, so always also stop when the data array comes back empty. Collect every tweet returned across all pages into a single batch.

Step 2. For each tweet, build a row with these columns: tweet_id (string, from id), posted_at (ISO string, from createdAt), author_handle (string, from author.userName), author_followers (number, from author.followers), text (string, from text), link (string, from url), like_count (number, from likeCount), reply_count (number, from replyCount), retweet_count (number, from retweetCount), quote_count (number, from quoteCount), has_media (boolean, true if entities.media exists and is non-empty), is_reply (boolean, from isReply).

Step 3. Call Airtable Create Records to append the rows to the configured base and table. Airtable accepts a maximum of 10 records per call, so chunk the batch into groups of 10 and make sequential calls until every row is written. Pass typecast=true so Airtable converts strings into the right cell types where possible.

Step 4. After all writes succeed, update workflow state with the new sinceTime cursor (the max createdAt from this batch) so the next run picks up exactly where this one stopped. If no tweets were returned this run, leave the cursor unchanged.

Important notes to surface in the table setup help so the user knows what to configure in Airtable before enabling the workflow: mark the tweet_id field as a Unique Field in Airtable so any accidental retry is rejected before it creates a duplicate row; and the field names in the Airtable table must match the column names above exactly.

Keep this purely deterministic: no AI summarization, no scoring, no sentiment, no judgment. Just clean ingestion so the marketing team can pivot, filter, and chart in Airtable.

What does this prompt do?

  • Runs on a 30-minute schedule for the entire life of your campaign, so nothing slips through.
  • Pulls every new public X post that matches your campaign hashtag, no matter who wrote it.
  • Saves each post to Airtable with the author handle, follower count, body, link, and live engagement counts.
  • Uses the post ID as a dedupe key, so re-running the workflow never creates duplicate rows.

What do I need to use this?

  • A TwitterAPI.io account and API key
  • An Airtable account, plus a base and table set up to receive the rows
  • The campaign hashtag (or any X search query you want to track)

How can I customize it?

  • Swap the hashtag, or combine multiple hashtags and mentions in one query (e.g. #LaunchA OR #LaunchB).
  • Change how often the workflow runs (every 15 minutes for a flash campaign, hourly for a longer one).
  • Add or remove columns in Airtable to track extra fields like language, country, or attached media.

FAQs

Does this capture every post, or just the popular ones?
Every public post that matches your query, in the order X returns them. Engagement counts are saved as a snapshot at the moment the row is created.
How do I stop duplicate rows from showing up?
In your Airtable table, mark the tweet ID column as a unique field. The workflow uses the post ID as a stable key, so any accidental retry is rejected by Airtable before it creates a duplicate.
Can I track more than one hashtag at a time?
Yes. The search query is configurable, so you can combine hashtags, mentions, or other filters using standard X search syntax (e.g. #LaunchA OR #LaunchB).
Will this pick up posts from private accounts?
No. Only public posts are visible to the workflow. Anything posted by a protected account will not appear.
How long does it keep running?
As long as the workflow is enabled. Pause it when the campaign ends, or let it run indefinitely to keep a rolling archive.

Related templates

Run your nutrition clients' weekly meal plans from one console

See who is due, build a week of dinners on demand, swap anything you do not like, then send the recipe and grocery links yourself.

Instacart
Airtable
Gmail
App
Instagram UGC rights tracker and repost approval board

See every customer photo that tags your brand, ask for permission in one click, and repost only once a yes is on the record.

Instagram
Airtable
Slack Bot
App
A verification desk for every document your team scans

See every scan next to the details pulled out of it, correct anything wrong, and let only verified numbers reach your ledger sheet.

JigsawStack
Airtable
Google Sheets
App
Browse and shortlist creators without burning audit credits

Search creators for free, shortlist the best with your team, and spend an audit credit only when you decide someone is worth a closer look.

HypeAuditor
Airtable
Slack
App
Global operations exposure map for your sites and suppliers

Open one board each morning to see which of your facilities, suppliers and shipping lanes are sitting near trouble in the news right now.

GDELT
Airtable
Slack
App
Deal sourcing kanban board for your Harmonic saved searches

Drag every new company from your Harmonic saved searches through New, Tracking, Meeting and Passed, with a one click diligence brief on every card.

Harmonic
Airtable
Slack
App

Stop spending Monday mornings copying tweets into a spreadsheet.

Connect TwitterAPI.io and Airtable once, and Geni logs every new campaign tweet every 30 minutes.