n8n

How to Automate HubSpot Chat Customer Support?

Turn live chat into a fast, AI assisted support flow. New messages from HubSpot are sent to an AI assistant, actions run when needed, and clear answers are posted back to the same chat. Great for teams that want quicker replies and less manual work.

A webhook catches the chat event, then a HubSpot request pulls the full message. Airtable stores a link between the HubSpot thread and the matching AI thread. If a link is missing, a new AI thread is created and saved. If a link exists, the message is added to that thread. An OpenAI run starts and the flow checks status until it is done. If the assistant asks for an action, a switch routes the request to the right HTTP call or code step, sends the result back to the assistant, and resumes the run. When complete, the latest assistant message is fetched and posted back to the HubSpot conversation.

You will need HubSpot API access, an OpenAI API key, and an Airtable base for thread mapping. Set the assistant id and the OpenAI beta header. Expect faster first replies and fewer tickets for agents. Useful for live support, lead capture, and common tasks like order checks or booking updates, where the AI can call tools and return results to the customer.

What are the key features?

  • Webhook intake captures new chat messages from HubSpot
  • Fetches full message details using the HubSpot Conversations API
  • Looks up or creates a thread link in Airtable to keep conversations in sync
  • Creates a new OpenAI thread for first contact or posts to an existing thread
  • Starts and polls OpenAI runs with wait steps until completion
  • Routes tool requests from the assistant to HTTP calls or code blocks
  • Sends tool outputs back to the assistant and resumes the run
  • Gets the final assistant reply and posts it back to the HubSpot thread
  • Handles in progress, action needed, and completed states with a switch

What are the benefits?

  • Reduce manual triage from 10 minutes to under 1 minute per chat
  • Automate up to 70 percent of repetitive chat responses
  • Cut copy paste errors by 90 percent with a single source of truth
  • Handle up to 5 times more concurrent chats without extra staff
  • Connect HubSpot, OpenAI and Airtable in one seamless flow

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with HubSpot, OpenAI and Airtable. See the Tools Required section above for links to create accounts with these services.
  3. In the n8n credentials manager, create an OpenAI credential. Generate an API key in your OpenAI account and paste it into the API key field. Save the credential.
  4. Set up HubSpot access. Double click the HubSpot nodes, choose Create new credential, then pick OAuth or Private App Token. For a token, create a Private App in HubSpot, copy the token, and paste it into the credential. Save and test the connection.
  5. Create an Airtable credential. In Airtable, create a token with the right base access. In n8n, create the Airtable credential and select your base. Save the credential.
  6. Prepare an Airtable table with fields for messaging_thread_id and openai_thread_id. Optionally add fields for source and timestamps.
  7. Open the OpenAI HTTP Request nodes. Confirm the assistant_id value and that the header openai-beta is set to assistants=v1.
  8. Open the Webhook node and copy the production URL. In your HubSpot app or chat settings, set the webhook to send new message events to this URL.
  9. Configure the action routes. In the Select Function switch, set the case labels that match your assistant tools. Fill in the HTTP Request or Code nodes to run the actual business actions.
  10. Run a test. Send a chat message in HubSpot, watch the n8n execution, and confirm a new row is created in Airtable linking both thread ids.
  11. Verify the AI reply appears back in the same HubSpot conversation. If not, check authentication on HubSpot nodes and confirm the thread ids are correct.
  12. Common fixes: 401 errors mean bad credentials. 404 on OpenAI run often means a wrong thread id. If the run does not progress, check the openai-beta header and assistant_id values.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Airtable

Sign up

Free (1,000 API calls / mo)

HubSpot

Sign up

Free: $0 / mo; API access included (private app or OAuth). Limits on Free: 250,000 API calls/day and 100 requests per 10 seconds per private app.

OpenAI

Sign up

Pay-as-you-go: GPT-5 at $1.25 per 1M input tokens and $10 per 1M output tokens

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.