Skip to main content

Specifically - we want to set up an integration so that when someone posts a question in our discord channel, we get notified & can see the message in a slack channel, can respond via slack, and that response gets sent to the discord user. 

I saw this template https://zapier.com/apps/discord/integrations/slack/60846/send-matching-discord-channel-messages-for-new-messages-posted-to-slack-channels but am not sure if this will accomplish the above. 

Hi ​@Madeleine11,

 

Welcome to the Community.

 

You can set up a Zap to send messages from Discord to Slack by using Discord as the trigger app with the 'New Message Posted to Channel' trigger and Slack as the action app with the 'Send Channel Message' action.

 

For two-way communication, create another Zap that triggers new Slack messages and sends them to a Discord channel. However, direct messaging the original Discord user isn't possible without their user ID, which Slack does not provide.

 

I hope this helps. Please let me know if you have any other questions.


Hey ​@Madeleine11, just checking in—did Jammer’s reply help to point you in the right direction? 

If not, I wanted to add that you could potentially use a lookup table in Zapier Tables to store the Discord user ids to get around that issue they mentioned of not having the Discord user id information available from Slack. The lookup table could contain a record of the Discord user ids that relate to each of the Slack message threads created. That way the Zap that triggers from a response in Slack and can search the table to find the corresponding record to obtain the Discord user id that the message needs to be sent to.

So the Zap triggers and actions would be as follows:

Zap 1: Capture Discord questions & post to Slack

  • Trigger: New Message Posted to Channel (Discord) – Triggers when a new message is posted in a specific Discord channel.
  • Action: Send Channel Message (Slack) – Sends the message content to a designated Slack channel, starting a new thread.
  • Action: Create Record (Zapier Tables) – Saves the message author id, message content, Slack thread_ts in a new record.

Zap 2: Send Slack replies back to Discord

  • Trigger: New Message Posted to Channel (Slack) – Triggers when a new message is posted in the channel, including replies in threads.
  • Action: Only Continue if… (Filter by Zapier) – Set to check whether the thread_ts field (Text) Exists. The threads_ts field will only appear if it's a message within a thread. 
  • Action: Find Record (Zapier Tables) – Looks up the record based on the Slack thread_ts to get the corresponding Discord username. 
  • Action: Send Direct Message or Send Channel Message (Discord) – Sends the reply from the Slack thread to the Discord user as a DM or as a channel message. To mention the user in the channel message you’d use <@XXXXXXXXXX> replacing XXXXXXXXXX in that example with the id of the user. 


Note: if sending a channel message in the second Zap you’ll want to add a filter to the first Zap to excludeI messages posted by the second Zap, to avoid a Zap loop. If you’ve not worked with filters or lookup tables in Zaps before I’d suggest checking out our Add conditions to Zaps with filters and Create lookup tables in Zaps guides for details on how to set them up.

Keen to ensure you’re all set so if you give that a try and run into any issues or found a different solution please let us know! 🙂