คู่มือ

How to Bulk Upload Videos to Social Media

You\'ve got 50 videos sitting in a folder. Maybe they\'re product demos, client reels, or AI generated clips. Uploading them one by one to every platform would take hours. Here\'s how to do it in minutes using a script, the queue system, or visual automation tools.

แนวทาง: ลูป, อัปโหลด, คิว

The idea is straightforward. You take a list of video files, loop through them, and send each one to the social media API. To avoid flooding your audience with 50 posts at once, you use the queue system so they get distributed throughout the week at the best times.

There are three ways to do this depending on your technical comfort level:

  1. สคริปต์ Python หรือ Bash for full control
  2. n8n with Google Drive for a visual, no code workflow
  3. Make.com for similar automation with a different interface

มาดูทั้งสามกันเถอะ

วิธีการ 1: สคริปต์อัปโหลดแบบแบตช์ด้วย Python

This is the most flexible option. You point the script at a folder of videos and it uploads each one with the queue enabled. Install the SDK first:

pip install upload-post

จากนั้นรันสคริปต์นี้:

import os
import glob
from upload_post import UploadPostClient

client = UploadPostClient(api_key="your-api-key-here")

video_folder = "/path/to/your/videos"
videos = glob.glob(os.path.join(video_folder, "*.mp4"))

print(f"พบ {len(videos)} วิดีโอสำหรับการอัปโหลด")

for i, video_path in enumerate(videos):
    filename = os.path.basename(video_path)
    title = filename.replace(".mp4", "").replace("-", " ").replace("_", " ")

    try:
        response = client.upload_video(
            video_path=video_path,
            title=title,
            user="mybrand",
            platforms=["tiktok", "instagram", "youtube"],
            add_to_queue=True,
            async_upload=True
        )
        job_id = response.get("job_id", "async")
        print(f"[{i+1}/{len(videos)}] Queued: {filename} (Job: {job_id})")
    except Exception as e:
        print(f"[{i+1}/{len(videos)}] Failed: {filename} - {e}")

print("วิดีโอทั้งหมดอยู่ในคิว!")

A few things to note about this script. The add_to_queue=True flag means each video gets assigned to the next available slot in your queue schedule. And async_upload=True makes each call return immediately instead of waiting for all platforms to finish processing. This is important for bulk operations because a synchronous upload that takes more than 59 seconds will automatically switch to async anyway.

วิธีการ 1b: สคริปต์ Bash ด้วย cURL

If you prefer the command line and don\'t want to install Python, a simple Bash loop does the same thing:

#!/bin/bash
API_KEY="your-api-key-here"
VIDEO_DIR="/path/to/your/videos"

for video in "$VIDEO_DIR"/*.mp4; do
    filename=$(basename "$video" .mp4)
    echo "Uploading: $filename"

    curl -s -X POST https://api.upload-post.com/api/upload \
      -H "การอนุญาต: Apikey $API_KEY" \
      -F "video=@$video" \
      -F "user=mybrand" \
      -F "title=$filename" \
      -F "platform[]=tiktok" \
      -F "platform[]=instagram" \
      -F "add_to_queue=true" \
      -F "async_upload=true"

    echo ""
done

echo "เสร็จแล้ว! วิดีโอทั้งหมดอยู่ในคิว"

วิธีการ 2: n8n กับ Google Drive (ไม่ต้องเขียนโค้ด)

This is the best option if you want a visual workflow that runs automatically whenever new videos appear in a folder. The flow is: Google Drive detects a new file, downloads it, sends it to Upload-Post, and queues it for publishing.

We have a ready made template for Google Drive to social media that you can import into your n8n instance with one click. There\'s also a more advanced version that uses คำอธิบายที่สร้างโดย AI และการติดตาม Airtable.

If you want to build it yourself, check the n8n integration guide for the step by step setup. The key is configuring the HTTP Request node with multipart form data and passing the binary file from the Google Drive node.

For AI powered content, there\'s even a template that auto publishes videos with AI generated captions in bulk.

วิธีการ 3: การทำงานอัตโนมัติของ Make.com

Make.com (formerly Integromat) works similarly. You create a scenario with a Google Drive or Dropbox trigger, connect it to an HTTP module configured for the Upload-Post API, and set it to run on a schedule or whenever new files are detected.

The HTTP module needs to be set to multipart/form-data content type, with your API key as a custom header. Browse our แม่แบบ Make.com for prebuilt scenarios.

กำลังประมวลผลวิดีโอก่อนการอัปโหลด

Sometimes your source videos aren\'t in the right format. Maybe they\'re too long, the wrong aspect ratio, or encoded in a codec that TikTok doesn\'t accept. Instead of processing them locally, you can use the Upload-Post API แก้ไข FFmpeg to transform videos in the cloud before publishing.

For example, you can crop a landscape video to vertical 9:16, trim it to 60 seconds for YouTube Shorts, or re-encode to H.264 for maximum compatibility:

curl -X POST https://api.upload-post.com/api/uploadposts/ffmpeg/jobs/upload \
  -H "การอนุญาต: Apikey your-api-key-here" \
  -F "[email protected]" \
  -F 'full_command=ffmpeg -i {input} -vf "crop=ih*9/16:ih,scale=1080:1920" -c:v libx264 -preset medium -t 60 {output}' \
  -F "output_extension=mp4"

The FFmpeg API is included in all plans (30 free minutes per month on the free plan, up to 10,000 minutes on Business).

ติดตามการอัปโหลดแบบกลุ่มของคุณ

When you\'re uploading dozens of videos, you need to track what\'s going through and what failed. There are two ways:

กำลังตรวจสอบจุดสิ้นสุดสถานะ

curl https://api.upload-post.com/api/uploadposts/status?request_id=abc123 \
  -H "การอนุญาต: Apikey your-api-key-here"

The response includes completed and total counts so you can see progress in real time.

กำลังตั้งค่า webhook

For a hands off approach, configure a webhook URL and Upload-Post will ping your server every time a platform upload finishes. Each notification includes the platform, post URL, and success/error status.

ประวัติการอัปโหลด

You can also review everything that\'s been uploaded with the history endpoint:

curl "https://api.upload-post.com/api/uploadposts/history?page=1&limit=50" \
  -H "การอนุญาต: Apikey your-api-key-here"

Each entry shows the platform, timestamp, success status, post URL, file size and any error messages. This is great for building reports or auditing your uploads.

เคล็ดลับสำหรับการอัปโหลดจำนวนมากในระดับใหญ่

  • Always use async_upload=true for bulk operations. Synchronous uploads work fine for single posts, but you don\'t want to wait for 10 platforms to process before sending the next file.
  • ใช้คิวแทนวันที่แน่นอน unless you have specific timing requirements. The queue distributes content evenly and respects platform daily limits.
  • ดูขีดจำกัดรายวัน. TikTok allows 15 uploads per day per account, YouTube allows 10. If you queue 50 TikTok videos, they\'ll be spread across multiple days automatically.
  • ตั้งชื่อไฟล์ของคุณให้มีความหมาย If you use the filename as the post title (like the scripts above), "summer-collection-lookbook.mp4" looks much better than "VID_20250615_001.mp4".
  • ใช้ชื่อที่เฉพาะเจาะจงสำหรับแพลตฟอร์ม when captions need to differ. Set tiktok_title for a shorter caption and youtube_description for a longer one with SEO keywords.

คำถามที่พบบ่อย

มีขีดจำกัดในการอัปโหลดวิดีโอจำนวนมากในครั้งเดียวหรือไม่?

There\'s no hard limit on how many API requests you can send. However, each platform has daily upload limits (15 for TikTok, 10 for YouTube, etc.). The queue system handles this automatically by spreading posts across days.

ฉันสามารถอัปโหลดวิดีโอจาก URL แทนที่จะเป็นไฟล์ในเครื่องได้หรือไม่?

Yes. Instead of passing a file with -F "[email protected]", you can pass a public URL as the video parameter. Upload-Post will download and process it for you.

ขนาดไฟล์สูงสุดคือเท่าไหร่?

It depends on the platform. YouTube accepts up to 256GB, TikTok up to 4GB, and Instagram up to 300MB. Check the video requirements page for the full breakdown.

อัปโหลดวิดีโอทั้งหมดของคุณในครั้งเดียว

Stop spending hours on manual uploads. Batch your content, hit the API, and let the queue handle the rest. Set up takes 5 minutes.

ไม่ต้องใช้บัตรเครดิต รวมการอัปโหลดฟรี 10 ครั้ง