Discourse

The Discourse modules enable you to monitor, create, update, retrieve, or delete posts and topics in your Discourse account.

Getting Started With Discourse

Prerequisites

The module dialog fields that are displayed in bold (in the Integromat scenario, not in this documentation article) are mandatory!

Connecting Discourse to Integromat

To connect your Discourse account to Integromat, you'll need to obtain the API Key, and insert it into the Integromat Create a connection dialog.

1. Log in to your Discourse account.

2. Open the menu in the top-right corner (2021-02-01_11_18_05-integrodocs.png).

3. Navigate to Admin > API.

WHfvnv9cm8.gif

4. Click the New API Key (chrome_UWGoqcveV2.png) button.

5. Set the API Key configuration as follows:

Description Enter the name for the API Key.
User Level Select the Single User option to restrict the access via API to the user specified in the User field below.
User Select the user you want to grant API access to your Discourse account. User names you can select from will display as you type.
Global Key (allows all actions) Enable this option to allow all actions. Otherwise, define the particular scopes you want to enable for the API access.

6. Click the Save button, and copy the provided API Key.

2021-02-01_13_07_08-Admin_-_integrodocs.png7. Go to Integromat, and open the Discourse module's Create a connection dialog. Fill in the following fields:

Connection name Enter the name of the connection to your Discourse account.
Host URL Select the URL of your Discourse domain name (including HTTPS), e.g., https://<yourCompanyName>.trydiscourse.com
API Key Enter the API Key you have copied in step 6 above.
API User Name Enter the user name of the user assigned to the API Key.

8. Click the Continue button to establish the connection.

The connection has been established. You can proceed with setting up the module.

Posts

Watch Posts

Retrieves post details when a new post is created.

Connection  Establish a connection to your Discourse account.
Limit Set the maximum number of posts Integromat will return during one execution cycle.

List Posts

Retrieves a list of the latest posts across topics.

Connection  Establish a connection to your Discourse account.
Limit Set the maximum number of posts Integromat will return during one execution cycle.

Get a Post

Retrieves post details.

Connection  Establish a connection to your Discourse account.
Post ID Enter (map) the ID of the post, or select the post you want to retrieve details for.

Update a Post

Updates an existing post.

Connection  Establish a connection to your Discourse account.
Post ID Enter (map) the ID of the post or select the post you want to update.
Body Enter the post content. HTML formatting is supported.
Old Body Enter the old content of the post.
Edit Reason Enter the reason for the post edit.
Cooked Enter the cooked post data.

Delete a Post

Deletes an existing post.

Connection  Establish a connection to your Discourse account.
Post ID Enter (map) the ID of the post or select the post you want to delete.

Topics

Watch Topics

Retrieves topic details when a new topic is created.

Connection  Establish a connection to your Discourse account.
Limit Set the maximum number of topics Integromat will return during one execution cycle.

List Topics

Retrieves a list of topics.

Connection  Establish a connection to your Discourse account.
Order By

Select the parameter you want to sort returned topics by.

Order Select whether to order returned topics in descending or ascending direction.
Limit Set the maximum number of topics Integromat will return during one execution cycle.

Get a Topic

Retrieves topic details.

Connection  Establish a connection to your Discourse account.
Topic ID Enter (map) the ID of the topic or select the topic you want to retrieve details for.
Print Enable to return up to 1000 posts in a topic.

Update a Topic

Allows you to update an existing topic's title or/and category.

Connection  Establish a connection to your Discourse account.
Topic ID Enter (map) the ID of the topic, or select the topic you want to retrieve details for.
Title Enable the new title for the topic.
Category Select the category or map the category ID.

Delete a Topic

Deletes an existing topic.

Connection  Establish a connection to your Discourse account.
Topic ID Enter (map) the ID of the topic, or select the topic you want to delete.

Private Messages

Watch Private Messages

Retrieves message details when a new private message is received.

Connection  Establish a connection to your Discourse account.
Limit Set the maximum number of private messages Integromat will return during one execution cycle.

List Private Messages

Retrieves private messages in your account.

Connection  Establish a connection to your Discourse account.
Limit Set the maximum number of private messages Integromat will return during one execution cycle.

Other

Create a Post, Topic, or Private Message

Creates a post, topic, or private message.

Connection  Establish a connection to your Discourse account.
Type of Content

Select whether you want to create a post, topic, or private message.

Post

Topic ID Select the topic, or map the ID of the topic where you want to create the post.
Body Enter the post content. HTML formatting is supported.

Topic

Title Enter the name for the topic.
Body Enter the topic body content.
Category ID Select the category for the topic.

Private Message

Title Enter the message title.
Body Enter the private message content.
Target Recipients Add desired recipients of the private message.

Make an API Call

Allows you to perform a custom API call.

Connection Establish a connection to your Discourse account.
URL

Enter a path relative to https://integrodocs.trydiscourse.com.
For example: /posts.

For the list of available endpoints, refer to the Discourse API Documentation.
Method

Select the HTTP method you want to use:

GET
to retrieve information for an entry.

POST
to create a new entry.

PUT
to update/replace an existing entry.

PATCH
to make a partial entry update.

DELETE
to delete an entry.

Headers Enter the desired request headers. You don't need to add authorization headers; we've already added those for you.
Query String Enter the request query string.
Body Enter the body content for your API call.

Example of Use - List Posts

The following API call returns all posts in your Discourse account:

URL:
/v1/posts

Method:
GET

2021-02-03_16_45_58-Integration_Discourse___Integromat.png

The result can be found in the module's Output under Bundle > Body > latest posts
In our example, 15 posts were returned:

2021-02-03_17_46_20-Integration_Discourse___Integromat.png

Popular use cases from our blog

automated-data-collection-crm-illustration

How to Automate Data Collection - Part 5: CRM Systems

automated-data-collection-chatbot-marketing-illustration

How to Automate Data Collection - Part 4: Chatbot Marketing

automated-data-collection-paid-ads-illustration

How to Automate Data Collection - Part 3: Paid Ads

automated-data-collection-email-illustration

How to Automate Data Collection - Part 2: Email Marketing Segmentation

personalized-customer-experience-illustration-integromat

5 Automated Solutions to Personalize Customer Experience

data-collection-automation-forms-pt-1

How to Automate Data Collection - Part 1: Online Forms

Didn’t find what you were looking for?

Expert

Find an expert

We feature a network of 450+ certified partners across the globe who are ready to help

Find an expert

Automate any workflow in your business

Sign up for a free account today. No credit card required, no time limits on free plan.