Create Post
discourse.create_post
ActionBusiness appsconnection required
Calls the Discourse API with the connection's credentials.
Start a topic, reply to one, or send a private message.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- API key
- Providers
- Discourse
- Secret shape
- the API key, or {"api_key": "…"}
- Config it needs
- base_url, api_username
- Resolved by
- config.connection_id, else node.connection_id
Configuration
8 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
raw The post body, written in Markdown exactly as it will be stored. | string | Yes | — | — | Thanks for the report — we are looking into it. |
title Title of the new topic or private message; leave blank when replying. | string | No | — | — | Deployment failed on the staging cluster |
topic_id Numeric id of the topic to reply to; leave blank to start a new topic. | string | No | — | — | 1234 |
category Numeric id of the category the new topic belongs in; ignored on a reply. | string | No | — | — | 5 |
reply_to_post_number Position of the post being replied to inside the topic, when replying to one post rather than the topic as a whole. | string | No | — | — | 3 |
archetype Whether this is a normal topic or reply, or a private message. | string | No | regular | one of "regular", "private_message" | — |
target_recipients Comma-separated usernames the private message goes to; required when the archetype is private_message. | string | Conditional | — | only with archetype | blake,sam |
external_id An id from your own system to associate the new topic with. | string | No | — | — | ticket-4821 |
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"archetype": "regular",
"category": "5",
"external_id": "ticket-4821",
"raw": "Thanks for the report — we are looking into it.",
"reply_to_post_number": "3",
"target_recipients": "blake,sam",
"title": "Deployment failed on the staging cluster",
"topic_id": "1234"
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
post The post record Discourse returned, in full. | object | — |
id The post's id. | number | — |
topic_id The topic the post belongs to. | number | — |
post_number The post's position inside its topic, starting at 1. | number | — |
post_url Path to the post on the forum, relative to the forum root. | string | — |
username The account the post was made by. | string | — |
enqueued True when the forum held the post for approval instead of publishing it; the post fields are empty in that case. | boolean | — |
pending_post The queued-for-review record, present only when enqueued is true. | object | — |
{
"enqueued": false,
"id": 0,
"pending_post": {},
"post": {},
"post_number": 0,
"post_url": "",
"topic_id": 0,
"username": ""
}Related Discourse nodes
See Create Post run in a workflow.
In a technical demo we add the Discourse connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.