Publish To Channels

1 action. Each is callable by the agent as a tool, over HTTP via /api/invoke, and (usually) from a UI page.

publish_to_channels

POST · mutating

Fan a single topic out across a subject's publishing recipe — one tool call replaces drafting + scheduling for N platforms. The agent supplies a subjectId + free-form topic (and optional attachments); the composite picks the right recipe (via keyword classifier or explicit recipeName), generates a draft per channel in the persona's per-platform voice, and schedules the chain per the recipe's delays. Returns one ticket id per channel. Default agent flow for cross-platform shares.

When the agent calls it: Use this as the DEFAULT entry point when the user says "I want to share / post / announce X" without specifying platforms — the subject's recipes encode the right channels. Examples: "Add a new post about Harvest & Pine — I built a Vite+HMR dev pipeline" → publish_to_channels({ subjectId, topic }). DEFAULT mode is "idea": creates ONE seed ticket in the Ideas column carrying the topic + planned fan-out. The user reviews + approves; on approval, the per-platform drafts auto-generate in pending-review. Report the ideaTicketId so the user can find it. Pass mode="fanout-now" ONLY when (a) the user explicitly said "post now / skip review" OR (b) the mission's autonomy is fully-autonomous. This skips the idea gate and creates per-platform drafts directly. For one-off "post X right now on Y only" requests, use the simpler post tool — that skips recipe matching and goes straight to one platform. attachments take fileId (from files.upload) OR direct url. Each channel's recipe knows how to embed them.

  • AI tool: publish_to_channels
  • API: POST /api/invoke/publish_to_channels

Input

Field Type Required Description
subjectId string yes
topic string yes
recipeName string
overridePlatforms string[]
attachments object[]
missionId string
publishImmediate boolean
useWorkflow boolean
mode "idea" | "fanout-now"
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "subjectId": {
      "type": "string",
      "minLength": 1
    },
    "topic": {
      "type": "string",
      "minLength": 1
    },
    "recipeName": {
      "type": "string"
    },
    "overridePlatforms": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "attachments": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "fileId": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "alt": {
            "type": "string"
          }
        }
      }
    },
    "missionId": {
      "type": "string",
      "minLength": 1
    },
    "publishImmediate": {
      "type": "boolean"
    },
    "useWorkflow": {
      "type": "boolean"
    },
    "mode": {
      "type": "string",
      "enum": [
        "idea",
        "fanout-now"
      ]
    }
  },
  "required": [
    "subjectId",
    "topic"
  ]
}