πŸ“± Schedule social media posts from local files using UploadToURL, OpenAI, and Buffer

⚑ 130 views Β· πŸ“± Social Media & Email Marketing

πŸ’‘ Pro Tip β€” Since TikTok doesn’t have a public API, getting data usually means fragile HTTP scraping. ScraperNode is a community node that gives you clean JSON for TikTok profiles, videos, and comments β€” drop it into your workflow and skip the parsing.

View All Scrapers

Description

Schedule social media posts from local files using UploadToURL, OpenAI, and Buffer

Marketing teams often have design files sitting locally β€” campaign images, product videos, event graphics β€” that need to be published on social media. The usual process means downloading files, switching apps, uploading to each platform separately, and writing captions by hand. This workflow removes those steps.

Send a file link or binary upload to the webhook. UploadToURL hosts it instantly and returns a clean public URL. OpenAI GPT-4.1 mini reads the filename and context to generate a platform-specific caption, hashtags, alt text, and a scroll-stopping hook. A Switch node routes to the correct Buffer profile β€” Twitter/X, Instagram, or LinkedIn β€” and the post is scheduled at the AI-suggested best time.

What this workflow does

  1. Receives a file URL or binary upload via webhook along with platform, tone, and brand preferences
  2. Validates the payload β€” checks the platform, detects content type from the file extension, cleans the filename into readable words for the AI prompt
  3. Uploads the file to UploadToURL and retrieves a permanent public link
  4. Sends the link and context to OpenAI, which returns a structured JSON caption with hashtags, alt text, a hook line, and a UTC posting time
  5. Routes to the correct Buffer profile based on the platform field
  6. Schedules the post and returns a confirmation with the schedule ID, caption, hashtags, and estimated engagement

Who this is for

Setup

  1. Install the UploadToURL community node: n8n-nodes-uploadtourl
  2. Add credentials for UploadToURL API, OpenAI API, and Buffer (as HTTP Header Auth with your Buffer access token)
  3. Set three workflow variables: BUFFER_PROFILE_TWITTER, BUFFER_PROFILE_INSTAGRAM, BUFFER_PROFILE_LINKEDIN β€” find these IDs in your Buffer account under each profile’s settings
  4. Activate and copy the webhook URL

Webhook payload

{
  "fileUrl": "https://cdn.example.com/summer-campaign.jpg",
  "filename": "summer-campaign.jpg",
  "platform": "instagram",
  "tone": "casual",
  "brand": "Acme Studio",
  "hashtags": true
}

To upload a binary file instead, send as multipart/form-data with field name file and omit fileUrl. Pass scheduleTime as an ISO 8601 string to override the AI scheduling suggestion.

Notes

πŸ”— Nodes Used

HTTP Request, Webhook, OpenAI

πŸ“₯ Import

Download workflow.json and import into n8n: Workflow menu β†’ Import from File

πŸ“– Importing guide Β· πŸ”‘ Credential setup