...
"

Use Slack with WordPress and Woffice to boost your productivity

woffice blog
woffice blog
woffice blog
woffice blog

Today, we will discuss how we can integrate WordPress and Slack with the Woffice theme.

Slack has over 5.8 million active users and powers communication for more than 60,000 teams around the world (source). Yet, we won’t go through all of Slack’s milestones here. Just to say, Slack is an extremely popular tool, and it offers a great way to get rid of emails. Certainly, that’s why everyone loves it!

Furthermore, the biggest advantage of Slack is its ability to add 3rd-party applications, allowing you to use several popular applications for your business. Over 150 integrations are actually on their apps directory, all for free.

So, what about receiving live notifications from your WordPress intranet/extranet right into your Slack channels? Sounds cool. Well, we will show you how to connect WordPress to Slack in 5 minutes.

5 Best Reasons to Integrate Slack with WordPress

Before we dive into the process of Slack app integration with WordPress, let us try to understand why we need it.
Integration of Slack with WordPress makes your website more powerful by adding automation and communication capabilities. Along with improving team communication, Slack app integration allows your team to become more productive. Let’s quickly look at the top 5 reasons why you should integrate Slack with WordPress websites.

1- Improved Team Communication

With Slack powering your WordPress website, you no longer need to share updates with your team via email. Whether it’s about a new blog post, user signups, or form submissions, Slack notifies everyone quickly and keeps everyone informed.

2- Task Automation and Workflow Improvement

Slack eliminates the need for sharing task updates and reminders manually. If you have an intranet website with project management features, you can trigger Slack messages for certain actions, such as task status change and review requests.

3- Real-time Notifications

Get notified in real-time for a failed login attempt, plugin update, a new user comment, and more. This will help you to take immediate action and make sure you are in complete charge of your website.

4- Simplified Content Management

Publishing content regularly on your website requires you to collaborate effectively with a team of writers, editors, and designers. Slack ensures everyone is working in sync by sending instant notifications for new drafts, published posts, and revisions.

5- Enhanced Website Monitoring and Security

Slack seamlessly integrates with many website monitoring and security tools. This ensures you get alerts directly on your Slack channel whenever your website faces downtime, finishes a backup, or detects suspicious activity. It will help you to act fast and ensure complete protection of your website.

How to Integrate Slack with WordPress?

We assume you have WordPress set up on your side with the Woffice theme installed. That’s all you need, with a Slack account, of course.
First, we have to activate the Woffice Slack extension from Woffice (or Unyson page) > Extensions:

Secondly, we need to create our own Slack app in order to create a connection between your WordPress Intranet and your Slack team account. For this, you have to click the “Settings” link to go to the extension’s settings page. You can now see a “Create a new application” link that will lead you to the right place.
Click on “Create New App” and fill in the form, everything can be changed later. You should see:

Then, once your application is created, you’ll get a client ID and a client Secret. You need to copy/paste those two fields in the extension’s settings back on Woffice:

Last but not least, you need to copy/paste the Call Back URL from the Woffice extension’s settings to the Slack > OAuth & Permissions > Redirect URL input field:

You can add your own icon to your Slack boat.

Don’t forget to save everything. At this point, we have a new application on Slack, which is a good start!

Thirdly, we need to assign our notifications to a Slack channel through our brand-new application. We can do that by going to the “Slack Notifications” tab on the extension’s settings page.

Thus, we can see a pretty sweet “Add to Slack” button. Well, we can click on it so we can choose which channel the notifications will be published on. Once this button is clicked, you need to authorize access to your Slack team. Then, you can select a channel from the “Post to” option. See:

You can now choose the triggers that will push notifications from WordPress to your Slack channel.

We’re ready to go! Whenever an action (that you’ve enabled on the above form) is triggered on your Intranet, it’ll be sent in real-time to your Slack channel. So you can keep all your data in one place, saving time and improving your team communication.
Note that we’ve added 5 triggers so far, but we’ll add more in the coming updates. Just let us know your thoughts if you have any ideas.
The available triggers (Woffice 2.2.0) are whenever a new:

  • Comment is posted
  • User is registered (or added by an administrator)
  • BuddyPress activity (only if the activity is public)
  • Post (whether it is a blog post, page, project, wiki, product, or directory item)
  • Task on a project

Move One Step Further and Create Your Own Notifications

The best part of Slack app integration with Woffice is that Woffice comes with a helper function to manage all the dirty API code for you. One single function to use anywhere in your Intranet/Extranet to post Slack notifications that you can customize in a matter of minutes.
We assume here that you have PHP skills (you don’t need to be an expert here).
The function is defined in woffice/framework-customizations/extensions/woffice-slack/helpers.php and can be used like this:

// Our notification data:
$notification = array(
'title' => 'Hey I\'m the title',
'title_link' => 'Link to your site or any page', // like: get_site_url()
'pretext' => 'Just above the title',
'text' => 'Text content',
);
// Let's send our notification to our Slack channel
woffice_slack_send_notification($notification)

Although if you try that PHP code in your child theme, it’ll work right out of the box. However, there are 2 important points to keep in mind:

  1. Slack API is rich! The $notification array will be passed as a Slack attachment; see their documentation for all details. So you can add images, author names, icons, buttons…
  2. You must call woffice_slack_send_notification under an add_action() callback function (see next example). So, your notification is triggered by a certain event and not whenever your page is loaded.

Developer example: Contact Form 7 Slack integration

Finally, we’ll now see an example with the Contact Form 7 plugin. We’re using the default contact form, but you can adapt it to your settings.

/**
* Trigger a notification whenever an email is being sent
* through a Contact Form 7 form
* Note that :mail: & :bust_in_silhouette: are Emojies used by Slack
* @param $contact_form : WPCF7_ContactForm
*/
function woffice_slack_hook_cf7($contact_form) {
// We get the form title:
$title = $contact_form->title();
// We get the current submission
$submission = WPCF7_Submission::get_instance();
if ( $submission ) {
// We get the submission data:
$posted_data = $submission->get_posted_data();
// We build our notification array:
$notification = array(
'title' => $posted_data['your-subject'],
'title_link' => get_admin_url(),
'pretext' => ':mail: ' . __('New form submission on', 'woffice') . ' ' . $title,
'text' => $posted_data['your-message'],
'fields' => array(
array(
'title' => ':bust_in_silhouette: ' . __('Sent by', 'woffice'),
'value' => $posted_data['your-email'],
'short' => true
)
)
);
// We push the notification to Slack
woffice_slack_send_notification($notification);
}
}
add_action('wpcf7_mail_sent', 'woffice_slack_hook_cf7');

It’s just an example, you can do that with your favorite plugins, as long as they’re well documented. Building your custom notifications will be very easy.
We’re really looking forward to adding more integrations. Let us know your ideas.

Real-World Use Cases of Slack Integration with Woffice

While Slack is well-known for transforming team communication, its integration with Woffice unlocks a new dimension of possibilities. Woffice is a powerful WordPress intranet and project management theme. Slack integration with Woffice takes automation, team collaboration, and transparency to another level.
By pushing real-time updates from your WordPress websites into Slack channels, your team becomes more agile.
The following are some use cases to show how Slack and Woffice together are making a difference across different industries.

IT and Software Development Teams

  • Slack integrates with forms on a website so that when a user submits an IT issue, it instantly gets posted to a support channel.
  • Developers easily track the changes by getting notified whenever a plugin or theme gets updated.
  • Push error logs and downtime reports to a Slack channel.

Marketing

  • Inform your team on Slack when you add a new campaign to your Woffice dashboard.
  • Automatically share new blog posts and landing pages with the marketing team.
  • Share marketing stats, such as most viewed pages, leads generated, and social media engagement through Slack.

Operations and Project Management

  • Notify team members and stakeholders whenever a task is created, assigned, and completed.
  • Share alerts over Slack about upcoming deadlines, project deliverables, and meetings.
  • Broadcast details about a new project and timeline changes.

Human Resources

  • Post a welcome message automatically in the team channel for every new member added to Woffice.
  • HR managers get notifications whenever employees submit a leave request.
  • Get alerts when employees fill out surveys, engagement polls, and feedback forms.

Final Thoughts

Integrating Slack with WordPress and the Woffice theme unlocks an effective way to streamline communication and boost productivity. Moreover, it helps you to improve content workflows and HR processes. In all, Slack WordPress integration ensures that your team stays updated about everything that happens on your website.
Combining Slack with the Woffice theme allows you to centralize information, reduce dependency on emails for communication, and create an agile work environment. Try Slack integration with Woffice today and manage your website smartly.

blog-img
blog-img

Comments 5

  • Is it possible to match wordpress to slack groups? So fe. if I create a project for the group “admin” this also should be shown to the users who are also in the slack group “admin”.

  • Is it possible to create other way integration? I mean, to show new messeges from slack, on the website?
    We use slack to post offical company information, so it would be nice to show it also on the intranet page.

    • Hi there,
      Thanks for your message.
      I’m not sure to understand what you mean to be honest!
      Don’t hesitate to open a ticket on our support desk alkaweb.ticksy.com and we will be happy to help.
      Thanks.

  • Hi there!
    We would need notifications to be sent when :
    – when a message is sent to all users (via Messages -> Write a message)
    – when a private message is sent (how is the private woffice account linked to private slack account?)
    Also, not so related to slack, but when a message is sent to all users (via Messages -> Write a message), there is no notifications whatsoever by email or anything apart from the top bar pop-up when logged in the intranet…could it also be sent by email?
    Thank you!

    • Hi,
      Thanks for your comment.
      Can you please open a ticket on our support desk so we can help or point you in the right direction?
      Thanks.

Comments are closed.