Mattermost is an open-source platform for secure collaboration across the entire software development lifecycle. With the Mattermost API on Pipedream, you can automate common chat operations, integrate with DevOps tools for real-time alerts, orchestrate workflows based on chat events, and connect with other services to enhance team productivity. For instance, you could trigger actions on issue tracking platforms when discussing bugs or link project management tools to update task statuses directly from your Mattermost channels.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
mattermost: {
type: "app",
app: "mattermost",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://${this.mattermost.$auth.domain}/api/v4/users/me`,
headers: {
Authorization: `Bearer ${this.mattermost.$auth.oauth_access_token}`,
},
})
},
})
Incident Alerting and Management: Automatically post messages to a designated Mattermost channel when an incident is created or updated in monitoring tools like PagerDuty. This keeps your DevOps teams in the loop and allows for quick collaboration and response to system alerts or outages.
Customer Support Ticket Triage: Connect Mattermost to a customer support platform like Zendesk. When a new support ticket is created, post a message with ticket details to a support channel, and allow the team to claim tickets by reacting to the message. This streamlines the triage process and improves response times.
Continuous Integration/Deployment (CI/CD) Notifications: Integrate with CI/CD platforms such as GitHub Actions or CircleCI. Send updates to Mattermost channels about the status of code commits, pull requests, or deployment processes, enabling developers to stay informed about the progress of builds and deployments without leaving the chat environment.
Emit new event when a message matching the requirements is sent in a channel. See the documentation
Mattermost uses OAuth authentication. When you connect your Mattermost account, Pipedream will open a popup window where you can sign into Mattermost and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Mattermost API.
Pipedream requests the following authorization scopes when you connect your account:
GET
https://{{custom_fields.domain}}/oauth/authorize
?
client_id={{custom_fields.client_id}}
&
redirect_uri={{oauth.redirect_uri}}
&
state={{oauth.state}}
&
response_type=code
&
scope={{oauth.space_separated_scopes}}
POST
https://{{custom_fields.domain}}/oauth/access_token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{custom_fields.client_id}}
&
client_secret={{custom_fields.client_secret}}
&
redirect_uri={{oauth.redirect_uri}}
&
grant_type=authorization_code
&
code={{oauth.code}}
POST
https://{{custom_fields.domain}}/oauth/access_token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{custom_fields.client_id}}
&
client_secret={{custom_fields.client_secret}}
&
grant_type=refresh_token
&
refresh_token={{oauth.refresh_token}}