How to gather leads through a prize giveaway using barcodes, Google Sheets and webhooks

With

Integromat

https://nocode.b-cdn.net/nocode/tools/Integromat-logo.png Logo

Made By

Wayne Govender

Wayne Govender Logo

For

Intermediates

IntermediatesIntermediatesIntermediates
Reading this Lesson will take Approximately: 
6m

Lesson Content:

What this scenario does: Competition - Personal details are entered on a Google form which is transferred to a Google Sheet, an email is sent containing a barcode which is scanned to see if the person has won a $50 voucher.


Level of difficulty: Intermediate


Implementation Time: Approximately 30 mins


Assumptions: Connections to Google Sheets and Gmail have been added. Basic understanding of Functions , Filters and Webhooks. You can create Google Form and add it to your website. Customer has a QR scanner app.


We're all aware that obtaining customer details is essential for building databases and long-term relationships with your target market however, it’s unlikely that a person is willing to hand over this information without receiving something in return. Let us show you how to set up a competition to gather leads using a barcode and Webhooks.


Configuring the scenario


There are 2 scenarios involved in this tutorial which consist of the following modules:


  • Google Sheet > Watch rows
  • Google Sheets > Update a row
  • Tools > Set Variable
  • Barcodes > Generate a barcode
  • Gmail  > Send an email
  • Webhooks > Custom webhook
  • Webhooks > Webhook response


Here are the scenarios:


Scenario 1


Scenario 2



Here is a look at the Google form that the customer enters information into:




The Google Form is created into a Google Sheet in order to be selected in the module. This is done by clicking on the Responses tab and then Create a spreadsheet:




Here is a look at the Google Sheet with the relevant headers and columns:



Scenario 1:


In the Google Sheets > Watch Rows module, the spreadsheet as well as the specific sheet in the spreadsheet are selected:




The Tools > Set Variable module is added to the scenario. The goal here is to generate a random number which is used to determine if the customer has won or not. In determining a winner the following logic will be used: even number = win, odd number = lose. We’d like the random number to be a whole number between 0-10.


To convert the random number to a whole number, the floor function which is found under the Math functions tab, is used here. This function returns the largest integer less than or equal to a specified number. The random ID element which is also located under the Math Functions tab, is mapped within the parenthesis followed by *10:




Let’s take a look at the Barcodes > Generate a barcode module. Under Barcode Type, the QR Code is selected. Under Error correction, the Level M (15%) option is selected.


The Webhook URL is copied from the Webhooks > Custom webhook module in Scenario 2 and pasted in the Text field. The random id from the Set Variable module and the Row number from the Google Sheets > Watch rows module are mapped here to form part of the URL:




Here is the Webhook URL in the Webhooks > Custom Webhook module in Scenario 2 that was copied and pasted into the Barcodes module:




Following the Barcodes module is the Gmail > Send an email module. The email element is mapped from the Google Sheets > Watch rows module to provide the email address of the customer.


Under attachments, the Barcodes module is selected as the Source file. The barcode will appear in the body of the email:




The last module in Scenario 1 is the Google Sheets > Update a row module. The Random ID column in the Sheet is updated with the random ID (number) generated by the Set Variable module. The Row number element from the Google Sheets > Watch rows module is mapped to the Row number field to identify the row to update:  




The random_id element from the Set Variable module is mapped to the Random ID field:




Scenario 2:  


When the barcode is scanned, the Webhook > Custom webhook module is instantly triggered. This module contains the Webhook URL required for the Barcodes module which was shown earlier. So let’s look at the Webhooks > Webhook response module.


In the Status field, 200 is entered as the value should be greater than 100. In the body, HTML content (optional) is used to create custom text that is displayed after the barcode is scanned. The text displayed depends on whether the result is a win or lose:




As mentioned earlier, an even number = win, odd number = lose. To determine if the random number is an even number, the Mod operator which is found under Math functions, is used within the HTML content. This operator is used in combination with the IF function found under General functions, which outputs a specified text for each result:




The random_id element and the Mod operator are mapped within the parenthesis. The number 2 is entered, the equals to operator (under General functions) is mapped and 0 is entered to check if it’s an even number. The text for both results are then entered and are separated by semicolons.


If the random number is an even number, text 1 is displayed, if not, text 2 is displayed:




The final module in Scenario 2 is the Google Sheets > Update a row module. The route between the Webhook Response and the Google Sheets > Update a row modules contain a filter. The purpose of this filter is simply to check if the row number exists in order to be updated. The Row number element from the Custom Webhook module is mapped in the first field and the Exists basic operator is selected:




In the Google Sheets > Update a row module, the Confirmation column in the sheet is updated with the result (win/no win). The Row number element from the Custom Webhook module is mapped to the Row number field:




In the Confirmation field, the function used in the Webhook Response module is also used here to determine the result with the exception of the text being changed to Win/No win:




The scenarios are fully configured and have executed twice successfully. Let’s take a look.


Scenario execution 1: Form completed, barcode emailed, scanned and contains an even random number


The email received:



The confirmation after the barcode scan:




The updated spreadsheet:




Scenario execution 2: Form completed, barcode emailed, scanned and contains an odd random number


The confirmation after the barcode scan:




The updated spreadsheet:



There you go! Now you know how to use a combination of Barcodes and Webhooks to create scenarios on Integromat!


Happy Automating! 🙌


Notes:

Watching this Video will take Approximately: 
6m

The Original Source of this content may include additional useful information or context, and will likely contain links to any content, templates or resources mentioned by the narrator. You can find visit the source below:
Description:
Description:
Notes:
Watching this Video will take Approximately: 
6m
The Original Source of this content may include additional useful information or context, and will likely contain links to any content, templates or resources mentioned by the narrator. You can find visit the source below:
Tools used in this Tutorial