Use this app to create a Discord source that emits messages from your guild to a Pipedream workflow.
Go to siteThe Discord API interacts seamlessly with Pipedream, empowering you to craft customized automations and workflows for your Discord server. With this powerful integration, you can automate tasks like message posting, user management, and notifications, based on a myriad of triggers and actions from different apps. These automations can enhance the Discord experience for community moderators and members, by synchronizing with external tools, organizing community engagement, and streamlining notifications.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
discord: {
type: "app",
app: "discord",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://discord.com/api/users/@me`,
headers: {
Authorization: `Bearer ${this.discord.$auth.oauth_access_token}`,
"accept": `application/json`,
},
})
},
})
Automate Welcome Messages: Trigger a workflow on Pipedream when a new user joins your Discord server to send them a personalized welcome message. Enhance this by adding a step to tag the user in a welcome channel or send them a DM with server rules and helpful resources.
Sync Discord Roles with External Databases: Manage Discord roles by syncing with user data from an external database or Google Sheets. When a user's status changes in the sheet—like upgrading to a paid tier of your service—use Pipedream to automatically update their role in Discord to reflect their new privileges.
Content Alerts from Social Media: Monitor social media platforms like Twitter or YouTube using their respective APIs on Pipedream. When a new tweet or video is posted, trigger a workflow that shares this content in a dedicated Discord channel, keeping your community engaged and informed about the latest updates.
You can install the Pipedream Discord app in the Accounts section of your account, or directly in a workflow.
Not sure if you need to use the Discord or the Discord Bot integration for your workflow? Here's are the general similarities and differences:
Discord and Discord Bot actions and triggers can both:
However the Discord integration will perform actions with the official Pipedream Discord bot.
Using the Discord Bot integration will use a custom bot instead, with it's own name and photo.
If you have issues with this integration, please join our public Slack and ask for help.
Discord uses OAuth authentication. When you connect your Discord account, Pipedream will open a popup window where you can sign into Discord and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Discord API.
Pipedream requests the following authorization scopes when you connect your account:
bot
email
identify
guilds
GET
https://discord.com/oauth2/authorize
?
client_id={{oauth.client_id}}
&
redirect_uri={{oauth.redirect_uri}}
&
state={{oauth.state}}
&
response_type=code
&
scope={{oauth.space_separated_scopes}}
&
prompt=consent
&
permissions=8
POST
https://discord.com/api/oauth2/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
redirect_uri={{oauth.redirect_uri}}
&
grant_type=authorization_code
&
code={{oauth.code}}
POST
https://discord.com/api/oauth2/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
grant_type=refresh_token
&
refresh_token={{oauth.refresh_token}}