Blotato Posting Skill
Use this skill when you need to post content to social media platforms via the Blotato API.
Setup
- Get a Blotato API key from your Blotato account dashboard.
- Set the environment variable:
export BLOTATO_API_KEY="your_key_here" - In your Blotato dashboard, connect the platforms you want to post to.
Python Library Usage
from post import post_to_platform
# LinkedIn
result = post_to_platform("linkedin", {
"text": "Your post text here."
})
# X single post
result = post_to_platform("x", {
"text": "Your tweet here."
})
# X thread
result = post_to_platform("x", {
"type": "thread",
"tweets": ["Thread opener", "Tweet 2", "Tweet 3"]
})
# TikTok
result = post_to_platform("tiktok", {
"caption": "Caption with hashtags #ai",
"script": "Spoken script for the video"
})
# Instagram Reel
result = post_to_platform("instagram", {
"type": "reel",
"caption": "Caption here"
})
# Instagram Carousel
result = post_to_platform("instagram", {
"type": "carousel",
"caption": "Caption here",
"slides": ["Slide 1 text", "Slide 2 text", "Slide 3 text"]
})
# YouTube
result = post_to_platform("youtube", {
"title": "Video Title Here",
"description": "Full description text",
"pinned_comment": "Optional pinned comment"
})
# Threads
result = post_to_platform("threads", {
"text": "Your Threads post here."
})
# Check result
if result["status"] == "posted":
print(f"Posted! ID: {result['post_id']}")
else:
print(f"Failed: {result['error']}")
CLI Usage
# LinkedIn
python3 post.py --platform linkedin --content '{"text": "Your post here."}'
# X thread
python3 post.py --platform x --content '{"type": "thread", "tweets": ["Tweet 1", "Tweet 2"]}'
# Dry run (prints payload, does not post)
python3 post.py --platform linkedin --content '{"text": "test"}' --dry-run
Per-Platform Content Fields
See platforms.md for the full field reference. Quick summary:
| Platform | Required Fields |
|---|---|
| tiktok | caption, script |
| instagram (reel) | caption |
| instagram (carousel) | caption, slides (list) |
| youtube | title, description |
| x (post) | text |
| x (thread) | tweets (list) |
| threads | text |
| text |
Response Format
Every call returns:
{
"platform": "linkedin",
"status": "posted",
"post_id": "abc123",
"blotato_response": { ... }
}
status is one of: "posted" | "failed" | "dry_run"
On failure, error key is present with the reason.
Error Handling
| Error | Cause | Fix |
|---|---|---|
HTTP 401 |
Bad API key | Check BLOTATO_API_KEY value |
HTTP 403 |
Platform not connected | Connect platform in Blotato dashboard |
HTTP 400 |
Invalid payload | Check required fields in platforms.md |
HTTP 429 |
Rate limited | Wait and retry |
HTTP 5xx |
Blotato server error | Retry after a delay |
BLOTATO_API_KEY not set |
Missing env var | Set the env var |
Files
| File | Purpose |
|---|---|
post.py |
Core Blotato API library + CLI |
platforms.md |
Per-platform field reference and examples |
README.md |
Setup guide and quick-start examples |