{
"id": "5370A35A-BAE2-4213-A70C-A258F9650C34",
"kind": "workflow",
"name": "X and Discord Campaign Drafter",
"author": {
"address": "0xc820da3Ce55C600A6282D2B21083Fe5Aa7E51F3D",
"signature": "a5dad19f10164b7bba9e9b73f0f727d19f074405bcd4af7a452dfa91467dec9e6e1537a38d2605859b45eadea9adcc4653dc9f849df3bd51574f1e9dcb4e55e31b"
},
"format": "osaurus.template",
"summary": "Turns one topic into coordinated X and Discord drafts for review before publishing.",
"version": 1,
"workflow": {
"edges": [
{
"to": "write",
"from": "angle"
},
{
"to": "review",
"from": "write"
},
{
"to": "limit_x",
"from": "review"
}
],
"nodes": [
{
"id": "angle",
"kind": "inference",
"name": "Pick a campaign angle",
"input": {
"topic": "{{input.topic}}",
"audience": "{{input.audience}}",
"call_to_action": "{{input.call_to_action}}"
},
"retry": {
"max_attempts": 2,
"backoff_seconds": 1
},
"timeout": 120,
"inference": {
"mode": "generate",
"model_slot": "writer",
"instructions": "Plan one clear campaign angle that can work on both X and Discord. Use only facts explicitly present in the topic, audience, and call to action. Do not infer benefits, use cases, product qualities, dates, links, offers, or audience traits. The angle should reframe the supplied message, not add claims. Return a short angle summary, a hook, and two to four factual key points. If the audience or call to action is blank, do not assume one."
},
"output_schema": {
"type": "object",
"required": [
"angle",
"hook",
"points"
],
"properties": {
"hook": {
"type": "string",
"title": "Hook"
},
"angle": {
"type": "string",
"title": "Angle"
},
"points": {
"type": "array",
"items": {
"type": "string"
},
"title": "Key points"
}
},
"additionalProperties": false
}
},
{
"id": "write",
"kind": "inference",
"name": "Write both channel drafts",
"input": {
"hook": "{{nodes.angle.output.hook}}",
"tone": "{{input.tone}}",
"topic": "{{input.topic}}",
"audience": "{{input.audience}}",
"key_points": "{{nodes.angle.output.points}}",
"call_to_action": "{{input.call_to_action}}",
"campaign_angle": "{{nodes.angle.output.angle}}"
},
"retry": {
"max_attempts": 2,
"backoff_seconds": 1
},
"timeout": 120,
"inference": {
"mode": "generate",
"model_slot": "writer",
"instructions": "Create coordinated drafts for X and Discord using the supplied campaign angle and original topic. Treat every supplied detail as authoritative: preserve dates, times, audience labels, and claims exactly, and never substitute a different group. The X draft must be one complete standalone post no longer than 200 characters including hashtags, with at most two hashtags and no thread. Use only the essential message and call to action. The Discord draft may be longer, should be easy to scan with short paragraphs or bullets, and must feel natural for a community server rather than copied from X. Include the provided call to action only when it is non-empty. Do not invent facts, dates, links, handles, offers, benefits, or quotes. Return only the two ready-to-review draft texts."
},
"output_schema": {
"type": "object",
"required": [
"x_draft",
"discord_draft"
],
"properties": {
"x_draft": {
"type": "string",
"title": "X draft"
},
"discord_draft": {
"type": "string",
"title": "Discord draft"
}
},
"additionalProperties": false
}
},
{
"id": "limit_x",
"code": {
"source": "async function run(input, ctx) {\n const original = String(input.x_draft || '').trim();\n const chars = Array.from(original);\n if (chars.length <= 280) return { x_draft: original, shortened: false };\n\n const withoutHashtags = original.replace(/\\s+#\\S+/gu, '').trim();\n if (Array.from(withoutHashtags).length <= 280) {\n return { x_draft: withoutHashtags, shortened: true };\n }\n\n const slice = Array.from(withoutHashtags).slice(0, 279).join('');\n const boundary = slice.lastIndexOf(' ');\n const trimmed = (boundary >= 220 ? slice.slice(0, boundary) : slice).replace(/[\\s,;:!?.-]+$/u, '');\n return { x_draft: trimmed + '…', shortened: true };\n}",
"network": [],
"secrets": [],
"timeout": 30
},
"kind": "code",
"name": "Keep X within its limit",
"input": {
"x_draft": "{{nodes.review.output.x_draft}}"
},
"retry": {
"max_attempts": 1,
"backoff_seconds": 1
},
"intent": "Keep X within its limit",
"timeout": 120,
"output_schema": {
"type": "object",
"required": [
"x_draft",
"shortened"
],
"properties": {
"x_draft": {
"type": "string",
"title": "X draft"
},
"shortened": {
"type": "boolean",
"title": "Shortened to fit"
}
},
"additionalProperties": false
}
},
{
"id": "review",
"kind": "inference",
"name": "Fact-check both drafts",
"input": {
"tone": "{{input.tone}}",
"topic": "{{input.topic}}",
"audience": "{{input.audience}}",
"candidate_x": "{{nodes.write.output.x_draft}}",
"call_to_action": "{{input.call_to_action}}",
"candidate_discord": "{{nodes.write.output.discord_draft}}"
},
"retry": {
"max_attempts": 2,
"backoff_seconds": 1
},
"intent": "Fact-check both drafts",
"timeout": 120,
"inference": {
"mode": "generate",
"model_slot": "writer",
"instructions": "Act as a strict final editor. Compare both candidate drafts with the original topic, audience, and call to action. Remove or rewrite every claim, benefit, use case, date, link, offer, product detail, or audience trait that is not explicitly supported by those original fields. Preserve all important explicit details such as event dates and times. Keep the X draft concise, standalone, and under 200 characters including at most two hashtags. Keep the Discord draft natural and easy to scan. If the call to action is blank, do not invent one. Return only the two corrected drafts."
},
"output_schema": {
"type": "object",
"required": [
"x_draft",
"discord_draft"
],
"properties": {
"x_draft": {
"type": "string",
"title": "Corrected X draft"
},
"discord_draft": {
"type": "string",
"title": "Corrected Discord draft"
}
},
"additionalProperties": false
}
}
],
"output": {
"x_draft": "{{nodes.limit_x.output.x_draft}}",
"discord_draft": "{{nodes.review.output.discord_draft}}",
"campaign_angle": "{{nodes.angle.output.angle}}"
},
"secrets": [],
"examples": [
{
"name": "Product launch",
"input": {
"tone": "Friendly",
"topic": "We launched offline mode in our notes app; changes sync when users reconnect.",
"audience": "Busy professionals who travel",
"call_to_action": "Try offline mode and tell us what you think."
}
},
{
"name": "Community event",
"input": {
"tone": "Playful",
"topic": "A free community Q&A with the product team is happening Friday at 3 PM Pacific.",
"audience": "Current users and Discord community members",
"call_to_action": "Join us in the Discord events channel."
}
},
{
"name": "Minimal brief",
"input": {
"tone": "Professional",
"topic": "Share a reminder that thoughtful feedback helps improve the product.",
"audience": "",
"call_to_action": ""
}
}
],
"model_slots": [
{
"slot": "writer",
"locality": "cloud_allowed",
"preferred": "openai-chatgpt/gpt-5.6-sol",
"strictness": "preferred",
"needs_tool_use": false
}
],
"input_schema": {
"type": "object",
"x-order": [
"topic",
"audience",
"tone",
"call_to_action"
],
"required": [
"topic",
"tone"
],
"properties": {
"tone": {
"enum": [
"Friendly",
"Professional",
"Playful"
],
"type": "string",
"title": "Tone",
"default": "Friendly",
"description": "Choose the voice for both drafts."
},
"topic": {
"type": "string",
"title": "Campaign topic",
"description": "Describe the announcement, idea, or promotion the campaign should cover."
},
"audience": {
"type": "string",
"title": "Audience",
"description": "Who you want to reach; leave blank for a general audience."
},
"call_to_action": {
"type": "string",
"title": "Call to action",
"description": "What readers should do next; leave blank if no action is needed."
}
},
"additionalProperties": false
},
"output_schema": {
"type": "object",
"required": [
"campaign_angle",
"x_draft",
"discord_draft"
],
"properties": {
"x_draft": {
"type": "string",
"title": "X draft"
},
"discord_draft": {
"type": "string",
"title": "Discord draft"
},
"campaign_angle": {
"type": "string",
"title": "Campaign angle"
}
},
"additionalProperties": false
},
"requirement_notes": {}
},
"changelog": "Created a review-first X and Discord campaign drafter with coordinated copy, factual checks, and automatic X length enforcement.",
"created_at": "2026-10-21T17:11:23Z",
"content_hash": "sha256:1adc8c70a305a04bdbdbae616ae7e16483106305d50b2bfab89320bda6ba00de",
"requirements": {
"notes": {},
"models": [
{
"slot": "writer",
"locality": "cloud_allowed",
"preferred": "openai-chatgpt/gpt-5.6-sol",
"strictness": "preferred",
"needs_tool_use": false
}
],
"network": [],
"plugins": [],
"secrets": [],
"knowledge": [],
"mcp_servers": [],
"permissions": []
},
"format_version": 1,
"available_to_orchestrator": true
}