Connect Contact Form 7 with Xendy

Introduction

With Contact Form 7, you can easily create forms in WordPress. By connecting this to Xendy, submissions are automatically added to a ‘static segment’. This allows you to quickly collect new contacts and immediately use them for newsletters or email automations.

Create a Contact Form 7 form

Here’s how to install Contact Form 7 and create a new form:

  1. Log in to your WordPress website and go to ‘Plugins’ in the left menu. Install the ‘Contact Form 7’ plugin and the ‘CF7 to webhook’ plugin. Activate both plugins after installation.
  2. In the WordPress left menu, choose ‘Contact’ and then click ‘Add New’ to create a new form.
  3. Give the form a clear name. Below are 3 example codes you can paste.
  4. Optionally edit the button text or placeholders and save the form. You will then see the shortcode at the top. Paste this wherever you want the form to appear on your website.

Contact form example 1

Contact form with only email address and subscribe button.

<label> Email address

[email* email placeholder “Enter your email address”]

</label>

[submit “Subscribe”]

Contact form example 2

Contact form with email address, first name, and subscribe button.

<label> First name

[text* first_name placeholder “First name”]

</label>

<label> Email address

[email* email placeholder “Enter your email address”]

</label>

[submit “Subscribe”]

Contact form example 3

Contact form with email address, first name, last name, and subscribe button.

<label> First name

[text* first_name placeholder “First name”]

</label>

<label> Last name

[text last_name placeholder “Last name”]

</label>

<label> Email address

[email* email placeholder “Enter your email address”]

</label>

[submit “Subscribe”]

Connect Contact Form 7 to Xendy

Here’s how to connect your Contact Form 7 form to Xendy via a webhook:

  1. Log in to Xendy and go to ‘All contacts’ in the left menu, then click ‘All contacts’ again in the top right. Choose ‘Create new segment’. Select ‘Static’. Choose a name for the segment and click ‘Create segment’.
  2. Now click ‘Add contacts’ in the top right and choose ‘Via a webhook’. A pop-up will appear with a URL and an Authorization: Bearer token.
  3. Open your WordPress website and go to ‘Contact’ in the left menu. Open the form you want to connect and go to the ‘Webhooks’ tab. Paste the URL here and add the Authorization header. Paste the full value: ‘Authorization: Bearer abc123’ (including the full code). Click ‘Save’ to save the form.

Test the connection

To make sure everything works properly, you can run a test:

  1. Go to the page on your website where you placed the form.
  2. Fill in the form with a test email address (for example, your own address).
  3. Log in to Xendy and go to ‘All contacts’ in the left menu, then click ‘All contacts’ again in the top right. Choose the segment you created and check if you see the email address appear in the list.

Add extra fields

The field ‘email’ is always required. If you want to include a first name, the field must be named first_name. For a last name, use the name last_name. You may choose any name for other fields. These will automatically be added in Xendy and you can use them in segments or personalization.

Frequently Asked Questions

The field ‘email’ is always required. If you want to include a first name, the field must be named first_name. For a last name, use the name last_name. You may choose any name for other fields. These will automatically be added in Xendy and can then be used in segments or personalization.