---
title: "Typeform Connector"
description: "คู่มือการผสานรวม Typeform ฉบับสมบูรณ์สำหรับการซิงค์ผลตอบแบบฟอร์ม การสำรวจ และการรวบรวมข้อมูลแบบสนทนากับ Brevo ผ่าน Tajo"
url: https://tajo.io/th/docs/connectors/custom/typeform/
markdown: https://tajo.io/th/docs/connectors/custom/typeform.md
lang: th-TH
robots: noindex
---

ขอสิทธิ์ใช้งานล่วงหน้า

กรอกชื่อและที่อยู่อีเมลที่ทำงานของคุณ เราจะส่งลิงก์เพื่อยืนยันคำขอเข้าใช้งาน Tajo ทางอีเมล

# Typeform Connector

สถานะตัวเชื่อม: วางแผนไว้ ยังไม่ได้สร้าง ปัจจุบัน Tajo ยังไม่ได้ใช้งานตัวเชื่อมนี้

| ฟิลด์ต้นทาง | ฟิลด์ปลายทาง | ค่าตัวอย่าง |
| --- | --- | --- |
| `record.id` | `source_id` | `record_1042` |
| `record.updated_at` | `updated_at` | `2026-10-18T08:00:00Z` |
| `record.value` | `value` | `sample_value` |

เชื่อมต่อ Typeform กับ Brevo ผ่าน Tajo เพื่อซิงค์ผลตอบแบบฟอร์มโดยอัตโนมัติ จับ leads จากฟอร์มแบบสนทนา และทริกเกอร์ระบบอัตโนมัติทางการตลาดตามการส่งแบบสำรวจและผลลัพธ์ quiz

## ภาพรวม

| คุณสมบัติ | ค่า |
| --- | --- |
| **แพลตฟอร์ม** | Typeform |
| **หมวดหมู่** | Forms & Surveys (แบบกำหนดเอง) |
| **ความซับซ้อนในการตั้งค่า** | ง่าย |
| **การผสานรวมอย่างเป็นทางการ** | ไม่ |
| **ข้อมูลที่ซิงค์** | ผลตอบ ผู้ติดต่อ เหตุการณ์ แบบฟอร์ม |
| **วิธีการยืนยันตัวตน** | OAuth 2.0 / Personal Access Token |

## ฟีเจอร์

- **การซิงค์ผลตอบแบบเรียลไทม์** - จับการส่งฟอร์มโดยอัตโนมัติผ่าน webhooks
- **การสร้างผู้ติดต่อ** - สร้างหรืออัปเดตผู้ติดต่อ Brevo จากผลตอบฟอร์ม
- **Lead scoring** - ใช้คะแนน quiz และข้อมูลฟอร์มสำหรับการคัดเลือก lead
- **Hidden Fields** - ส่งข้อมูลลูกค้าผ่าน Hidden Fields สำหรับฟอร์มที่เป็นส่วนตัว
- **การแมปแบบมีเงื่อนไข** - แมปฟิลด์ฟอร์มที่แตกต่างกันตาม response logic
- **รองรับหลายฟอร์ม** - เชื่อมต่อหลาย typeforms กับรายการ Brevo ที่แตกต่างกัน

## ข้อกำหนดเบื้องต้น

ก่อนเริ่มต้น ตรวจสอบให้แน่ใจว่าคุณมี:

1. บัญชี Typeform (แผน Basic หรือสูงกว่าสำหรับ webhooks)
2. Personal Access Token จาก [Typeform Account Settings](https://admin.typeform.com/account#/section/tokens)
3. บัญชี Brevo ที่มีสิทธิ์เข้าถึง API
4. บัญชี Tajo ที่มีสิทธิ์ connector

## การยืนยันตัวตน

### Personal Access Token

```bash
# Generate a token at https://admin.typeform.com/account#/section/tokens
export TYPEFORM_ACCESS_TOKEN=tfp_your_personal_access_token
export TAJO_API_KEY=your_tajo_api_key
export BREVO_API_KEY=your_brevo_api_key
```

### OAuth 2.0

```javascript
// OAuth 2.0 Authorization Flow
const authUrl = 'https://api.typeform.com/oauth/authorize?' +
  new URLSearchParams({
    client_id: process.env.TYPEFORM_CLIENT_ID,
    redirect_uri: 'https://your-app.com/callback',
    scope: 'forms:read responses:read webhooks:write accounts:read',
    state: generateState()
  });

// Exchange authorization code for access token
const tokenResponse = await fetch('https://api.typeform.com/oauth/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'authorization_code',
    code: authorizationCode,
    client_id: process.env.TYPEFORM_CLIENT_ID,
    client_secret: process.env.TYPEFORM_CLIENT_SECRET,
    redirect_uri: 'https://your-app.com/callback'
  })
});
```

## การกำหนดค่า

### การตั้งค่าพื้นฐาน

```yaml
connectors:
  typeform:
    enabled: true
    access_token: "${TYPEFORM_ACCESS_TOKEN}"

    forms:
      - form_id: "abc123"
        list_id: 5
        mapping:
          email_field: "email"
          name_field: "full_name"
      - form_id: "xyz789"
        list_id: 6
        mapping:
          email_field: "work_email"

    sync:
      responses: true
      contacts: true
      events: true

    webhook:
      enabled: true
      secret: "${TYPEFORM_WEBHOOK_SECRET}"
```

### การแมปฟิลด์

```yaml
field_mapping:
  # Map Typeform field references to Brevo attributes
  email: email
  name: FIRSTNAME
  company: COMPANY
  phone: SMS
  score: LEAD_SCORE
  quiz_result: QUIZ_SCORE
  nps_rating: NPS_SCORE
  feedback: LAST_FEEDBACK
```

## API Endpoints

| Endpoint | เมธอด | คำอธิบาย |
| --- | --- | --- |
| `https://api.typeform.com/forms` | GET | แสดงรายการฟอร์มทั้งหมด |
| `https://api.typeform.com/forms/{form_id}` | GET | ดึงฟอร์ม |
| `https://api.typeform.com/forms` | POST | สร้างฟอร์ม |
| `https://api.typeform.com/forms/{form_id}` | PUT | อัปเดตฟอร์ม |
| `https://api.typeform.com/forms/{form_id}/responses` | GET | ดึงผลตอบ |
| `https://api.typeform.com/forms/{form_id}/responses` | DELETE | ลบผลตอบ |
| `https://api.typeform.com/forms/{form_id}/webhooks/{tag}` | PUT | สร้าง/อัปเดต webhook |
| `https://api.typeform.com/forms/{form_id}/webhooks/{tag}` | GET | ดู webhook |
| `https://api.typeform.com/forms/{form_id}/webhooks` | GET | แสดงรายการ webhooks |

## ตัวอย่างโค้ด

### เริ่มต้น Connector

```javascript
import { TajoClient } from '@tajo/sdk';

const tajo = new TajoClient({
  apiKey: process.env.TAJO_API_KEY,
  brevoApiKey: process.env.BREVO_API_KEY
});

await tajo.connectors.connect('typeform', {
  accessToken: process.env.TYPEFORM_ACCESS_TOKEN,
  forms: ['abc123', 'xyz789']
});
```

### ดึงผลตอบแบบฟอร์ม

```javascript
// Fetch responses using the Responses API
const response = await fetch(
  'https://api.typeform.com/forms/abc123/responses?' +
    new URLSearchParams({
      page_size: 25,
      since: '2024-01-01T00:00:00Z',
      completed: 'true'
    }),
  {
    headers: {
      'Authorization': `Bearer ${process.env.TYPEFORM_ACCESS_TOKEN}`
    }
  }
);

const data = await response.json();

// Sync each response to Brevo
for (const item of data.items) {
  const answers = item.answers;
  const email = answers.find(a => a.field.ref === 'email')?.email;

  if (email) {
    await tajo.contacts.sync({
      email,
      attributes: {
        FIRSTNAME: answers.find(a => a.field.ref === 'name')?.text,
        LEAD_SCORE: item.calculated?.score || 0
      },
      listIds: [5]
    });
  }
}
```

### ตั้งค่า Webhooks

```javascript
// Register a webhook for real-time response notifications
await fetch(
  'https://api.typeform.com/forms/abc123/webhooks/tajo-sync',
  {
    method: 'PUT',
    headers: {
      'Authorization': `Bearer ${process.env.TYPEFORM_ACCESS_TOKEN}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      url: 'https://api.example.com/webhooks/typeform',
      enabled: true,
      secret: process.env.TYPEFORM_WEBHOOK_SECRET
    })
  }
);
```

Caution

ที่อยู่ `example.com` ด้านบนเป็นเพียงตัวอย่างชั่วคราวจนกว่าปลายทางของ Tajo จะพร้อมใช้งาน

### จัดการเหตุการณ์ Webhook

```javascript
app.post('/webhooks/typeform', async (req, res) => {
  // Verify webhook signature
  const signature = req.headers['typeform-signature'];
  const isValid = verifyTypeformSignature(
    req.rawBody, signature, process.env.TYPEFORM_WEBHOOK_SECRET
  );

  if (!isValid) return res.status(401).send('Unauthorized');

  const { form_response } = req.body;

  await tajo.connectors.handleWebhook('typeform', {
    topic: 'form_response',
    payload: form_response
  });

  res.status(200).send('OK');
});
```

## ขีดจำกัดอัตรา

| Endpoint | ขีดจำกัดอัตรา | หมายเหตุ |
| --- | --- | --- |
| Create API | 2 คำขอ/วินาที | การสร้างและอัปเดตฟอร์ม |
| Responses API | 2 คำขอ/วินาที | การดึงผลตอบ |
| Webhooks API | 2 คำขอ/วินาที | การจัดการ webhook |
| ทุก endpoints | 120 คำขอ/นาที | ขีดจำกัดอัตราทั่วโลก |

การแบ่งหน้าผลตอบ

Responses API ส่งคืนสูงสุด 1,000 ผลตอบต่อคำขอ ใช้พารามิเตอร์ cursor `before` หรือ `after` สำหรับการแบ่งหน้าเมื่อดึงชุดผลตอบขนาดใหญ่

## การแก้ไขปัญหา

| ปัญหา | สาเหตุ | วิธีแก้ |
| --- | --- | --- |
| ไม่ได้รับ webhook | Webhook ถูกปิดใช้งาน | เปิดใช้งาน webhook ใน Typeform dashboard |
| ผลตอบหายไป | ตัวกรองถูกใช้งาน | ตรวจสอบพารามิเตอร์ `since`/`until` และ `completed` |
| ข้อผิดพลาด auth 401 | Token หมดอายุ | สร้าง Personal Access Token ใหม่ |
| Rate limit 429 | คำขอมากเกินไป | ใช้การจำกัดคำขอ |
| คำตอบว่างเปล่า | ฟิลด์ไม่บังคับ | จัดการค่า null/undefined ของคำตอบ |

### โหมด Debug

```yaml
connectors:
  typeform:
    debug: true
    log_level: verbose
    log_webhooks: true
    log_responses: true
```

## แนวทางปฏิบัติที่ดีที่สุด

1. **ใช้ webhooks** - ต้องการ webhooks มากกว่าการ polling สำหรับการจับผลตอบแบบเรียลไทม์
2. **ตรวจสอบลายเซ็น** - ตรวจสอบลายเซ็น webhook เสมอเพื่อความปลอดภัย
3. **ใช้ Hidden Fields** - กรอกข้อมูลลูกค้าที่ทราบอยู่แล้วล่วงหน้าในฟอร์ม
4. **แมป field references** - ใช้ค่า `ref` ของฟิลด์ที่เสถียรแทนที่จะใช้ field IDs
5. **จัดการผลตอบบางส่วน** - รับมือกับคำถามที่เป็นทางเลือกและถูกข้ามไป
6. **ตั้งค่า retry logic** - ใช้การประมวลผล webhook แบบ idempotent

## ความปลอดภัย

- **OAuth 2.0** - การยืนยันตัวตนแบบ scoped token
- **Webhook signatures** - การตรวจสอบลายเซ็น SHA-256 HMAC
- **HTTPS เท่านั้น** - API endpoints ทั้งหมดต้องการ TLS
- **Token scoping** - ขอ OAuth scopes ขั้นต่ำที่จำเป็น
- **การจัดการ secret** - เก็บ tokens ในตัวแปรสภาพแวดล้อมหรือ secret managers
- **ความสอดคล้องกับ GDPR** - ใช้ Delete Responses API สำหรับคำขอการลบข้อมูล

## แหล่งข้อมูลที่เกี่ยวข้อง

- [Calendly Connector](https://tajo.io/th/docs/connectors/custom/calendly)
- [Zapier Connector](https://tajo.io/th/docs/connectors/custom/zapier)
- [Customer Sync Skill](https://tajo.io/th/docs/skills/data-sync/customer-sync)
- [Typeform Developer Documentation](https://www.typeform.com/developers/)
