Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Discourse

Publish, search, and reply to discussions on a Discourse site.

Connectors

Choose the connector that matches your authentication method. The options below use the names shown in StackAI.

Connector
Authentication

Discourse

API key or token

Discourse

Connect to a Discourse site to publish, search, and manage discussion posts.

Set up in Discourse

  1. Prepare the Discourse account or service that the workflow will access. Grant access to the required resources and operations.

  2. API Key: Create an API key with topics:read_lists for connection checks and topic lists, topics:write for topics, replies and private messages, search:show for search, and categories:list for the category picker. The acting account must also have permission for the selected content.

Set up in StackAI

  1. Open Settings → Connections, add a connection, and select Discourse.

  2. Enter the credentials and connection details in the fields below.

  3. Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.

Connection fields

StackAI field
Required
What to enter

Site URL

Yes

The HTTPS root URL of the Discourse site, without a path. Provider instructions.

API Key

Yes

Create an API key with topics:read_lists for connection checks and topic lists, topics:write for topics, replies and private messages, search:show for search, and categories:list for the category picker. The acting account must also have permission for the selected content. Provider instructions.

Acting Username

Yes

The Discourse account that performs requests with this API key.

Verify the connection

Check that the connection is healthy. Then run a read operation against a resource the connected account can access. A successful connection check confirms authentication; it does not guarantee permission for every action.

If access is denied, check the credential or OAuth permissions, the selected account or environment, and access to the specific resource. Update expired credentials or reconnect after permissions change.

Use an action

  1. Add the required Discourse action to the workflow.

  2. Select a connection when the action requests one.

  3. Complete the required fields. Use the reference picker when a value comes from another workflow step.

  4. Run the workflow and inspect the action’s output. Check the result before using it in a later step.

Actions

Create Topic

Publish a new topic on the connected Discourse site.

Inputs

Field
Type
Required
Description

Title

string

Yes

The topic title readers will see.

Content

textarea

Yes

The topic body, with Markdown formatting if useful.

Category

select (string)

No

Optional category where the topic belongs. Options load from the selected connection.

External Reference

string

No

Optional unique reference from another system for later lookup.

Outputs

Field
Type
Description

Status

string

Whether Discourse created the topic or queued it for review.

Post ID

integer

The created first-post ID when creation completed immediately.

Topic ID

integer

The created topic ID when available.

Post Number

integer

The first post's number when available.

Topic Slug

string

The topic's URL slug when available.

Pending Count

integer

The pending review count when Discourse reports it.

Reply to Topic

Add a reply to an existing Discourse topic.

Inputs

Field
Type
Required
Description

Topic

select (string)

Yes

The visible topic to reply to. Options load from the selected connection.

Reply

textarea

Yes

The reply text, with Markdown formatting if useful.

Reply to Post Number

integer

No

Optional post number within the topic to reply to directly.

Outputs

Field
Type
Description

Status

string

Whether Discourse created the reply or queued it for review.

Post ID

integer

The created post ID when available.

Topic ID

integer

The topic ID returned by Discourse when available.

Post Number

integer

The new reply's number within the topic when available.

Topic Slug

string

The topic's URL slug when available.

Pending Count

integer

The pending review count when Discourse reports it.

Search Posts

Search public posts visible to the connected Discourse account.

Inputs

Field
Type
Required
Description

Query

string

Yes

Words and optional Discourse search filters for public posts.

Cursor

integer

No

Optional next search page returned by a previous call.

Outputs

Field
Type
Description

Posts

object_array

A typed list of minimized public post search results.

Next Cursor

integer

The next search page, or no value when results ended.

List Latest Topics

List the latest topics visible to the connected Discourse account.

Inputs

Field
Type
Required
Description

Cursor

integer

No

Latest-topics page to fetch, starting at 0. Minimum: 0.

Topics Per Page

integer

No

Exact maximum number of topics to return in this page. Minimum: 1. Maximum: 100.

Order

select (string)

No

How Discourse should order the topic list. Available values: Default, Created, Activity, Views, Posts, Category, Likes, Original Poster Likes, Posters.

Ascending

boolean

No

Sort in ascending order instead of Discourse's descending default. Default: false.

Outputs

Field
Type
Description

Topics

object_array

A typed list of visible topic summaries.

Next Cursor

integer

The next latest-topics page, or no value when results ended.

Send Private Message

Send a private Discourse message without exposing its content in the result.

Inputs

Field
Type
Required
Description

Recipients

string

Yes

Comma-separated Discourse usernames or messageable group names.

Subject

string

Yes

The private message subject.

Message

textarea

Yes

The private message body, with Markdown formatting if useful.

Outputs

Field
Type
Description

Status

string

Whether Discourse created the message or queued it for review.

Post ID

integer

The created first-post ID when creation completed immediately.

Topic ID

integer

The private message topic ID when creation completed immediately.

Post Number

integer

The first post's number when creation completed immediately.

Pending Count

integer

The pending review count when Discourse reports it.

Important behavior

Actions that create, update, send, or delete data can change the connected service. Review their inputs before running them. A retry can repeat an operation; consider this when configuring retries for actions that change data.

The catalog lists the fields and capabilities available in the supplied provider definition. Availability can also depend on your deployment and organization’s Feature Access settings.

Last updated

Was this helpful?