How to Automate Social Media Posting with n8n and XenonFlare
In the world of content creation, consistency is key. But manually posting to TikTok, Instagram, YouTube, and LinkedIn every single day is a recipe for burnout. Enter n8n, a powerful workflow automation tool that, when combined with XenonFlare, can turn your content distribution into a hands-off machine.
This guide will walk you through setting up an n8n workflow to automatically fetch videos from a Google Drive folder and publish them across all your social channels using XenonFlare.
Why n8n?
n8n is a fair-code workflow automation tool that lets you connect anything to everything. Unlike Zapier or Make, n8n is open-source and can be self-hosted, giving you complete control over your data and costs. It's the perfect companion for developers and heavy users who need complex logic and unlimited executions.
The Workflow Overview
We'll build a workflow that does the following:
- Trigger: Checks a Google Drive folder for new video files every hour.
- Upload: Uploads the video file to XenonFlare to get a public URL.
- Distribute: Sends the video URL and metadata to XenonFlare's
/media/videosendpoint to post on multiple platforms simultaneously. - Notify: Sends a confirmation message to Slack or Discord.
Step 1: XenonFlare API Setup
First, ensure you have your XenonFlare API Key ready.
- Log in to your XenonFlare Dashboard.
- Go to Settings > API Keys.
- Create a new key and copy it.
Step 2: Configure the n8n HTTP Request
In n8n, add an HTTP Request node. This will be the heart of our automation.
Node Configuration:
- Method: POST
- URL:
https://api.xenonflare.com/media/videos - Authentication: Header Auth
- Header Name:
X-API-Key - Value:
YOUR_API_KEY
- Header Name:
Body Parameters:
You'll need to send a JSON body with your video details. Here's a template:
{
"video_url": "https://cdn.xenonflare.com/v/your-video-id.mp4",
"title": "My Awesome Automated Video",
"description": "Posted automatically via n8n and XenonFlare! #automation #n8n",
"platforms": ["tiktok", "youtube", "instagram", "linkedin"],
"schedule_time": "2026-02-20T12:00:00Z" // Optional: Schedule for later
}
Wait, where did we get the video_url? That's the next step!
Step 3: Handling File Uploads
XenonFlare requires a public URL for videos. If your videos are on Google Drive, you can use the Google Drive node in n8n to download the file, and then stream it to XenonFlare's upload endpoint.
- Google Drive Node: Use the "Download" operation.
- HTTP Request (Upload):
- Method: POST
- URL:
https://api.xenonflare.com/upload - Body Content Type: Form-Data
- Parameter Name:
file - Input Data: The binary data from the Google Drive node.
The response from this upload step will give you the url you need for the distribution step above.
Step 4: Multi-Platform Logic
One of XenonFlare's superpowers is platform-specific customization. You can pass specific options for each platform in your JSON body:
{
"youtube": {
"privacyStatus": "public",
"tags": ["automation", "tech"]
},
"instagram": {
"share_to_feed": true
},
"linkedin": {
"visibility": "PUBLIC"
}
}
In n8n, you can build this JSON dynamically using the Set node or a Function node, pulling titles and descriptions from a Google Sheet or Airtable base.
Conclusion
By setting up this one-time workflow, you've effectively hired a digital social media manager that works 24/7. n8n handles the logic, and XenonFlare handles the heavy lifting of video processing and API compliance.
Ready to automate? Get your API Key and start building!
