ทำไมต้องเชื่อมต่อ Airtable กับโซเชียลมีเดีย
Airtable is arguably the best content calendar tool available. It has views, filters, linked records, color coding, and just the right amount of structure. Most marketing teams already plan their content there. The problem is the last mile: once a post is approved in Airtable, someone still has to open a scheduler, paste the caption, upload the video, pick the platforms, and hit publish. For every single post.
The Upload-Post API โซเชียลมีเดีย bridges that gap. It accepts a video URL, a caption, and a list of platforms, then publishes to all of them in one request. Combined with Airtable\'s built-in Scripting extension or Automations, you can go from "Approved" in your base to "Live on 10 platforms" without leaving your browser.
ตั้งค่า Airtable ของคุณ
Start with a table called "ปฏิทินเนื้อหา" (or whatever fits your workflow). Here is the recommended column structure:
| คอลัมน์ | ประเภทฟิลด์ | วัตถุประสงค์ |
|---|---|---|
| URL วิดีโอ | URL | ลิงก์สาธารณะไปยังไฟล์วิดีโอ (Google Drive, Dropbox, S3, ฯลฯ) |
| คำบรรยาย | Long text | โพสต์คำบรรยาย / ชื่อสำหรับทุกแพลตฟอร์ม |
| แพลตฟอร์ม | เลือกหลายรายการ | tiktok, instagram, youtube, linkedin, facebook, x, threads, pinterest |
| วันที่กำหนดเวลา | วันที่ (พร้อมเวลา) | เมื่อไหร่ที่โพสต์ควรเผยแพร่ (เว้นว่างไว้สำหรับการเผยแพร่ทันที) |
| สถานะ | เลือกเพียงหนึ่ง | ร่าง / พร้อม / อนุมัติ / เผยแพร่ / ล้มเหลว |
| รหัสงาน | ข้อความบรรทัดเดียว | ส่งกลับโดย API หลังจากการอัปโหลด (สำหรับติดตาม) |
The Status field is the key driver. Your team changes it to "Approved" when a post is ready to go, and the automation picks it up from there. Use the social media holiday calendar to plan content around key dates.
เผยแพร่จาก Airtable โดยใช้ส่วนขยาย Scripting
Airtable ships with a Scripting extension that runs JavaScript directly inside your base. No external tools needed. Open your base, click Extensions, add "Scripting", and paste the following code:
// Airtable Scripting Extension
let table = base.getTable('ปฏิทินเนื้อหา');
let query = await table.selectRecordsAsync();
let record = query.records.find(r => r.getCellValue('สถานะ')?.name === 'Ready');
if (!record) {
output.text('No records with Status = Ready');
} else {
let formData = new FormData();
formData.append('video_url', record.getCellValue('URL วิดีโอ'));
formData.append('title', record.getCellValue('คำบรรยาย'));
formData.append('user', 'mybrand');
formData.append('platform[]', 'tiktok');
formData.append('platform[]', 'instagram');
let response = await fetch('https://api.upload-post.com/api/upload', {
method: 'POST',
headers: { 'การอนุญาต': 'Apikey your-api-key-here' },
body: formData
});
let result = await response.json();
await table.updateRecordAsync(record, {
'สถานะ': { name: 'เผยแพร่แล้ว' },
'รหัสงาน': result.job_id
});
output.text('Published! Job ID: ' + result.job_id);
} This script finds the first record with Status "Ready", sends the video URL and caption to the social media posting API, then updates the record with the returned job ID. You can run it manually whenever you want, or wire it into an automation (next section).
For multi-platform publishing, read the Platforms field dynamically instead of hardcoding. See our guide on posting to multiple platforms at once for all available platform values.
ทริกเกอร์ด้วยการทำงานอัตโนมัติของ Airtable
Manual scripts are useful, but real airtable social media automation means hands-off publishing. Airtable Automations let you trigger a script whenever a record matches certain conditions. Here is how to set it up:
- ไปที่การทำงานอัตโนมัติในฐาน Airtable ของคุณ
- สร้างการทำงานอัตโนมัติใหม่
- ทริกเกอร์: "เมื่อระเบียนตรงตามเงื่อนไข" โดยมีสถานะ = "อนุมัติ"
- การดำเนินการ: "รันสคริปต์"
- In the script, use
input.config()to receive the record ID from the trigger
// Airtable Automation Script
let inputConfig = input.config();
let table = base.getTable('ปฏิทินเนื้อหา');
let record = await table.selectRecordAsync(inputConfig.recordId);
let platforms = record.getCellValue('แพลตฟอร์ม');
let formData = new FormData();
formData.append('video_url', record.getCellValue('URL วิดีโอ'));
formData.append('title', record.getCellValue('คำบรรยาย'));
formData.append('user', 'mybrand');
for (let p of platforms) {
formData.append('platform[]', p.name.toLowerCase());
}
let response = await fetch('https://api.upload-post.com/api/upload', {
method: 'POST',
headers: { 'การอนุญาต': 'Apikey your-api-key-here' },
body: formData
});
let result = await response.json();
await table.updateRecordAsync(record.id, {
'สถานะ': { name: 'เผยแพร่แล้ว' },
'รหัสงาน': result.job_id
}); Now, whenever someone changes a record\'s status to "Approved", the automation fires, calls the Upload-Post API, and updates the record. This creates a content approval workflow: your team drafts in Airtable, a manager approves, and the post goes live automatically. No manual steps, no schedulers, no copy-pasting.
กำหนดเวลาโพสต์จาก Airtable
If you want to publish at a specific date and time instead of immediately, read the Scheduled Date field and pass it as scheduled_date to the API. This is how you turn Airtable into a full social media scheduling tool.
// Add scheduling support
let scheduledDate = record.getCellValue('วันที่กำหนดเวลา');
if (scheduledDate) {
formData.append('scheduled_date', new Date(scheduledDate).toISOString());
formData.append('timezone', 'อเมริกา/นิวยอร์ก');
}
// Or use the queue for automatic optimal timing
formData.append('add_to_queue', 'true');
The add_to_queue=true parameter tells Upload-Post to pick the next available time slot, so your posts are spaced out rather than all going live at once. Read more about scheduling options in our scheduling guide. You can also check our dedicated guides for scheduling TikTok posts and automating Instagram posts.
ใช้ n8n เป็นสะพานสำหรับเวิร์กโฟลว์ที่ซับซ้อน
For teams that need more logic between Airtable and publishing (approvals via Slack, AI-generated captions, watermark removal), n8n is the right tool. n8n can watch your Airtable base for new or updated records, process them through any number of steps, and then call the Upload-Post API.
We have a ready-made template that does exactly this:
- Google Drive ไปยัง Instagram, TikTok และ YouTube พร้อมคำอธิบาย AI และการติดตาม Airtable
- กำหนดเวลาและโพสต์วิดีโออัตโนมัติจาก Google Sheets ไปยัง Instagram, LinkedIn และ TikTok
Browse the full n8n template library for more workflows. If you prefer visual builders, our Make.com and Zapier integrations also work with Airtable as a trigger.
เผยแพร่ปฏิทินเนื้อหาแบบกลุ่มทั้งหมด
Instead of publishing one record at a time, you can loop through every record with Status "Ready" and publish them all in a single script run. This is useful for weekly batch uploads or when you have a backlog to clear.
// Batch publish all Ready records
let table = base.getTable('ปฏิทินเนื้อหา');
let query = await table.selectRecordsAsync();
let readyRecords = query.records.filter(
r => r.getCellValue('สถานะ')?.name === 'Ready'
);
output.text('Found ' + readyRecords.length + ' records to publish');
for (let record of readyRecords) {
let platforms = record.getCellValue('แพลตฟอร์ม');
let formData = new FormData();
formData.append('video_url', record.getCellValue('URL วิดีโอ'));
formData.append('title', record.getCellValue('คำบรรยาย'));
formData.append('user', 'mybrand');
for (let p of platforms) {
formData.append('platform[]', p.name.toLowerCase());
}
let scheduledDate = record.getCellValue('วันที่กำหนดเวลา');
if (scheduledDate) {
formData.append('scheduled_date', new Date(scheduledDate).toISOString());
}
try {
let response = await fetch('https://api.upload-post.com/api/upload', {
method: 'POST',
headers: { 'การอนุญาต': 'Apikey your-api-key-here' },
body: formData
});
let result = await response.json();
await table.updateRecordAsync(record, {
'สถานะ': { name: 'เผยแพร่แล้ว' },
'รหัสงาน': result.job_id
});
output.text('Published: ' + record.getCellValue('คำบรรยาย'));
} catch (err) {
await table.updateRecordAsync(record, {
'สถานะ': { name: 'ล้มเหลว' }
});
output.text('Failed: ' + record.getCellValue('คำบรรยาย'));
}
} For large volumes, see our guide on bulk uploading videos to social media. If you prefer Python for batch operations, the คู่มือการทำงานอัตโนมัติด้วย Python covers building a script that reads from Airtable\'s REST API.
ติดตามสถานะการอัปโหลดกลับใน Airtable
After submitting an upload, the video may take a few seconds to process and distribute to each platform. You can poll the status endpoint and write the result back into your Airtable record:
// Check upload status and update Airtable
let table = base.getTable('ปฏิทินเนื้อหา');
let query = await table.selectRecordsAsync();
let pendingRecords = query.records.filter(
r => r.getCellValue('สถานะ')?.name === 'เผยแพร่แล้ว'
&& r.getCellValue('รหัสงาน')
);
for (let record of pendingRecords) {
let jobId = record.getCellValue('รหัสงาน');
let response = await fetch(
'https://api.upload-post.com/api/uploadposts/status?job_id=' + jobId,
{ headers: { 'การอนุญาต': 'Apikey your-api-key-here' } }
);
let status = await response.json();
if (status.status === 'completed') {
await table.updateRecordAsync(record, {
'สถานะ': { name: 'Live' }
});
} else if (status.status === 'failed') {
await table.updateRecordAsync(record, {
'สถานะ': { name: 'ล้มเหลว' }
});
}
} Run this as a separate Scripting extension button or set it on a timed automation (e.g., every 10 minutes) to keep your Airtable base in sync with actual post statuses. This gives you a full audit trail without checking each platform\'s dashboard individually.
เคล็ดลับเฉพาะแพลตฟอร์ม
When connecting your Airtable content calendar to social media, each platform has its own quirks:
- TikTok: Include hashtags in the caption. The API handles TikTok\'s upload flow automatically, including disclosure settings.
- Instagram: Works for Reels (video) and photo carousels. Use
/api/upload_photosfor image posts. - YouTube: Add
youtube_descriptionfor a longer description separate from the main caption. - LinkedIn: Professional tone matters. Consider a separate "คำบรรยาย LinkedIn" column in Airtable.
Compare this approach to traditional tools like Hootsuite: you get full control, zero per-platform limits, and everything stays in Airtable where your team already works.
คำถามที่พบบ่อย
สิ่งนี้ทำงานกับแผน Airtable ฟรีหรือไม่?
Yes. The Scripting extension and Automations are both available on Airtable\'s free plan. The free plan limits you to 100 automation runs per month, which is enough for small teams. Paid Airtable plans increase that limit significantly.
ฉันสามารถแนบวิดีโอโดยตรงใน Airtable แทนการใช้ URL ได้หรือไม่?
The Scripting extension can read attachment fields, but it is simpler to use a URL column pointing to a cloud-hosted file (Google Drive, Dropbox, S3). The Upload-Post API accepts both direct file uploads and URLs, but URLs are easier to work with in Airtable scripts.
ฉันสามารถประมวลผลข้อมูลได้กี่เรคคอร์ดในหนึ่งชุด?
There is no hard limit from the Upload-Post side. However, Airtable Scripting extensions have a 30-second timeout for free plans. For large batches (50+ records), consider using n8n or the แนวทาง Python to process records outside Airtable\'s timeout constraints.
ฉันสามารถใช้ Google Sheets แทน Airtable ได้หรือไม่?
Absolutely. If you prefer spreadsheets, follow our คู่มือการเผยแพร่ Google Sheets. It uses the same Upload-Post API with n8n or Make.com as a bridge. The concepts are identical; only the data source changes.
แล้วรูปภาพและคารูเซลล่ะ?
For image posts (single photos or carousels), use the /api/upload_photos endpoint instead of /api/upload. Add a separate column in Airtable for image URLs. The script logic is the same; just change the endpoint and use photos[] instead of video_url.