TechBuzzPro

Sync Discord to Shortcuts via Zapier

· 6 min read · Discord

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

This guide shows you how to connect Discord to Apple's Shortcuts app using Zapier, so you can trigger a Shortcut from a Discord message (like a slash command or a specific keyword) and pass data between the two. First, you'll need a Zapier account (free tier works), the Discord app or web client, and the Shortcuts app on your iPhone, iPad, or Mac. You'll also need to create a personal automation in Shortcuts that can be run from a URL scheme—Zapier can call that URL when a Discord event happens.

What You'll Need

  • A Zapier account (free plan is fine)
  • Discord account and access to a server where you can add a bot or use webhooks
  • Apple device with Shortcuts app (iOS 15+ or macOS 12+)
  • Basic understanding of creating a Shortcut that accepts input or runs a URL

Step-by-Step

  1. Create a Shortcut that can be triggered externally. Open the Shortcuts app on your iPhone, iPad, or Mac. Create a new Shortcut—for example, one that logs a message or sends a notification. To make it callable via URL, you need to use the "URL" action and the "Open URLs" action, or use the "Get URL from Input" if you want to pass data. Actually, the simplest method is to use the "Open URLs" action with a custom URL scheme like shortcuts://run-shortcut?name=MyShortcut&input=text. Make sure the Shortcut is named exactly as it appears in the URL (spaces become %20). Test it by running it manually first.
  2. Set up a Zapier trigger for Discord. Log in to Zapier and click "Create Zap". Choose Discord as the trigger app. Select a trigger event—"New Message" is the most common. You'll need to authorize Zapier to access your Discord account. If you don't have a bot, you can use a webhook trigger instead, but the "New Message" trigger requires a bot added to your server. Follow Zapier's instructions to add the bot to your server with the necessary permissions (read messages, view channels).
  3. Configure the Discord trigger. After connecting, choose the server and channel you want to monitor. You can set a keyword filter (e.g., only trigger when the message contains "!run"). Test the trigger by sending a test message in that channel.
  4. Add a Webhook action in Zapier. In the Zap editor, click "Add Step" and choose "Webhooks" as the app, then select "POST" as the event. This will let you send a request to your Shortcut's URL. In the URL field, enter your Shortcut's URL scheme, but you'll need to encode it. For example, if your Shortcut is named "Log Message", the URL is shortcuts://run-shortcut?name=Log%20Message&input=Hello. To pass the Discord message content, use the "Message Content" field from the trigger in the input parameter. You may need to URL-encode the message content—Zapier has a "Code by Zapier" step for that, or you can use the "URL Encode" formatter action.
  5. Set up the Webhook action details. In the Webhook action, set the method to POST, and in the Data field, add a key like input and set its value to the Discord message content (you'll see a dropdown to insert the trigger data). Make sure the URL is correct. You can also add headers if needed, but usually not required.
  6. Test the Zap. Click "Test & Review" and send a test message in Discord. Zapier will attempt to call the Shortcut URL. On your Apple device, you may see a prompt asking to open the Shortcuts app—this is normal. If the Shortcut runs, you'll see the notification or action you set up.
  7. Turn on the Zap. Once the test succeeds, name your Zap and toggle it on. Now, whenever a message matches your trigger, Zapier will call your Shortcut.

Common Mistakes

  • Not URL-encoding the Shortcut name or input. Spaces and special characters in the Shortcut name or message content will break the URL. Use %20 for spaces and encode other characters.
  • Using the wrong trigger type. Discord's "New Message" trigger requires a bot; if you don't want to add a bot, you can use "New Webhook" but that requires a webhook URL set up in Discord.
  • Shortcut not set to accept input. If your Shortcut uses the "Receive Input" action, make sure it's set to accept text; otherwise the input from the URL may be ignored.
  • Zapier's Discord bot lacks permissions. The bot must have "View Channel" and "Read Message History" permissions or the trigger won't fire.

Tips

  • Use a unique keyword like !shortcut to avoid triggering on every message.
  • For passing multiple pieces of data, encode them as key-value pairs in the URL (e.g., ¶m1=value1¶m2=value2) and have the Shortcut parse them using "Get URL Components".
  • If you want the Shortcut to run without showing the Shortcuts app, you can enable "Show When Run" off in the Shortcut settings, but on iOS, running a Shortcut from a URL will always open the app briefly.
  • Use a delay action in Zapier if you need to wait for something before calling the Shortcut.

Troubleshooting

If the Zap doesn't work, start with the simplest checks:

  1. Check the Zap's test history. In Zapier, go to the Zap's activity log to see if the trigger fired and if the webhook step succeeded. If the webhook failed, look at the error message—often it's a 404 (URL wrong) or 400 (bad request).
  2. Test the Shortcut URL manually. Open Safari on your iPhone and paste the URL. If it runs, the Shortcut is fine; if not, check the name spelling and encoding.
  3. Check Discord bot permissions. Go to your server settings > Roles, and ensure the bot role has "View Channel" and "Read Message History" for the specific channel.
  4. Make sure the Shortcut is not set to "Private". Shortcuts that are not shared can still be run via URL, but ensure the name matches exactly.
  5. If the Shortcut runs but does nothing, add a "Show Notification" action to verify it's receiving input.

Frequently Asked Questions

Do I need a paid Zapier plan?

No, the free plan includes 100 tasks per month, which is enough for light use. Each time the Zap runs counts as one task.

Can I trigger from a direct message in Discord?

Yes, but the bot must be able to receive DMs. You'll need to add the bot to your friend list or have the bot's DM enabled. In the Zapier trigger, choose the "Direct Message" channel.

Can I pass attachments or images to Shortcuts?

Yes, you can pass a file URL from Discord, but the Shortcut will need to download it using the "Get Contents of URL" action. The URL must be publicly accessible.

Will this work on Android?

No, the Shortcuts app is only available on Apple devices. For Android, you'd need a different automation app like Tasker, but Zapier doesn't have a direct integration with Tasker via URL schemes.

Can I run a Shortcut that requires confirmation?

Yes, but the confirmation prompt will appear on your device. If you want it to run silently, disable "Ask Before Running" in the Shortcut's settings, but that may not be possible for all actions.

What if my Shortcut uses personal data like location?

That's fine, but be aware that the Shortcut will run on your device, so it can access your location. Just ensure you trust the Zapier automation, as it can trigger the Shortcut remotely.