Zoom Connector
เชื่อมต่อ Zoom กับ Brevo ผ่าน Tajo เพื่อซิงค์ผู้เข้าร่วมประชุมและผู้เข้าร่วม webinar เป็นผู้ติดต่อโดยอัตโนมัติ ทริกเกอร์ลำดับการติดตามหลังการประชุม และติดตาม engagement metrics สำหรับระบบอัตโนมัติทางการตลาดของคุณ
ภาพรวม
| คุณสมบัติ | ค่า |
|---|---|
| แพลตฟอร์ม | Zoom |
| หมวดหมู่ | Video Conferencing (แบบกำหนดเอง) |
| ความซับซ้อนในการตั้งค่า | ปานกลาง |
| การผสานรวมอย่างเป็นทางการ | ไม่ |
| ข้อมูลที่ซิงค์ | ผู้เข้าร่วม เหตุการณ์ Webinars ผู้ติดต่อ |
| วิธีการยืนยันตัวตน | OAuth 2.0 / Server-to-Server OAuth |
ฟีเจอร์
- การซิงค์ผู้เข้าร่วม - สร้างผู้ติดต่อ Brevo อัตโนมัติจากผู้เข้าร่วมประชุม
- การจับผู้เข้าร่วม webinar - ซิงค์ผู้ลงทะเบียนและผู้เข้าร่วม webinar
- ทริกเกอร์เหตุการณ์ประชุม - เปิดใช้งานระบบอัตโนมัติเมื่อประชุมเริ่ม สิ้นสุด และเหตุการณ์บันทึก
- การติดตาม engagement - ติดตามระยะเวลาการเข้าร่วมและ participation metrics
- การติดตาม webinar - ทริกเกอร์ลำดับอีเมลที่กำหนดเป้าหมายตามการเข้าร่วม webinar
- การแจ้งเตือนการบันทึก - ส่งลิงก์บันทึกผ่านแคมเปญอีเมล Brevo
ข้อกำหนดเบื้องต้น
ก่อนเริ่มต้น ตรวจสอบให้แน่ใจว่าคุณมี:
- บัญชี Zoom (แผน Pro หรือสูงกว่า)
- Zoom Server-to-Server OAuth app หรือ OAuth app ผ่าน Zoom App Marketplace
- บัญชี Brevo ที่มีสิทธิ์เข้าถึง API
- บัญชี Tajo ที่มีสิทธิ์ connector
การยืนยันตัวตน
Server-to-Server OAuth (แนะนำ)
# Create a Server-to-Server OAuth app at marketplace.zoom.usexport ZOOM_ACCOUNT_ID=your_account_idexport ZOOM_CLIENT_ID=your_client_idexport ZOOM_CLIENT_SECRET=your_client_secret// Get access token via Server-to-Server OAuthconst tokenResponse = await fetch('https://zoom.us/oauth/token', { method: 'POST', headers: { 'Authorization': `Basic ${Buffer.from( `${process.env.ZOOM_CLIENT_ID}:${process.env.ZOOM_CLIENT_SECRET}` ).toString('base64')}`, 'Content-Type': 'application/x-www-form-urlencoded' }, body: new URLSearchParams({ grant_type: 'account_credentials', account_id: process.env.ZOOM_ACCOUNT_ID })});
const { access_token } = await tokenResponse.json();OAuth 2.0 (ระดับผู้ใช้)
// Authorization URL for user-level OAuthconst authUrl = 'https://zoom.us/oauth/authorize?' + new URLSearchParams({ client_id: process.env.ZOOM_CLIENT_ID, redirect_uri: 'https://your-app.com/callback', response_type: 'code' });
// Exchange code for tokensconst tokenResponse = await fetch('https://zoom.us/oauth/token', { method: 'POST', headers: { 'Authorization': `Basic ${Buffer.from( `${process.env.ZOOM_CLIENT_ID}:${process.env.ZOOM_CLIENT_SECRET}` ).toString('base64')}`, 'Content-Type': 'application/x-www-form-urlencoded' }, body: new URLSearchParams({ grant_type: 'authorization_code', code: authorizationCode, redirect_uri: 'https://your-app.com/callback' })});การกำหนดค่า
การตั้งค่าพื้นฐาน
connectors: zoom: enabled: true account_id: "${ZOOM_ACCOUNT_ID}" client_id: "${ZOOM_CLIENT_ID}" client_secret: "${ZOOM_CLIENT_SECRET}"
sync: participants: true webinars: true recordings: true
webhook: secret_token: "${ZOOM_WEBHOOK_SECRET}" verification_token: "${ZOOM_VERIFICATION_TOKEN}"
lists: meeting_participants: 15 webinar_attendees: 16 webinar_registrants: 17การแมปฟิลด์
field_mapping: email: email name: FIRSTNAME join_time: MEETING_JOIN_DATE duration: MEETING_DURATION webinar_title: WEBINAR_NAME attendance_status: ATTENDANCE_STATUS registration_source: UTM_SOURCEAPI Endpoints
| Endpoint | เมธอด | คำอธิบาย |
|---|---|---|
https://api.zoom.us/v2/users | GET | แสดงรายการผู้ใช้ |
https://api.zoom.us/v2/users/{userId}/meetings | GET | แสดงรายการประชุม |
https://api.zoom.us/v2/meetings/{meetingId} | GET | ดูรายละเอียดประชุม |
https://api.zoom.us/v2/past_meetings/{meetingId}/participants | GET | แสดงรายการผู้เข้าร่วมประชุมที่ผ่านมา |
https://api.zoom.us/v2/users/{userId}/webinars | GET | แสดงรายการ webinars |
https://api.zoom.us/v2/webinars/{webinarId}/registrants | GET | แสดงรายการผู้ลงทะเบียน webinar |
https://api.zoom.us/v2/webinars/{webinarId}/participants | GET | แสดงรายการผู้เข้าร่วม webinar |
https://api.zoom.us/v2/meetings/{meetingId}/recordings | GET | ดูการบันทึกประชุม |
https://api.zoom.us/v2/webhooks | POST | สมัครรับ webhooks |
ตัวอย่างโค้ด
เริ่มต้น Connector
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('zoom', { accountId: process.env.ZOOM_ACCOUNT_ID, clientId: process.env.ZOOM_CLIENT_ID, clientSecret: process.env.ZOOM_CLIENT_SECRET});ซิงค์ผู้เข้าร่วมประชุม
// Retrieve past meeting participantsconst response = await fetch( `https://api.zoom.us/v2/past_meetings/${meetingId}/participants`, { headers: { 'Authorization': `Bearer ${accessToken}`, 'Content-Type': 'application/json' } });
const { participants } = await response.json();
for (const participant of participants) { if (participant.user_email) { await tajo.contacts.sync({ email: participant.user_email, attributes: { FIRSTNAME: participant.name, MEETING_DURATION: participant.duration, MEETING_JOIN_DATE: participant.join_time, ATTENDANCE_STATUS: 'attended' }, listIds: [15] }); }}ซิงค์ผู้เข้าร่วม Webinar
// Get webinar attendees and sync to Brevoconst attendeesResponse = await fetch( `https://api.zoom.us/v2/past_webinars/${webinarId}/participants`, { headers: { 'Authorization': `Bearer ${accessToken}` } });
const { participants: attendees } = await attendeesResponse.json();
for (const attendee of attendees) { await tajo.contacts.sync({ email: attendee.user_email, attributes: { FIRSTNAME: attendee.name, WEBINAR_NAME: webinarTitle, ATTENDANCE_STATUS: 'attended', MEETING_DURATION: attendee.duration }, listIds: [16] });}จัดการ Zoom Webhooks
app.post('/webhooks/zoom', async (req, res) => { // Handle Zoom URL validation challenge if (req.body.event === 'endpoint.url_validation') { const hashForValidation = crypto .createHmac('sha256', process.env.ZOOM_WEBHOOK_SECRET) .update(req.body.payload.plainToken) .digest('hex');
return res.json({ plainToken: req.body.payload.plainToken, encryptedToken: hashForValidation }); }
// Verify webhook signature const message = `v0:${req.headers['x-zm-request-timestamp']}:${JSON.stringify(req.body)}`; const hash = crypto .createHmac('sha256', process.env.ZOOM_WEBHOOK_SECRET) .update(message) .digest('hex'); const signature = `v0=${hash}`;
if (req.headers['x-zm-signature'] !== signature) { return res.status(401).send('Unauthorized'); }
const { event, payload } = req.body;
await tajo.connectors.handleWebhook('zoom', { topic: event, payload: payload });
res.status(200).send('OK');});ขีดจำกัดอัตรา
| หมวดหมู่ | ขีดจำกัด | หมายเหตุ |
|---|---|---|
| Light API calls | 30 คำขอ/วินาที | GET ข้อมูลผู้ใช้ ประชุม |
| Medium API calls | 20 คำขอ/วินาที | แสดงรายการผู้เข้าร่วม webinars |
| Heavy API calls | 10 คำขอ/วินาที | Reports การบันทึก |
| ขีดจำกัดรายวัน | 5,000+ | ขึ้นอยู่กับระดับแผน |
Rate Limit Headers
Zoom ส่งคืน headers X-RateLimit-Limit, X-RateLimit-Remaining และ Retry-After ใช้ backoff logic ตาม headers เหล่านี้เพื่อหลีกเลี่ยงข้อผิดพลาด 429
การแก้ไขปัญหา
| ปัญหา | สาเหตุ | วิธีแก้ |
|---|---|---|
| 401 Unauthorized | Token หมดอายุ | Refresh Server-to-Server OAuth token |
| ผู้เข้าร่วมหายไป | ประชุมยังไม่สิ้นสุด | รอจนประชุมสิ้นสุดเพื่อข้อมูลที่สมบูรณ์ |
| การตรวจสอบ webhook ล้มเหลว | Secret ไม่ถูกต้อง | ตรวจสอบ webhook secret ใน Zoom Marketplace |
| ไม่มีข้อมูลอีเมล | ผู้เข้าร่วมเป็น Guest | เปิดใช้งาน registration เพื่อจับอีเมล |
| Rate limit 429 | คำขอมากเกินไป | ใช้ exponential backoff |
โหมด Debug
connectors: zoom: debug: true log_level: verbose log_webhooks: trueแนวทางปฏิบัติที่ดีที่สุด
- ใช้ Server-to-Server OAuth - การยืนยันตัวตนที่ง่ายกว่าโดยไม่ต้องมีการโต้ตอบกับผู้ใช้
- เปิดใช้งาน webinar registration - จำเป็นสำหรับการจับอีเมลของผู้เข้าร่วม
- ประมวลผลหลังประชุมสิ้นสุด - ข้อมูลผู้เข้าร่วมสมบูรณ์เฉพาะหลังประชุมสิ้นสุด
- แบ่งกลุ่มตามประเภทเหตุการณ์ - กำหนดรายการ Brevo ที่แตกต่างกันสำหรับการประชุม vs webinars
- ติดตาม engagement metrics - ใช้ระยะเวลาและเวลาเข้าร่วมสำหรับ lead scoring
- ส่งการติดตามการบันทึก - ทำให้การส่งลิงก์บันทึกผ่าน Brevo เป็นอัตโนมัติ
ความปลอดภัย
- OAuth 2.0 - Server-to-Server หรือ user-level OAuth authentication
- การตรวจสอบ webhook - การตรวจสอบลายเซ็น HMAC-SHA256
- การตรวจสอบ URL - การตรวจสอบ challenge-response สำหรับ webhook endpoints
- สิทธิ์ที่กำหนดขอบเขต - ขอ OAuth scopes ขั้นต่ำที่จำเป็น
- การหมุนเวียน token - Server-to-Server tokens หมดอายุอัตโนมัติ (1 ชั่วโมง)
- การส่งข้อมูลที่เข้ารหัส - TLS 1.2+ สำหรับการสื่อสาร API ทั้งหมด