Back to Blog
Integration Guides

How to Integrate Twilio with HubSpot: Step-by-Step Guide

Connect Twilio SMS and voice to HubSpot so every call and message logs automatically against the right contact, deal, and timeline.

DA
Danial A
Senior Twilio Consultant, Telphi Consulting
June 22, 2026
7 min read
Twilio
Integration
CRM
How to Integrate Twilio with HubSpot: Step-by-Step Guide

HubSpot and Twilio together give your sales and support teams the ability to send and receive SMS and make calls directly from the CRM, with every interaction automatically logged to the correct contact timeline. This integration suits any revenue team that needs full call and message history tied to deals, contacts, and pipelines without switching between separate tools. You can build this connection through the official Twilio app in the HubSpot Marketplace for a no-code setup, or programmatically using both REST APIs when you need custom logging logic, field mapping, or multi-step automation.

What You Need Before You Start

You need an active Twilio account with at least one provisioned phone number, along with your Twilio Account SID and Auth Token from the Twilio Console under Account, then General Settings. On the HubSpot side, create a Private App under Settings, then Integrations, then Private Apps and grant it scopes for crm.objects.contacts.read, crm.objects.contacts.write, crm.objects.calls.write, crm.objects.communications.write, and timeline.write. If you plan to trigger SMS automatically from HubSpot Workflows, you need Operations Hub Professional or higher, because the custom webhook action in Workflows is gated at that subscription tier. Gather your HubSpot Portal ID from the URL of your HubSpot dashboard, and create a Twilio Messaging Service in the Console under Messaging, then Services, noting the Messaging Service SID beginning with MG for use in your outbound API calls.

Step-by-Step Integration Guide

Configure your Twilio phone number to forward incoming SMS to your webhook by setting the Messaging webhook URL in the Console under Phone Numbers, then Manage, then Active Numbers, pointing the inbound handler to your endpoint such as https://yourapp.com/twilio/inbound with HTTP POST. In your inbound handler, parse the From, To, Body, and MessageSid parameters from the Twilio POST payload, then call the HubSpot Contacts Search endpoint at POST https://api.hubapi.com/crm/v3/objects/contacts/search with a filterGroups payload matching the phone property to the From number in E.164 format. Once you have the matching contact ID from the search response, create a CRM Communication object by posting to https://api.hubapi.com/crm/v3/objects/communications with properties hs_communication_channel_type set to SMS and hs_communication_body set to the message text. Associate the communication with the contact by calling the associations endpoint at POST https://api.hubapi.com/crm/v3/objects/communications/{id}/associations/contacts/{contactId}/communication_to_contact to link the record and make it visible in the contact timeline.

Common Issues and How to Fix Them

The most frequent issue is receiving 403 Forbidden responses from HubSpot's API even with a valid Private App token, which almost always means a required scope is missing from the app configuration. Go back to your Private App under Settings, then Integrations, then Private Apps, add the missing scope such as crm.objects.communications.write, and update your application with the rotated token that HubSpot generates automatically. Contact matching fails when HubSpot stores phone numbers in local format without a country code while Twilio delivers numbers in E.164 format with a leading plus sign and country code. Normalize all phone numbers to E.164 in your code before running the search query, and consider storing a normalized copy in a HubSpot custom contact property to make future lookups consistent regardless of how the number was originally entered. A third issue is Twilio not reaching your webhook during development because your server is running locally without a public URL. Use ngrok or Cloudflare Tunnel to expose your local port temporarily, and check the Twilio Console under Monitor, then Logs, then Messaging to confirm whether Twilio attempted delivery and what HTTP status code it received back from your endpoint.

How to Get More from This Integration

Build a HubSpot Workflow that triggers on deal stage change and fires a POST to your middleware, which then calls POST https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Messages.json with the To field set to the deal primary contact phone number to send an automated follow-up SMS without any manual action from your reps. Add call recording to your Twilio voice integration by including Record=true in your TwiML response, then write the RecordingUrl from the Twilio StatusCallback to the HubSpot call object field hs_call_recording_url so sales managers can replay calls directly from the contact record. Create a custom HubSpot contact property named last_sms_date and update it on every inbound and outbound message event to build workflow enrollment criteria based on recency of SMS engagement. Route all inbound Twilio SMS to a HubSpot Conversations inbox using POST https://api.hubapi.com/conversations/v3/conversations so multiple team members can see and respond to incoming messages from a shared queue rather than a personal inbox.

Conclusion

A properly built Twilio and HubSpot integration eliminates manual logging, keeps your pipeline data accurate, and lets your team focus on selling rather than copying call notes into the CRM. Contact our team at Telphi Consulting to have this integration built, tested, and deployed in your environment.

Share this article:
0 views

Ready to Transform Your Business Communications?

Get a free consultation with our VoIP experts and discover how we can help you save costs, improve efficiency, and scale your business.

Comments (0)

Join the discussion and share your thoughts (AI-moderated for quality)

Protected by AI moderation

Be the first to comment

No comments yet. Share your thoughts below.