Best answer

Wordpress - send slack direct messages from wordpress site to different slack users

  • 27 August 2020
  • 3 replies

Userlevel 1

Hi all,

I’m trying to understand if zapier offers an integration between Wordpress and Slack that will allow my wordpress website to send direct messages to slack users, not to slack channels.


my goal is to be able to automatically (using cron job on my WP site)  send direct messages to our slack users.


Thank you all, stay safe and well! :)


Best answer by robschmidt 3 September 2020, 18:04

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

Userlevel 7
Badge +9

Have you worked with this integration? 

I’d use New Post as a trigger and the action is a slack direct message to the user.

More information on the trigger would be useful as the slack part is simple :)

Userlevel 1

Hi Rob, Hope y are doing well.

First of all i would like to thank you for the time you toke for this reply, i appreciate it :grinning::pray_tone2:

In the link you have attached do you mean the “Get Slack notifications for new WordPress posts” integration?


At this stage my goal is to use a slack bot user in order to direct message  different slack users on my workspace\account via our website.


We don't need back and forth communication, so no need to allow the users to reply to the slack bot, it is a single\one-side channel of communication where the only one who sends messages to other users is the slack bot.

This is the flow we would like to implement:

1. user logs in to our WordPress website


2. user watch's data on our site and wants to share it with other slack users on a direct message to a specific user or several users at once (Not to a slack channel)


3. user will click on a call to action on our site that will trigger a message window\box


4. we would like to automatically copy the current page url or any other data from the DOM and add it to the message body (we will handle the data collection, just need to know how to enter the desired text to the message box) and then have the slack bot to send that message.


5. we would like to  allow the user to add some more free text of his own in addition to the text we will  automatically add by our code.


Will appreciate any implementation idea \ examples


Thank you again for your help and have a fabulous day! :call_me_tone2::blossom:

Userlevel 7
Badge +9

Hi @jossef !

Got it, for this I’d try using google tag manager to deploy a script that invokes a zapier webhook with the payload you want to pass through. You can have the tag trigger on whatever event you want, it’s a great way to get data from your site over to zapier.

Here’s an example:


var xhr = new XMLHttpRequest();"POST", 'ZAPIER WEBHOOK', true);
xhr.setRequestHeader('Content-Type', 'application/json'),
    'Name': {{DLV - testName}},
    'Source': {{itm_source}},
    'Purpose' : {{DLV - testPurpose}}