Publish draft
publish_draftPublishes the article of one content calendar topic to one publishing destination of the site, from the destinations section of get_project (request it with sections ['destinations']). mode draft (the default) sends the article as a draft; mode publish makes it live. Draft mode runs on the first call without confirm only on a destination that finds posts only by a stored id (GoHighLevel) and has no publication of the article yet, but it still writes to the destination: ask the user before you call it. Publish mode, a draft to a destination that can find posts by slug (WordPress, Framer, Shopify, Webflow, and Contentful when it has no stored id; a post with the same slug, also one Keytomic did not make, can be set back to a draft), a draft to a destination that already has a publication of the article, in any mode and also a failed or unfinished one (when its post is live, the destination can turn it back into a draft), a draft of a content refresh, and each call to a webhook (draftMode receiver_decides) first return the plan and sends nothing (status plan): the destination, the mode, the expected URL (or that the URL is known after the publish), whether it adds a new post or updates the post of an earlier publish, and whether it uses a daily publish, with the publishes left today. Show the plan to the user, and call again with confirm: true only after the user agrees; that call reads the plan again and publishes. A destination whose draftMode is not_supported takes only mode publish (draft_mode_not_supported). The first send of the article to a destination in a mode uses 1 daily publish; a repeat after a succeeded publish uses none. Returns the status (sent_as_draft, published, or sent_to_receiver for a webhook, whose receiver decides the mode), the public URL (null in draft mode, because a draft has no public URL), whether the publish updated an earlier post and whether it used a daily publish. If a call that publishes times out or answers internal_error, call get_publication_status before you call this tool again: the publish can still finish on the server. When an earlier publish of the article to the same destination in the same mode succeeded, a repeat updates the same post and uses no new daily publish, but a webhook gets a new event on each call. When none succeeded and none is still pending, a repeat uses a new daily publish, and it can add a second post when a failed publish reached the destination. When the destination does not confirm the publish, the call answers publish_failed with a fixUrl, where the owner checks the destination: the article may or may not have reached it.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"projectId": "<projectId>",
"topicId": "<topicId>",
"destinationId": "<destinationId>"
},
"name": "publish_draft"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | draft (default) sends the article as a draft, which the destination keeps unpublished when its draftMode is kept_as_draft. A draft runs on the first call only on a destination that finds posts only by a stored id (GoHighLevel) and has no publication of the article yet. A draft to a destination that can find posts by slug (WordPress, Framer, Shopify, Webflow, and Contentful when it has no stored id), to a destination that already has a publication of the article (in any mode, also a failed or unfinished one), and a draft of a content refresh return a plan first, because the destination can turn a live post back into a draft. publish makes the article live. | draft |
| confirm | No | true starts the publish. Send it only after the user saw the plan this tool returns without confirm and agreed. Without it, the tool returns the plan and starts nothing. | |
| topicId | Yes | Topic whose article to publish, from list_calendar_topics. | |
| projectId | Yes | Site to act on, from list_sites. | |
| destinationId | Yes | Destination to publish to, from the destinations section of get_project (request it with sections ["destinations"]). |