Hướng dẫn

How to Connect Airtable to Social Media

Airtable is where most teams plan their social content. But publishing still means copying captions into schedulers one by one. This guide shows you how to publish directly from your Airtable base to TikTok, Instagram, YouTube and 7 more platforms, using nothing but a script and the Upload-Post API.

Tại sao nên kết nối Airtable với mạng xã hội

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 API mạng xã hội của Upload-Post 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.

Thiết lập cơ sở Airtable của bạn

Start with a table called "Lịch nội dung" (or whatever fits your workflow). Here is the recommended column structure:

Cột Loại Trường Mục đích
URL VideoURLLiên kết công khai đến tệp video (Google Drive, Dropbox, S3, v.v.)
Chú thíchVăn bản dàiĐăng chú thích / tiêu đề cho tất cả các nền tảng
Nền tảngChọn nhiềutiktok, instagram, youtube, linkedin, facebook, x, threads, pinterest
Ngày đã lên lịchNgày (có thời gian)Khi nào bài viết nên được công bố (để trống cho ngay lập tức)
Trạng tháiChọn mộtNháp / Sẵn sàng / Đã phê duyệt / Đã xuất bản / Thất bại
ID công việcVăn bản một dòngTrả về bởi API sau khi tải lên (để theo dõi)

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.

Xuất bản từ Airtable bằng cách sử dụng tiện ích mở rộng 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('Lịch nội dung');
let query = await table.selectRecordsAsync();
let record = query.records.find(r => r.getCellValue('Trạng thái')?.name === 'Ready');

if (!record) {
  output.text('No records with Status = Ready');
} else {
  let formData = new FormData();
  formData.append('video_url', record.getCellValue('URL Video'));
  formData.append('title', record.getCellValue('Chú thích'));
  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: { 'Ủy quyền': 'Khóa API your-api-key-here' },
    body: formData
  });

  let result = await response.json();
  await table.updateRecordAsync(record, {
    'Trạng thái': { name: 'Đã xuất bản' },
    'ID công việc': 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.

Kích hoạt với Tự động hóa 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:

  1. Đi đến Tự động hóa trong cơ sở Airtable của bạn
  2. Tạo một tự động hóa mới
  3. Kích hoạt: "Khi bản ghi phù hợp với điều kiện" với Trạng thái = "Đã phê duyệt"
  4. Hành động: "Chạy kịch bản"
  5. 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('Lịch nội dung');
let record = await table.selectRecordAsync(inputConfig.recordId);

let platforms = record.getCellValue('Nền tảng');
let formData = new FormData();
formData.append('video_url', record.getCellValue('URL Video'));
formData.append('title', record.getCellValue('Chú thích'));
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: { 'Ủy quyền': 'Khóa API your-api-key-here' },
  body: formData
});

let result = await response.json();
await table.updateRecordAsync(record.id, {
  'Trạng thái': { name: 'Đã xuất bản' },
  'ID công việc': 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.

Lên lịch bài đăng từ 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('Ngày đã lên lịch');

if (scheduledDate) {
  formData.append('scheduled_date', new Date(scheduledDate).toISOString());
  formData.append('timezone', 'America/New_York');
}

// 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.

Sử dụng n8n như một cầu nối cho các quy trình làm việc phức tạp

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:

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.

Xuất bản toàn bộ lịch nội dung theo lô

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('Lịch nội dung');
let query = await table.selectRecordsAsync();
let readyRecords = query.records.filter(
  r => r.getCellValue('Trạng thái')?.name === 'Ready'
);

output.text('Found ' + readyRecords.length + ' records to publish');

for (let record of readyRecords) {
  let platforms = record.getCellValue('Nền tảng');
  let formData = new FormData();
  formData.append('video_url', record.getCellValue('URL Video'));
  formData.append('title', record.getCellValue('Chú thích'));
  formData.append('user', 'mybrand');

  for (let p of platforms) {
    formData.append('platform[]', p.name.toLowerCase());
  }

  let scheduledDate = record.getCellValue('Ngày đã lên lịch');
  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: { 'Ủy quyền': 'Khóa API your-api-key-here' },
      body: formData
    });
    let result = await response.json();
    await table.updateRecordAsync(record, {
      'Trạng thái': { name: 'Đã xuất bản' },
      'ID công việc': result.job_id
    });
    output.text('Published: ' + record.getCellValue('Chú thích'));
  } catch (err) {
    await table.updateRecordAsync(record, {
      'Trạng thái': { name: 'Thất bại' }
    });
    output.text('Failed: ' + record.getCellValue('Chú thích'));
  }
}

For large volumes, see our guide on bulk uploading videos to social media. If you prefer Python for batch operations, the Hướng dẫn tự động hóa Python covers building a script that reads from Airtable\'s REST API.

Theo dõi trạng thái tải lên trở lại trong 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('Lịch nội dung');
let query = await table.selectRecordsAsync();
let pendingRecords = query.records.filter(
  r => r.getCellValue('Trạng thái')?.name === 'Đã xuất bản'
    && r.getCellValue('ID công việc')
);

for (let record of pendingRecords) {
  let jobId = record.getCellValue('ID công việc');
  let response = await fetch(
    'https://api.upload-post.com/api/uploadposts/status?job_id=' + jobId,
    { headers: { 'Ủy quyền': 'Khóa API your-api-key-here' } }
  );
  let status = await response.json();

  if (status.status === 'completed') {
    await table.updateRecordAsync(record, {
      'Trạng thái': { name: 'Live' }
    });
  } else if (status.status === 'failed') {
    await table.updateRecordAsync(record, {
      'Trạng thái': { name: 'Thất bại' }
    });
  }
}

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.

Mẹo cụ thể của nền tảng

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_photos for image posts.
  • YouTube: Add youtube_description for a longer description separate from the main caption.
  • LinkedIn: Professional tone matters. Consider a separate "Chú thích 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.

Câu hỏi thường gặp

Điều này có hoạt động với gói miễn phí của Airtable không?

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.

Tôi có thể đính kèm video trực tiếp trong Airtable thay vì sử dụng URL không?

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.

Tôi có thể xử lý bao nhiêu bản ghi trong một lô?

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 Cách tiếp cận Python to process records outside Airtable\'s timeout constraints.

Tôi có thể sử dụng Google Sheets thay vì Airtable không?

Absolutely. If you prefer spreadsheets, follow our Hướng dẫn xuất bản 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.

Còn ảnh và băng chuyền thì sao?

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.

Biến cơ sở Airtable của bạn thành một công cụ xuất bản

Plan in Airtable. Publish everywhere. Create a free Upload-Post account and connect it to your content calendar in minutes.

Không cần thẻ tín dụng. Bao gồm 10 lượt tải lên miễn phí.