Skip to content

Discourse#

Use the Discourse node to automate work in Discourse, and integrate Discourse with other applications. Ensemble has built-in support for a wide range of Discourse features, including creating, getting, updating, and removing categories, groups, posts, and users.

On this page, you'll find a list of operations the Discourse node supports and links to more resources.

Credentials

Refer to Discourse credentials for guidance on setting up authentication.

Basic Operations#

  • Category
    • Create a category
    • Get all categories
    • Update a category
  • Group
    • Create a group
    • Get a group
    • Get all groups
    • Update a group
  • Post
    • Create a post
    • Get a post
    • Get all posts
    • Update a post
  • User
    • Create a user
    • Get a user
    • Get all users
  • User Group
    • Create a user to group
    • Remove user from group

Example Usage#

This Pathway allows you to create, update, and get a post using the Discourse node. This example usage Pathway would use the following nodes. - Start - Discourse

The final Pathway should look like the following image.

1. Start node#

The start node exists by default when you create a new workflow.

2. Discourse node (create: post)#

This node will create a post under the Lounge category. If you want to create a post under a different category, select that category instead.

  1. First of all, you'll have to enter credentials for the Discourse node. You can find out how to do that here.
  2. Enter a title for the post in the Title field.
  3. Enter the content of the post in the Content field.
  4. Click on Add Field and select 'Category ID' from the dropdown list.
  5. Select 'Lounge' from the Category ID dropdown list.
  6. Click on Execute Node to run the node.

3. Discourse1 node (update: post)#

This node will update the content of the post that we created in the previous node.

  1. Select the credentials that you entered in the previous node.
  2. Select 'Update' from the Operations dropdown list.
  3. Click on the gears icon next to the Post ID field and click on Add Expression.
  4. Select the following in the Variable Selector section: Current Node > Input Data > JSON > id. You can also add the following expression: {{$json["id"]}}.
  5. Enter the updated content in the Content field.
  6. Click on Execute Node to run the node.

4. Discourse2 node (get: post)#

This node will retrieve the post that we updated previously.

  1. Select the credentials that you entered in the previous node.
  2. Select 'Get' from the Operation dropdown list.
  3. Click on the gears icon next to the Post ID field and click on Add Expression.
  4. Select the following in the Variable Selector section: Current Node > Input Data > JSON > id. You can also add the following expression: {{$json["id"]}}.
  5. Click on Execute Node to run the node.