Integrating Squarespace and Tripleseat

- Google App Script

My client wanted to use both TripleSeat and Squarespace together for an event leads funnel. Mostly because the Squarespace native lead form look nicer than an embedded TripleSeat form.

Tripleseat lets you do event planning with leads management tools as good as HubSpot CRM. Squarespace is an excellent WYSIWYG website builder.

Let’s do it.

Diagram

image-20180922124320698

For brevity’s sake, this post presumes you have made a google app script before. If you get stuck somewhere try tutorials in google app script to work your way around the script I have posted below. Or ask in the page below.

Squarespace

So Squarespace lets you store form entries with these options;

.We’re going with Google Drive, more specifically Google Sheets, because there I can write a script that will send leads to Tripleseat.

Use Squarespace form editor and follow the prompts to generate the google sheet that will store your website lead submissions.

Tripleseat

In Tripleseat build your lead form and make it match the Squarespace form you want to make as closely as possible. When you create a form you’ll see a nice button for Setup Codes. Grab the API Endpoint listed near the bottom. They’ve made a friendly endpoint for lead forms and even better documentation.

Google Sheets

In the Squarespace created Google Sheet go toTools/Script Editor and you should see this.

function myFunction() { }

Replace that function with this Github gist and update the formURL with the API Endpoint you got from Tripleseat above.

Update the fields as well to match what you have in Squarespace.

// Get leadform and key from TripleSeat
  var formURL = "http://api.tripleseat.com/v1/leads/create.js?lead_form_id=1234&public_key=1a2b3c4d5e6f7g8h"
  
  // Assign SquareSpace fields to TripleSeat fields here. Any fields not listed here will be put to notes. 
  var thKeys = {
   // Squarespace field : Tripleseat field
   "company_name"       : "company",
   "Email        "      : "email_address",
   "Event Details"      : "event_description",
   "Attendance Number"  : "guest_count",
   "Phone"              : "phone_number",
   "Event date"         : "event_date",
   "Name"               : "Name",
 };

Save the project name when prompted.

image-20180925191807839

Choose postLead in the dropdown above, then click the ▶ button.

image-20180925191940862

Follow the prompts to give this project the ability to run. And, voila, schedule it to run every 10 minutes or as often as you like.