---
title: "Zapier"
description: "TwexAPI를 통해 트윗 검색, 사용자 조회, 인기 트윗, 플랫폼 웹훅, 커서 안전 핸드오프를 위한 Zapier Twitter 자동화를 구축합니다."
---

TwexAPI로 Zapier Twitter 자동화를 구축합니다. 트윗을 검색하고, 사용자를 조회하며, 인기 트윗을 읽고, 행을 Slack, Sheets, Airtable, HubSpot 또는 이메일로 라우팅합니다. TwexAPI는 하나의 API 키와 REST 기본 URL `https://api.twexapi.io`를 사용합니다.

## Zapier 통합 패턴 선택

<CardGroup cols={2}>
  <Card title="커뮤니티 노드 + MCP 에이전트" icon="bot">
    탐색에는 MCP 지원 에이전트를 사용하고, 엄격한 JSON을 Zapier Catch Hook에 POST합니다.
  </Card>

  <Card title="HTTP Request 작업" icon="link">
    Webhooks by Zapier 또는 프라이빗 통합에서 TwexAPI REST를 직접 호출합니다.
  </Card>

  <Card title="n8n 스타일 커뮤니티 노드" icon="plug">
    팀이 이미 n8n을 사용 중이면 전용 [n8n community node](/guides/n8n)를 선호합니다.
  </Card>
</CardGroup>

네이티브 Zapier X 앱은 중단되었습니다. TwexAPI는 Catch Hooks, HTTP Request, 프라이빗 Zapier 앱을 통해 계속 사용할 수 있습니다.

## 전제조건

* [TwexAPI API 키](https://twexapi.io/dashboard)
* Webhooks by Zapier가 있는 Zapier 계정
* 선택적 Slack, Google Sheets, Airtable, HubSpot 또는 Gmail 대상
* `https://api.twexapi.io/mcp`에 연결된 선택적 MCP 지원 에이전트

## API 키 인증

TwexAPI REST 호출용 재사용 가능한 자격 증명을 생성합니다.

<CardGroup cols={3}>
  <Card title="인증" icon="key-round">
    HTTP Request에서 Header Auth 또는 커스텀 헤더를 선택합니다.
  </Card>

  <Card title="헤더 이름" icon="braces">
    헤더 이름을 `Authorization`으로 설정합니다.
  </Card>

  <Card title="헤더 값" icon="shield-check">
    `Bearer YOUR_API_KEY`를 자격 증명 값으로 붙여넣습니다.
  </Card>
</CardGroup>

Zapier 외부 MCP 지원 AI Agent 단계에는 `x-api-key: YOUR_API_KEY` 헤더로 `https://api.twexapi.io/mcp`를 구성합니다.

## 통합 구조

1. **Catch Hook 생성**

    Webhooks by Zapier를 사용하고 에이전트 핸드오프 또는 외부 POST용 Catch Hook을 선택합니다.

2. **TwexAPI 행 수집**

    MCP, HTTP Request 또는 외부 워커로 엄격한 JSON을 생성합니다.

3. **안정적인 필드 매핑**

    `tweet_id`를 중복 제거 키로 사용합니다. 텍스트, 작성자, URL, 커서 필드를 매핑합니다.

4. **대상으로 라우팅**

    행을 Slack, Sheets, Airtable, HubSpot 또는 이메일로 보냅니다.

## 시작 작업

다음 일반적인 읽기 작업에는 HTTP Request 또는 프라이빗 Zapier 앱을 사용합니다.

<CardGroup cols={2}>
  <Card title="트윗 검색" icon="search">
    `searchTerms`, `sortBy`, `nextCursor`와 함께 `POST /twitter/advanced_search/page`.
  </Card>

  <Card title="사용자 프로필 조회" icon="user-round">
    `GET /twitter/{screen_name}/about`
  </Card>

  <Card title="사용자 검색" icon="users">
    `GET /twitter/search-user/{keyword}/{target_count}`
  </Card>

  <Card title="트렌드 조회" icon="trending-up">
    국가, 주제, 콘텐츠 필터와 함께 `GET /twitter/global-trending/tweets`.
  </Card>

  <Card title="팔로워 조회" icon="users">
    사용자명과 커서 페이지네이션과 함께 `POST /v3/twitter/users/followers`.
  </Card>

  <Card title="트윗 생성" icon="send">
    사람 승인 및 쿠키 설정 후 `POST /twitter/tweets/create`.
  </Card>
</CardGroup>

### HTTP Request 예제: 트윗 검색

```json
{
  "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": ""
  }
}
```

## 결과 핸드오프

다음 Zap 단계에 안정적인 핸드오프 필드만 필요할 때 Formatter 또는 Code 단계를 사용합니다.

<CardGroup cols={2}>
  <Card title="트윗 검색 페이지" icon="search">
    쿼리를 저장합니다. 각 트윗 `id`를 `tweet_id`로 매핑하고 `text`, 작성자 사용자명, `created_at`을 포함합니다. `has_next_page`와 `next_cursor`를 유지합니다.
  </Card>

  <Card title="사용자 프로필 행" icon="users">
    소스 `id`를 `user_id`로 저장하고 `username`, `name`, 팔로워 수, 조회 입력을 포함합니다.
  </Card>

  <Card title="트렌드 행" icon="trending-up">
    국가, 주제, 콘텐츠 태그, 워크플로 실행 메타데이터가 포함된 트윗 행을 저장합니다.
  </Card>

  <Card title="트윗 또는 답글 쓰기" icon="send">
    Zapier에서 게시하기 전 [CLI](/sdks/cli) `--dry-run`으로 미리 봅니다. 쓰기 작업에는 쿠키 또는 `auth_token`이 필요합니다.
  </Card>
</CardGroup>

## 레시피 1: MCP 에이전트 연구 → Slack

권장 MCP 에이전트 프롬프트:

```text
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 단계:

1. Catch Hook이 JSON 페이로드를 수신합니다.
2. Loop 또는 line-item으로 `tweets`를 순회합니다.
3. 빈 행을 필터링합니다.
4. 작성자, 텍스트, URL이 포함된 Slack 메시지를 보냅니다.

## 레시피 2: 스케줄 트윗 검색 → Google Sheets

1. Zap을 매일 또는 매시간 스케줄합니다.
2. HTTP Request가 `POST /twitter/advanced_search/page`를 호출합니다.
3. 반환된 트윗을 순회합니다.
4. `tweet_id`, 작성자, 텍스트, `created_at`, 구성된 URL을 Sheets에 추가합니다.
5. 후속 Zap이 페이지네이션을 이어가야 하면 Storage by Zapier에 `next_cursor`를 저장합니다.

## 레시피 3: 인기 트윗 알림

```json
{
  "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
  }
}
```

참여도로 필터링한 뒤 요약 텍스트를 Slack 또는 이메일로 라우팅합니다.

## 오류 처리

| 상태 | Zap 동작 |
| ------ | ------------ |
| `400` | 중지하고 요청 매핑을 수정합니다. |
| `401` | Zap을 실패 처리하고 운영팀에 API 키 교체를 알립니다. |
| `403` | 계정 액세스 또는 크레딧이 해결될 때까지 일시 중지합니다. |
| `429` | Zapier 내장 replay로 지연 후 재시도합니다. |
| `5xx` | 주의하여 재시도하고 커서를 보존합니다. |

## 프라이빗 통합 청사진

TwexAPI를 프라이빗 Zapier 통합으로 패키징할 때는 작고 신뢰할 수 있는 표면으로 시작합니다.

| 리소스 | 작업 |
| --- | --- |
| Tweets | 트윗 검색, 트윗 상세, 승인 후 트윗 생성 |
| Users | 사용자 조회, 사용자 검색 |
| Trends | 글로벌 인기 트윗 조회 |
| Followers | 팔로워 v3 페이지 조회 |

패키징된 작업에는 REST를, 에이전트 기반 탐색 워크플로에는 MCP를 사용합니다.

## 테스트 체크리스트

* 실제 TwexAPI 핸드오프 페이로드로 Catch Hook을 테스트합니다.
* 모든 REST 요청에 `Authorization: Bearer YOUR_API_KEY`가 포함되는지 확인합니다.
* 대상 앱에 쓰기 전 `tweet_id`를 중복 제거 키로 사용합니다.
* 후속 Zap용 Storage by Zapier에 `next_cursor`를 저장합니다.
* 사람이 최종 텍스트를 승인할 때까지 쓰기 작업은 초안으로 유지합니다.

## 다음 단계

* 팀이 TwexAPI 커뮤니티 노드를 선호하면 [n8n](/guides/n8n)
* 시각적 시나리오 라우팅에는 [Make](/guides/make)
* [Agent MCP Handoff](/mcp/agent-handoff)
* [Advanced Twitter Search](/api-reference/search-endpoints/get-data-page-twitter-advanced-search-page-post)
