How-To

Connect Drupal 8 Webform with OpenInbound

 

    Task

    You want to connect my Drupal 8 Website with OpenInbound.

    Example 1: You do have a contact webform with a E-Mail, First Name, Last Name and Company. How can you send the data to OpenInbound?

    Example 2: You do have a landing page which offers a pdf. To get the pdf you need to fill out a webform. You want to track the E-Mail address and send the data to OpenInbound.

    Solution

    This configuration needs to be done on your own Drupal 8 website:

    1. Install and enable
      • https://www.drupal.org/project/openinbound
      • https://www.drupal.org/project/webform
    2. Create a webform on /admin/structure/webform
    3. Add an e-mail field and set the machine name to email
    4. For "First Name" set the machine name to first_name
    5. For "Last Name" set the machine name to last_name
    6. For "Company" set the machine name to company_name
    7. For "Phone" set the machine name to phone
    8. Go to your webforms "E-Mail / Handlers" tab (/admin/structure/webform/manage/YOUR_FORM/handlers) and click "Add handler". Choose OpenInbound and add the handler. (This step is not need in Drupal 7)
    9. Done!

    As described in step 3, 4 and 5 - the "connection" between webforms and OpenInbound is done setting the correct machine names. The screenshot shows how it should be set.

    As described in step 8, you need to enable the "OpenInbound Handler" for each webform. There is no additional configuration needed. (This step is not need in Drupal 7)

    Newsletter