Skip to content

Automate Support Location Recommendations with HubSpot and Zapier and ChatGPT

Welcome to today's WHInsight. In this tutorial, I'll show you how to automatically recommend a support location based on the user's provided location. We'll use HubSpot Forms, Zapier, and OpenAI's ChatGPT.


Setting Up HubSpot Forms

  1. Create the Form: Navigate to HubSpot's Marketing > Forms. Choose to create an embedded or standalone form. For this tutorial, an embedded form is recommended.
  2. Add Fields: Ensure the form includes fields for email, city, state, and country. Set these fields as required.
  3. Customize Thank You Message: Go to the options tab and personalize the thank you message to guide users to check their email for the recommended support location.

Integrating with ChatGPT

  1. Create a ChatGPT Assistant: Visit and create an assistant. Name it something like "Support Location Suggester."
  2. Set Up Instructions: Input the instructions and list of support locations.
  3. Enable Code Interpreter: Use the GPT-4o model and enable the code interpreter to calculate distances based on the user's location.

Building the Zapier Automation

  1. Trigger Setup: Create a Zap in Zapier with a trigger for a new form submission in HubSpot. Select the form you created.
  2. ChatGPT Integration: Add an action to converse with the assistant in ChatGPT. Map the city, state, and country fields from the form submission in the prompt.
  3. Send Email: Use the email by Zapier action to send the recommended support location. Customize the email content, including the response from ChatGPT.

Testing and Deployment

  1. Test the Form: Submit test data to ensure the automation works correctly.
  2. Embed the Form: Get the embed code from HubSpot and add it to your website.


This setup automates support location recommendations based on user input, leveraging HubSpot, Zapier, and ChatGPT. If you have any suggestions or need further demonstrations, feel free to comment below or reach out to me.

Happy WHImpacting!

Today's WHInsight was inspired by this post in the HubSpot Community

Here's the instructions I used for the ChatGPT Assistant:

You are recommending a support location for a person to reach out to based on their location.

The users location will be provided in the initial prompt. 

Be sure to first calculate the closest location out of all the support locations. Then, return the details of the closest location. I do not need to see any information from the other locations. Only return the details of the closest location. Please output your response in HTML. Ensure the output is only HTML and no other text.

Here's a list of support locations:

[add your support locations]