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.

FieldTypeRequiredDefaultConstraintsExample
raw
The post body, written in Markdown exactly as it will be stored.
stringYes——Thanks for the report — we are looking into it.
title
Title of the new topic or private message; leave blank when replying.
stringNo——Deployment failed on the staging cluster
topic_id
Numeric id of the topic to reply to; leave blank to start a new topic.
stringNo——1234
category
Numeric id of the category the new topic belongs in; ignored on a reply.
stringNo——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.
stringNo——3
archetype
Whether this is a normal topic or reply, or a private message.
stringNoregularone of "regular", "private_message"—
target_recipients
Comma-separated usernames the private message goes to; required when the archetype is private_message.
stringConditional—only with archetypeblake,sam
external_id
An id from your own system to associate the new topic with.
stringNo——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

FieldTypeExample
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": ""
}

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.