The Discourse API empowers developers to interact programmatically with Discourse forums, allowing for a myriad of automations and integrations. Using Pipedream, you can harness this API for tasks such as syncing forum data with other platforms, automating user management, or triggering workflows based on forum activity. The key is in creatively coupling Discourse events with Pipedream's capabilities to streamline community interactions and administration.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
discourse: {
type: "app",
app: "discourse",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://${this.discourse.$auth.domain}/admin/users/list/active.json`,
headers: {
"Api-Username": `${this.discourse.$auth.api_username}`,
"Api-Key": `${this.discourse.$auth.api_key}`,
},
})
},
})
User Onboarding Automation: When a new member joins your Discourse forum, trigger a Pipedream workflow that sends a personalized welcome email via SendGrid, adds the user to a Mailchimp list for community updates, and posts an introductory message in a designated forum category using the Discourse API.
Content Digest Creator: Compile a weekly digest of the most popular topics and posts by using the Discourse API to fetch forum activity data. The workflow could then format this information into a newsletter with HTML, and send it to all subscribers through an email service like SendGrid or Mailchimp, keeping your community engaged and informed.
Issue Tracking Integration: For communities using Discourse for support and feature requests, you can set up a workflow that watches for new posts with specific tags or in certain categories. Once detected, it can create an issue in GitHub, Jira, or Trello, providing seamless integration between community feedback on Discourse and your team's project management tools.
Discourse uses API keys for authentication. When you connect your Discourse account, Pipedream securely stores the keys so you can easily authenticate to Discourse APIs in both code and no-code steps.
For domain, enter the hostname, without the protocol, that you'd use in this API call: https://[domain]/admin/users/list/active.json
. For example: example.com
.
If you host Discourse on a subfolder (for example: https://pipedream.com/community), enter the subfolder as a part of the domain (pipedream.com/community
).
Create an API key in your Admin panel, and enter the associated api_username and api_key.