Give users the option to join your Discord server, by adding a WordPress form to your website, and connecting your form to your Discord server. With our WordPress form builder and Zapier add-on, you can create a WordPress form that allows your user to:
- Join your Discord server
- Post messages to Discord directly from your website.
- Host community nights, where you can invite your followers to connect with you over chat.
Read below to find out how to connect your WordPress form to Discord, in three easy steps.
Getting Started
First, you will need to download and sign up for Discord. To do so, please read through Discord’s Getting Started guide. Then, you will need to make sure you have the Ninja Forms plugin installed and activated.
To connect Discord to Zapier, you will need the help of our Ninja Forms Zapier add-on. This add-on establishes the link between WordPress and the application you want to send data to. Install and activate the Zapier add-on then move on to setting up your WordPress form.
1. Set up your WordPress form
For the purpose of this article, I have created a demo form, to help get you up and running. Sign up for our newsletter to get access to the demo. Once the form is downloaded, upload the form ( Ninja Forms > Import ) to your site, and run a test submission. Otherwise, proceed with the form quick-start below:
- Navigate to Ninja Forms > Add New
- Select the Blank Form template
- Add, a Single Line Text field for the Discord User Username, and a Paragraph field for the message by clicking the blue icon at the bottom right.
- Next, click on Email & Actions, add the Zapier action and Publish. We will come back to the Zapier action and add the webhook later.
- Submit a test entry. You will need this for the Zapier workflow.
2. Start the Zap workflow!
Integrations between applications handled by Zapier are called Zaps. We’ll be creating a Zap that will connect Ninja Forms with Discord. It’s super simple. Follow the steps below to get started:
- Log into your Zapier account, https://zapier.com/app/login, and click “Dashboard”.
- You will see Create your own workflow text box. In the Connect this app field, type Ninja Forms, with this one field, type in Discord. Doing so will trigger two additional fields called When this happens… and then do this.
- In the When this happens field to select, New Form Submission
- In the ‘then do this!’ field, select, Send Channel Message.
- Click, Try It
3. Configure the Zap
Trigger
Click on the New Form Submission in Ninja Forms Trigger, and then click Continue.
Doing so will trigger the Webhook URL that is needed for your Ninja Form. Copy the webhook, and head back to your form. You will paste the hook into the Zapier WebHook field of the Zapier action ( form > Email & Actions ).
Before returning to your Zap, make sure you have completed a test submission of the form. This test data is what will be used by Zapier when testing the trigger. I have personally forgotten this step many times, and it has caused a lot of headaches. It is also the number one reason why your Zap isn’t working.
Return to Zapier, and click Test Trigger. If the test is successful you should see data from your form submission. If not, that is because you forgot to complete your form test submission 🤓. Click Continue to move on to the next step.
Action – Find User in Discord
Next, click the blue plus sign to add the Find User in Discord action. Choose Discord, connect your Discord account, and set up the action. Pull the Username from the Ninja Form submission data. Leave, “Should this step be considered a “success” when nothing is found, as “No” and click the blue Continue button.
Test the action and move on to step 3, Only continue if….
Action – Only continue if ….
This is where we will add a filter action, to check if the user’s Discord Username exists. In the Only continue if…. field, select Finder User in Discord > Show all options > User Username < Discord username >.
Proceed by clicking the blue Continue button.
Action – Send Channel Message in Discord
We are almost done! Click the blue plus sign again and add another Discord action, and set the event to Send Channel Message.
Choose the Discord account, select the Channel, apply your Ninja Forms form fields, to the message text. Click Test and Continue. This is where you will pull data from your form. Doing so will pull the value of the field for any subsequent form submissions.
If you are successful, you should get a bot notification from Discord, that a user has posted a message.
Connecting your WordPress forms to Discord is easy!
Now that you know how to connect your WordPress form to Discord, here are more ways to use Ninja Forms and Zapier together:
It’s a big world though, and the WordPress.org repository can’t possibly cover it all. That’s where Zapier comes into play, connecting you to apps that don’t have an official plugin yet. We’re proud that your WordPress forms in part make that connection possible. We hope you enjoy your new connection!
Sign up for our newsletter to receive access to the form demo as well as the Zap that we just created. Use it as a reference, for troubleshooting, or to just get you up and running.