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.
- First of all, you'll have to enter credentials for the Discourse node. You can find out how to do that here.
- Enter a title for the post in the Title field.
- Enter the content of the post in the Content field.
- Click on Add Field and select 'Category ID' from the dropdown list.
- Select 'Lounge' from the Category ID dropdown list.
- 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.
- Select the credentials that you entered in the previous node.
- Select 'Update' from the Operations dropdown list.
- Click on the gears icon next to the Post ID field and click on Add Expression.
- Select the following in the Variable Selector section: Current Node > Input Data > JSON > id. You can also add the following expression:
{{$json["id"]}}
. - Enter the updated content in the Content field.
- Click on Execute Node to run the node.
4. Discourse2 node (get: post)#
This node will retrieve the post that we updated previously.
- Select the credentials that you entered in the previous node.
- Select 'Get' from the Operation dropdown list.
- Click on the gears icon next to the Post ID field and click on Add Expression.
- Select the following in the Variable Selector section: Current Node > Input Data > JSON > id. You can also add the following expression:
{{$json["id"]}}
. - Click on Execute Node to run the node.