Connecting Discord with Mesa
When you're setting up your first workflow with Discord, you will need to create an application and a Bot on Discord before you can enable your workflow.
Follow these steps to connect Discord with Mesa!
1. Login into Discord and go the Applications page within the Developer Portal.
2. Click on New Application on the top right hand corner.
3. Add the Name of your application and click Create.
4. On the left hand sidebar, click on OAuth2. Under Redirects, click on Add Redirect and add https://app.getmesa.com/apps/mesa/oauth/redirect-token. Save your changes.
5. On the left hand sidebar, click on Bot. Then, click on Add Bot on the right hand corner. When prompted with a modal, click on Yes, do it!
6. You will see that a wild bot has appeared! Within the same Bot page, scroll down until you see Authorization Flow. Enable Requires OAuth2 Code Grant, Presence Intent, and Server Members Intent. Optionally, you could disable Public Bot. Make sure to click on Save Changes afterwards.
7. Within the same Bot page, scroll all the way up and locate your Bot's Token. Click on the Copy button to copy the Bot's token.
8. In a new browser tab, go back to your Mesa workflow and locate your workflow's Discord Step. In your Discord Step, locate the Account Credentials section. Paste the copied value into the Bot Token field in Mesa.
9. Almost done! Go back to the Discord's Applications page within the Developer Portal and go back to your newly created Application. On the left hand sidebar, click on oAuth2. Locate your Applications' Client Information. Click on Copy under the Client ID and the Client Secret.
10. Go back to your Mesa workflow and paste these values in the Client ID and Client Secret fields. Then, click on Authenticate with Discord.
11. You will be redirected to a Discord screen that asks which server you'd liked to add the Bot to. Select a server and click on Continue. If you have not created a server just yet, you can follow this Discord document.
12. On the next prompted modal, click on Authorize.
13. You are all set! You can re-use this Discord credential for future Discord workflows.
Locating your Channel ID
In specific Discord actions such as Discord Create Channel Message, you will be required to enter a Channel ID.
To locate the Channel ID, login into Discord. Make sure you have Developer Mode enabled. If you don't have Developer Mode enabled, go to your User Settings (gear icon).
On the left hand sidebar, locate Advanced and toggle Developer Mode on.
Next, locate your server's channel and right click on the channel. Click on Copy ID and paste that value into your workflow's Discord Step's Channel ID field.
Editing your Discord Message
When using Mesa's Discord Create Channel Message Action, you can send any information you'd like in the Discord Message. To edit the Discord Message, you can locate the Content field. Also, you can use Mesa's token feature to send specific information from your previous workflow steps.
The following image is from Mesa's existing template: Send a Discord Message when a Tagged Shopify Order is Purchased