Programmable Automation: Custom Code + Format Actions

SMS Automation

Automating SMS notifications offers substantial benefits, enhancing customer experience and operational efficiency. By integrating HubSpot Operations Hub with services like Twilio, businesses can automate the delivery of time-sensitive messages, such as reservation reminders or access codes. This ensures timely and personalised communication, reducing manual intervention and errors. Customers receive relevant information exactly when they need it, improving satisfaction and engagement. Additionally, automation helps maintain data consistency, as personalised details can be dynamically generated and sent based on real-time data, ensuring seamless and secure transactions.

SMS via Twilo Code Snippet

Use Case

Providing personalised and timely communication is crucial for enhancing customer experience. One of our customers, managing properties in the Alps and Spain faced a challenge in automating SMS notifications to provide exclusive access codes to their accommodations. Their business model caters to both B2B property owners and B2C customers seeking premium stays. They use HubSpot for the entire reservation process pipeline, as well as their marketing and customer service. They needed to streamline the process of sending time-sensitive access codes to guests to ensure a seamless check-in experience and remove manual work from their Operations team. Using Operations Hub's custom code workflows, we automated SMS reminders via Twilio, triggering an SMS containing the personalised access code when a reservation check-in is about to start. The access code, unique to each property and changing after every reservation, is dynamically generated and sent to guests.

To implement this solution, we used custom code actions within HubSpot to trigger the SMS based on reservation data stored in the CRM. The workflow pulls reservation details and formats the SMS content to include personalisation tokens, ensuring each message is tailored to the guest's name and reservation time. Additionally, HubSpot's data quality tools were leveraged to format the SMS content dynamically, maintaining consistency and accuracy. This automated process not only enhances the customer experience by providing timely and personalised communication but also ensures security with unique access codes for each property. By leveraging Twilio API with HubSpot Operations Hub, our customer can now efficiently manage their properties and offer their guests a seamless check-in experience. Do you have a similar use case? Follow the instructions below to get started.

 

Video Resources

Demo from Cat Media Implementation Team

In this hands-on demo, Juan A. Zabala from Cat Media's implementation team guides you through the step-by-step process of sending SMS messages automatically using HubSpot Operations Hub and the Twilio API. The goal is to streamline communication and enhance engagement with your contacts. Watch the demo to learn how to integrate HubSpot with Twilio for automated SMS sending. Juan will show you how to use workflows to send dynamic, personalised SMS messages based on contact properties and behaviour. You can efficiently target and communicate with your audience by setting criteria such as contact roles or specific actions taken. Follow along as he demonstrates setting up the integration, creating workflows, and sending SMS messages to your contacts.

What we'll build

Create Workflow

Create Twilio Account

Create a Custom Event

 

Step-by-Step Instructions to Create Custom Code Action

  1. Navigate to Workflows:
    • In your HubSpot account, go to
      Automation> Workflows.

  2. Create or Select a Workflow:
    • Click on the name of an existing workflow or create a new one by clicking the Create workflow button.

  3. Add a Custom Code Action:
    • Click the + plus icon to add a workflow action.
    • In the right panel, select Custom code.

  4. Set Up Your Action:
    • By default, custom code actions will use Node.js 16.x. If you want to use Python, click the Language dropdown menu and select Python.
    • To add a new secret, click Add secret. Enter the Secret name and Secret value. Click Save. You can now select this secret in future custom code actions.

  5. Manage Secrets:
    • To edit or delete existing secrets, click Manage secrets.
    • Note that secrets are stored as environment variables, and you can access them in your code. For example, using os.getenv('secret_name')in Python 3.

  6. Include Properties:
    • Click the Choose propertydropdown menu and select the property you want to use in your code. Enter a Property nameto reference in your code.
    • To add another property, click Add property. You can use up to 50 properties in your custom code action.

  7. Enter Your Custom Code:
    • In the code field, enter the Python code below. 

  8. Save the Action:
    • Once you’ve entered your code and defined your outputs, click
      Save to save your custom code action.

 

Twilio SMS Code Snippet

Ready to transform your customer communication and operational efficiency?

Maximise your operations team's capabilities with HubSpot Operations Hub and Furball. Empower your team to prioritise strategic initiatives over manual tasks. Discover how our Programmable Automation solutions can streamline and enhance your business processes.

custom code actions ops hub HubSpot-2