Slack auto invite

How To Send a Slack Auto-Invite From a WordPress Form

Do you want to send a Slack auto invite when a form is submitted? Automatically sending Slack invitations can make it easier to make sure people are in the right channels.

In this example, we’ll show you how to add someone to a Slack channel when a form on your site is submitted.

Create Your Slack Auto-Invite Form Now

How Do I Send an Automatic Channel Slack Invite?

You can send a Slack channel invite automatically using the WPForms plugin.

You’ll just need to connect your forms to Zapier.

Zapier is a service that joins together different sites and services together. You can use your forms as a ‘trigger’, and send the contents of the form entry to another service automatically.

There’s just one thing you need to know. To send a Slack auto invite, the person you’re inviting has to be a member of your Slack workspace already. It isn’t possible to create a new Slack account using Zapier.

But it’s still handy to be able to add people to workspaces from a form, and we’ll show you how in this tutorial.

How To Send a Slack Auto Invite From a WordPress Form

In this example, we’ll create an employee onboarding form. When the form is submitted, the employee will be automatically added to our #onboarding channel in Slack.

Here are the steps we’re going to work through:

For this tutorial, you’ll need the Zapier Starter plan or higher, because we’re going to make a Zap with multiple steps.

Want to send a message or schedule a reminder instead?

You can use the WPForms Slack addon to directly connect your forms to Slack. From there, you can send direct and channel messages, as well as schedule reminders based on your form submissions.

Let’s get started by installing the plugin we need.

Step 1: Install the WPForms Plugin

First, install and activate the WPForms plugin.

You can check out the guide on how to install a WordPress plugin if you need any help.

Next, click WPForms » Addons. Install the Zapier addon and activate it before moving on to the next step.

Install and activate the Zapier addon in WPForms

And finally, go to WPForms » Add New to open the form builder.

Add new form in WPForms

Now we’re ready to pick a template and customize it.

Step 2: Create Your Slack Auto Invite Form

Now we have the form builder open, we can start making the form.

Go ahead and type a name for your form at the top.

Type the name for your Slack auto invite form

WPForms comes with 2,000+ WordPress form templates that make it really easy to create forms quickly. For a Slack auto invite form, you can use any template as long as it has an email field.

In this example, let’s use the employee information form. If you’ve installed the form templates addon, you can search for it in the Additional Templates section.

Choose the Employee Information Form template

Now we’re ready to customize the template.

To add more fields, go ahead and drag the fields you need from the left-hand panel to the right-hand panel. You can also click on each field to make changes to that field.

Click a field in the Slack Auto Invite form to edit it

Remember not to remove the email field, because we’ll need the user’s email address to look up their Slack ID.

Remember to click on the Save button in the top-right corner before moving on to the next step.

Step 3: Publish Your Slack Auto Invite Form

WPForms lets you easily publish your form on a page with a few clicks.

Embed form on a new page

Let’s break this down into steps.

First, click Embed at the top of the form builder.

Embed Slack auto invite form in WordPress

In the popup, you’ll want to click Create New Page.

Create new page for Slack auto invite form

Next, type in a name for the page.

Type in page name

And finally, click Publish or Update at the top-right.

Publish Slack Auto Invite form

Great! The form is live and ready to be filled in.

Before we move on, you’ll need to add at least one test entry. Without this, Zapier won’t be able to set up your Zap in the next step.

The email address you use in this entry must match an existing Slack user in your workspace.

All done? Great. Go ahead and fill out your form, then submit it.

New entry in Slack auto invite form

Now we’re ready to switch over to Slack, but keep WordPress open in another tab for a few minutes. We’ll need to switch back in a second.

Step 4: Connect WPForms to Zapier

In this step, we’ll set up a connection between WPForms and Zapier.

So first, log in to Zapier and click Make a Zap at the top left.

Make a Slack auto invite zap in Zapier

In this Zap, WPForms will trigger the action in Slack. So let’s search for WPForms and select it.

Choose WPForms as your Zapier trigger

The only action available is New Form Entry, so we can click Continue here.

Choose New Form Entry trigger in Zapier

Now we’re going to switch back to the WordPress tab we kept open in the last step.

Go to WPForms » Settings and click on the Integrations tab.

WPForms integrations

Now click on the Zapier icon to see the Zapier API key for your site.

Zapier API key in WPForms

Copy the API key to your clipboard.

Switch back to Zapier. In the connection window, paste in your API key and your site URL. Once done, click on Yes, Continue to connect WPForms to Zapier.

Zapier connection to WPForms

Now click Continue to confirm.

Added WPForms in Zapier

Let’s click the Test Trigger button to see if it’s working.

Test WPForms trigger in Zapier

Zapier will now fetch all the forms in WPForms and list them in a dropdown.

Choose the employee information form you created and click Continue.

Select form to send Slack auto invite

If you see this message, you know everything’s connected and your test entry was found:

Form entry for Slack auto invite zap

Easy, right? Let’s connect to Slack next.

Step 5: Search for Your Slack User

Now it’s time to set up Slack as our ‘action’ app.

Let’s start by searching for Slack and clicking the icon here:

Select Slack action in Zapier

If this is your first time using Slack with Zapier, you’ll be prompted to connect to your Slack account and log in. Once that’s done, click Continue.

Connect Slack in Zapier

Now we’re going to tell Zapier to search for the Slack user that matches the email address in the form entry.

So let’s select Find User by Email and click Continue.

Find user by email to send Slack auto invite

Now we’re going to tell Zapier to use in the email address from the form submission in the search.

All you need to do is select the email field in the Email dropdown and click Continue.

Search for Slack user in Zapier by email address

OK, that’s done. Zapier doesn’t show a result yet, because all we’ve done is search for the entry, and we haven’t told Zapier what to do next.

Let’s click the plus icon here to add another step to the Zap:

Add a step to the Slack auto invite zap

Now we’re ready to add the user to our channel.

Step 6: Add Your Slack User to a Channel

We’ve successfully told Zapier to look for our WPForms user in Slack. Now we need to add another step to tell Zapier what to do once it’s found them.

So let’s start the next part of the Zap by searching for Slack again:

Select Slack in final step of Zap

And now we’re going to select the action Invite User to Channel, and then click Continue.

Invite user to Slack channel in Zapier

Before we move on, you might want to check the user’s Member ID in Slack so you know what to look for in this next part.

To do that, click View Profile for the user and then click the More icon.

Check the Member ID in Slack

OK. We know what we’re looking for. Let’s continue with the tutorial.

Switch back to Zapier now.

There are 2 things we need to do on this screen.

In the Users field, click Custom. Slack will show you the search results from the last step in a section labeled 2: Find User by Email in Slack.

You’ll want to select the user’s ID here.

Slack search result

On the same screen, in the Channel dropdown, select the channel you want to add your user to. This must be an existing Slack channel. We’re going to choose our #onboarding channel in this example.

The end result looks like this. The ID you see on the screen here should be the same as the Member ID we just looked up in Slack.

Insert Slack user ID in Zapier

All set? Click Test and Continue.

Test final step in Slack auto invite zap

And that’s it! We’ve successfully added the person to our #onboarding channel.

Successful test in Zapier

Here’s the result in Slack:

Result of Slack auto invite from WordPress form

Don’t forget to turn your Zap ON so that this Zap runs automatically when your form is submitted.

That’s it! You’ve successfully connected your WordPress form to Slack to send automatic invitations.

Create Your Slack Auto-Invite Form Now

Next Step: Set Up an Onboarding Project in Toggl

The Zapier addon in WPForms lets you connect your forms to hundreds of services. Try adding more Zaps to use your form data in new ways.

For example, when you add an employee, you could automatically create a Toggl project for your HR department so they can work through a list of onboarding tasks.

Ready to build your form? Get started today with the easiest WordPress form builder plugin. WPForms Pro includes lots of free templates and offers a 14-day money-back guarantee.

If this article helped you out, please follow us on Facebook and Twitter for more free WordPress tutorials and guides.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPForms is funded, why it matters, and how you can support us.

Claire Broadley

Claire is the Content Manager for the WPForms team. She has 13+ years' experience writing about WordPress and web hosting. Learn More

The Best WordPress Drag and Drop Form Builder Plugin

Easy, Fast, and Secure. Join over 6 million website owners who trust WPForms.

Please enable JavaScript in your browser to complete this form.

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

This form is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.