/hootsuite-pack:hootsuite-core-workflow-afrom hootsuite-pack
Schedules social media posts with images/videos via the Hootsuite REST API. Uploads media, checks status, then creates scheduled messages.
Ships in hootsuite-pack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Schedule social media posts with images and videos using the Hootsuite REST API. The publishing workflow involves: uploading media to get a media ID, then scheduling a message referencing that media.
hootsuite-install-auth setup// publishing.ts
import 'dotenv/config';
import fs from 'fs';
const TOKEN = process.env.HOOTSUITE_ACCESS_TOKEN!;
const BASE = 'https://platform.hootsuite.com/v1';
// Step 1a: Create upload URL
async function createMediaUpload(sizeBytes: number, mimeType: string) {
const response = await fetch(`${BASE}/media`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ sizeBytes, mimeType }),
});
const { data } = await response.json();
console.log('Upload URL:', data.uploadUrl);
console.log('Media ID:', data.id);
return data; // { id, uploadUrl, uploadUrlDurationSeconds }
}
// Step 1b: Upload file to the S3 URL
async function uploadFile(uploadUrl: string, filePath: string, mimeType: string) {
const fileBuffer = fs.readFileSync(filePath);
const response = await fetch(uploadUrl, {
method: 'PUT',
headers: { 'Content-Type': mimeType },
body: fileBuffer,
});
if (response.status !== 200) throw new Error(`Upload failed: ${response.status}`);
console.log('File uploaded successfully');
}
// Step 1c: Check media status
async function getMediaStatus(mediaId: string) {
const response = await fetch(`${BASE}/media/${mediaId}`, {
headers: { 'Authorization': `Bearer ${TOKEN}` },
});
const { data } = await response.json();
console.log('Media state:', data.state); // PENDING, READY, REJECTED
return data;
}
async function scheduleWithMedia(config: {
profileIds: string[];
text: string;
mediaIds: string[];
scheduledAt: Date;
}) {
const response = await fetch(`${BASE}/messages`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
text: config.text,
socialProfileIds: config.profileIds,
scheduledSendTime: config.scheduledAt.toISOString(),
mediaUrls: config.mediaIds.map(id => ({ id })),
emailNotification: false,
}),
});
const result = await response.json();
for (const msg of result.data) {
console.log(`Message ${msg.id}: ${msg.state} → ${msg.scheduledSendTime}`);
}
return result;
}
async function publishPostWithImage(
profileId: string,
text: string,
imagePath: string,
scheduledAt: Date
) {
// 1. Create upload URL
const stats = fs.statSync(imagePath);
const mimeType = imagePath.endsWith('.png') ? 'image/png' : 'image/jpeg';
const media = await createMediaUpload(stats.size, mimeType);
// 2. Upload file to S3
await uploadFile(media.uploadUrl, imagePath, mimeType);
// 3. Wait for media processing
let status = await getMediaStatus(media.id);
while (status.state === 'PENDING') {
await new Promise(r => setTimeout(r, 2000));
status = await getMediaStatus(media.id);
}
if (status.state !== 'READY') {
throw new Error(`Media rejected: ${status.state}`);
}
// 4. Schedule post with media
return scheduleWithMedia({
profileIds: [profileId],
text,
mediaIds: [media.id],
scheduledAt,
});
}
interface ScheduledPost {
text: string;
profileIds: string[];
scheduledAt: Date;
imagePath?: string;
}
async function bulkSchedule(posts: ScheduledPost[]) {
const results = [];
for (const post of posts) {
if (post.imagePath) {
results.push(await publishPostWithImage(post.profileIds[0], post.text, post.imagePath, post.scheduledAt));
} else {
results.push(await scheduleWithMedia({ profileIds: post.profileIds, text: post.text, mediaIds: [], scheduledAt: post.scheduledAt }));
}
await new Promise(r => setTimeout(r, 500)); // Rate limit buffer
}
return results;
}
| Error | Cause | Solution |
|---|---|---|
Media REJECTED | File too large or wrong format | Check size limits per network |
422 scheduledSendTime | Date in the past | Must be future date |
413 Payload Too Large | Image exceeds limit | Compress or resize image |
| Missing profile | Profile disconnected | Reconnect in Hootsuite dashboard |
For analytics, see hootsuite-core-workflow-b.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
hootsuite, social-media-publishing, media-upload, scheduling
18 skills in this plugin
/hootsuite-ci-integrationConfigure Hootsuite CI/CD integration with GitHub Actions and testing.
Use when setting up automated testing, configuring CI pipelines,
or integrating Hootsuite tests into your build process.
Trigger with phrases like "hootsuite CI", "hootsuite GitHub Actions",
"hootsuite automated tests", "CI hootsuite".
/hootsuite-common-errorsDiagnose and fix Hootsuite common errors and exceptions.
Use when encountering Hootsuite errors, debugging failed requests,
or troubleshooting integration issues.
Trigger with phrases like "hootsuite error", "fix hootsuite",
"hootsuite not working", "debug hootsuite".
/hootsuite-core-workflow-bExecute Hootsuite secondary workflow: Core Workflow B.
Use when implementing secondary use case,
or complementing primary workflow.
Trigger with phrases like "hootsuite secondary workflow",
"secondary task with hootsuite".
/hootsuite-cost-tuningOptimize Hootsuite costs through tier selection, sampling, and usage monitoring.
Use when analyzing Hootsuite billing, reducing API costs,
or implementing usage monitoring and budget alerts.
Trigger with phrases like "hootsuite cost", "hootsuite billing",
"reduce hootsuite costs", "hootsuite pricing", "hootsuite expensive", "hootsuite budget".
/hootsuite-debug-bundleCollect Hootsuite debug evidence for support tickets and troubleshooting.
Use when encountering persistent issues, preparing support tickets,
or collecting diagnostic information for Hootsuite problems.
Trigger with phrases like "hootsuite debug", "hootsuite support bundle",
"collect hootsuite logs", "hootsuite diagnostic".
/hootsuite-deploy-integrationDeploy Hootsuite integrations to Vercel, Fly.io, and Cloud Run platforms.
Use when deploying Hootsuite-powered applications to production,
configuring platform-specific secrets, or setting up deployment pipelines.
Trigger with phrases like "deploy hootsuite", "hootsuite Vercel",
"hootsuite production deploy", "hootsuite Cloud Run", "hootsuite Fly.io".
npx claudepluginhub flight505/skill-forge --plugin hootsuite-packOther plugins' skills for the same job