Skip to main content

15.7 Synchronization with Zapier

Zapier is a product that allows end-users to integrate web applications and automate workflows. It enables the connection of various web applications through "ZAPs," which can be customized based on user needs. Zapier functions as a bridge between different applications, allowing the automation of business processes and saving valuable time.

How to Create a Zapier Integration with vtenext

The purpose of this tutorial is to send an email to a Zapier address and create a Lead directly in vtenext.

1. The first step is to go to https://developer.zapier.com/, log in with your Zapier credentials, and click on "Start a Zapier Integration."

image-1706191562529.png2. It is then necessary to fill in all the fields that the Zapier screen requests.

Example:

Name: vtenext_new
Description: Invio email in creazione lead
Audience: Private
Role: I have no affiliation with...
Category: CRM

image-1706191671071.png3. After a successful save message and successful creation, you will be able to configure the type of authentication.

image-1706191953149.png

You should select BASIC AUTH and then click on SAVE accordingly.

image-1706191993501.png

STEP 1: Leave it blank and click on CONTINUE.

image-1706192079632.png

STEP 2: Enter in the test, the POST method, and configure the URL with the following string: https://VTE-URL/restapi/v1/vtews/listtypes (where VTE-URL is the absolute address of your vtenext installation).

image-1706192133429.png

STEP 3: It's time to test the authentication by clicking on the blue "Sign In" button and finally clicking on SAVE & FINISH.

CAUTION: The password to use is the access key of the vtenext user, which can be found in the user's preferences.

image-1706193489407.png

STEP 4: Now let's add a trigger, for example, the creation of a Lead. The trigger will be triggered by any condition present in a process in vtenext.

image-1706193544961.png

Clicking on the CREATE A TRIGGER button will present a screen with some fields to fill in. These fields should be managed based on what you want to achieve with the trigger itself (in the example, it involves intercepting the creation of a new Lead).

image-1706194363869.png

Once all the fields are filled in, click on SAVE & CONTINUE at the bottom of the page on the right.

Immediately after, the following page will appear, where you will need to click on API CONFIGURATION to create a webhook.

image-1706194552393.png

In STEP 1, choose the following parameters:

SUBSCRIBE

  • REST Hook (select it)
  • POST (select it from the dropdown menu, then enter the following webhook, replacing VTE-URL with the correct address of your CRM)

image-1706194622710.png

https://VTE-URL/restapi/v1/vtews/zapier.subscribe
{"module":"Leads","hookUrl":"{{bundle.targetUrl}}","zapid":"{{bundle.meta.zap.id}}"}

In this code, you can replace "Leads" with the module you want to configure.

Continuing the configuration, scrolling down the page, we find the UNSUBSCRIBE option, which should be configured with the following code.

image-1706195011908.png

https://labs2.vtecrm.net:8443/restapi/v1/vtews/zapier.unsubscribe
{{bundle.subscribeData.id}}

Continuing with the PERFORM LIST parameter, you will need to configure the following code.

image-1706195062400.png

https://VTE-URL/restapi/v1/vtews/zapier.perform_list
Leads

Finally, for PAGINATION, there is nothing to configure, and you can click on SAVE API Request & Continue.

image-1706195126809.png

At STEP 2 of the Trigger configuration, nothing needs to be configured.

image-1706195166624.png

At STEP 3 of the Trigger configuration, it is necessary to leave the field in that block empty.

image-1706195707584.png

On the left-hand column, click on the ACTION item, and then on the right, click on the CREATE ACTION button.

image-1706195766890.png

It will open the following screen, which needs to be filled out as shown.

image-1706195800205.png

After completing the fields as shown in the previous image, you can click on SAVE AND CONTINUE. This will allow you to move to the next TAB to configure the INPUT DESIGNER.

image-1706195883812.png

In this screen, click on ADD, choose INPUT FIELD, and the next configuration screen will appear.

image-1706195930876.png

Enter the variables in the appropriate fields as indicated and then click on the SAVE button. This will move you to the API CONFIGURATION tab.

image-1706195985809.png

In this screen, enter the variables as shown. Replace "VTE-URL" with the full address of your vtenext installation. Finally, click on SAVE API REQUEST & CONTINUE.

https://VTE-URL/restapi/v1/vtews/zapier.search
SELECT id FROM Leads WHERE email='{{bundle.inputData.email}}';

In the TEST phase of STEP 2 on this page, enter a valid and existing email address for connection testing.

For the OUTPUT tab:

  1. Use the response from the test data.
  2. Generate output field definitions.
  3. Set the appropriate type for each field.

Finally, click on SAVE OUTPUT & FINISH at the bottom right.


CREATION OF ZAP

Example 1

In this example, we try to send an email when a lead is created in vtenext:

  1. Go to https://zapier.com/app/dashboard

  2. Click on Create

  3. Trigger: vtenext, event = new lead

    • Account: Keep
    • Note: Perform a test. You should receive a lead.
  4. Action: Send email by Zapier

    • To: email (insert the email address to which the email should be sent)
    • Subject: Lead Created + variables or fields you want to add
    • Test: Ok
  5. Finally, click on PUBLISH.

For more details, refer to this link.


PROCESS ON VTENEXT

image.png

It is necessary to create a process in vtenext where one of the actions is the Webservice called "send to Zapier".

image.png

Raw body = $sdk:vte_json_record($1-crmid) > where $1-crmid is the id of the record to be sent.

Or

$sdk:vte_json_field_string($1-crmid, firstname, lastname, phone, ...)

To send only some fields, you can choose the ones that interest you the most.

NOTE: If the zap is deactivated and recreated, the process must be modified to use the new webservice.


Example 2

In this example, we will try to create a lead in vtenext when an email is sent to a Zapier address:

  1. Trigger: Email by Zapier
  2. Address: es vtenext.tvrhqw@zapiermail.com (insert your own Zapier email address)
  3. Action Text Formatter: Extract email from the body
  4. Action Text Formatter: Extract name with pattern
  5. Action vtenext: Create lead

DataField:

  1. firstname = ...
  2. lastname = ...
  3. company = ...
  4. email = ...

Finally, click on PUBLISH.

At this point, by sending emails to that configured Zapier address, leads are created in vtenext.

These are just a few examples of what the integration with Zapier can do. You can try and come up with all the triggers you want! Just think that, using Zapier paths, it is possible to create or update records by searching directly in the attributes of incoming emails. But it's just an example that helps you understand the power of the tool.