Skip to content
Twexapi
English
Esc
↑↓navigate↵open⌘Jpreview
On this page

Zapier

Build Zapier Twitter automation for tweet search, user lookup, trending tweets, platform webhooks, and cursor-safe handoffs through TwexAPI.

Build Zapier Twitter automation with TwexAPI. Search tweets, look up users, read trending tweets, and route rows to Slack, Sheets, Airtable, HubSpot, or email. TwexAPI uses one API key and the REST base URL https://api.twexapi.io.

Choose a Zapier integration pattern

Community node + MCP agent

Use an MCP-capable agent for discovery, then POST strict JSON to a Zapier Catch Hook.

HTTP Request actions

Call TwexAPI REST directly from Webhooks by Zapier or a private integration.

n8n-style community node

Prefer the dedicated n8n community node when your team already runs n8n.

The native Zapier X app was decommissioned. TwexAPI remains available through Catch Hooks, HTTP Request, or a private Zapier app.

Prerequisites

  • TwexAPI API key
  • Zapier account with Webhooks by Zapier
  • Optional Slack, Google Sheets, Airtable, HubSpot, or Gmail destination
  • Optional MCP-capable agent connected to https://api.twexapi.io/mcp

API key auth

Create a reusable credential for TwexAPI REST calls:

Authentication

Select Header Auth or custom headers in HTTP Request.

Header name

Set the header name to Authorization.

Header value

Paste Bearer YOUR_API_KEY as the credential value.

For MCP-capable AI Agent steps outside Zapier, configure https://api.twexapi.io/mcp with header x-api-key: YOUR_API_KEY.

Integration shape

Create a Catch Hook

Use Webhooks by Zapier and choose Catch Hook for agent handoffs or external POSTs.

Collect TwexAPI rows

Use MCP, HTTP Request, or an external worker to produce strict JSON.

Map stable fields

Use tweet_id as the dedupe key. Map text, author, URL, and cursor fields.

Route to destinations

Send rows to Slack, Sheets, Airtable, HubSpot, or email.

Starter actions

Use HTTP Request or a private Zapier app for these common reads:

Search tweets

POST /twitter/advanced_search/page with searchTerms, sortBy, and nextCursor.

Get user profile

GET /twitter/{screen_name}/about

Search users

GET /twitter/search-user/{keyword}/{target_count}

Get trends

GET /twitter/global-trending/tweets with country, topic, and content filters.

Get followers

POST /v3/twitter/users/followers with username and cursor pagination.

Create tweet

POST /twitter/tweets/create after human approval and cookie setup.

HTTP Request example: search tweets

{
  "method": "POST",
  "url": "https://api.twexapi.io/twitter/advanced_search/page",
  "headers": {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  "body": {
    "searchTerms": ["AI agents lang:en"],
    "sortBy": "Latest",
    "nextCursor": ""
  }
}

Result handoff

Use a Formatter or Code step when the next Zap step only needs stable handoff fields.

Tweet search page

Store query; map each tweet id to tweet_id, plus text, author username, and created_at; keep has_next_page and next_cursor.

User profile rows

Store source id as user_id, plus username, name, follower counts, and lookup input.

Trend rows

Store country, topic, content tag, and tweet rows with the workflow run metadata.

Tweet or reply write

Preview with the CLI --dry-run before posting from Zapier. Write actions need a cookie or auth_token.

Recipe 1: MCP agent research to Slack

Suggested MCP agent prompt:

Find recent posts about AI agents in fintech, group them by theme, and list 5 accounts worth monitoring.
Return only JSON with route_used, tweets, has_more, and next_cursor.
Each tweet must include tweet_id, author_username, text, created_at, and public_url.
Do not call write endpoints.

Zap steps:

  1. Catch Hook receives the JSON payload.
  2. Loop or line-item through tweets.
  3. Filter empty rows.
  4. Send Slack message with author, text, and URL.

Recipe 2: scheduled tweet search to Google Sheets

  1. Schedule the Zap daily or hourly.
  2. HTTP Request calls POST /twitter/advanced_search/page.
  3. Loop through returned tweets.
  4. Append tweet_id, author, text, created_at, and built URL to Sheets.
  5. Store next_cursor in Storage by Zapier if a later Zap should continue pagination.
{
  "method": "GET",
  "url": "https://api.twexapi.io/twitter/global-trending/tweets",
  "headers": {
    "Authorization": "Bearer YOUR_API_KEY"
  },
  "query": {
    "country": "United States",
    "topic": "Sports",
    "content": "NFL",
    "count": 20
  }
}

Route summary text to Slack or email after filtering by engagement.

Error handling

Status Zap behavior
400 Stop and fix the request mapping.
401 Fail the Zap and alert ops to replace the API key.
403 Pause until account access or credits are fixed.
429 Delay and retry using Zapier’s built-in replay.
5xx Retry with caution; preserve the cursor.

Private integration blueprint

If you package TwexAPI as a private Zapier integration, start with a small reliable surface:

Resource Actions
Tweets Search tweets, get tweet detail, create tweet after approval
Users Get user, search users
Trends Get global trending tweets
Followers Get followers v3 page

Use REST for packaged actions and MCP for agent-driven discovery workflows.

Testing checklist

  • Test the Catch Hook with a real TwexAPI handoff payload.
  • Confirm every REST request includes Authorization: Bearer YOUR_API_KEY.
  • Use tweet_id as the dedupe key before writing to a destination app.
  • Store next_cursor in Storage by Zapier for follow-up Zaps.
  • Keep write actions as drafts until a human approves the final text.

Next steps

Was this page helpful?