n8n

How to Automate HubSpot Chat Responses?

Turn your chat inbox into a smart support channel. Incoming HubSpot messages get answered by an AI assistant and replies go back to the same chat. Great for teams that want fast, steady answers without adding more agents.

Here is how it works. A webhook listens for a new chat event and pulls the full message from HubSpot. The flow checks Airtable to see if a matching OpenAI thread exists for that chat. If not, it creates a fresh thread and saves the link in Airtable to keep context across messages. The assistant run starts and the system polls the run status. If the assistant asks for an action, the flow routes to the right function and calls external services by HTTP. Results are sent back to the assistant, and when the run is done, the last answer is posted back into the HubSpot conversation.

You will need HubSpot, OpenAI, and Airtable accounts. Add a table in Airtable to store the HubSpot thread ID and the OpenAI thread ID. Paste your assistant ID into the OpenAI run node. Expect faster first replies, lower chat backlog, and steady answers after hours. Use it for FAQs, order checks, scheduling links, and simple CRM updates without manual work.

What are the key features?

  • Webhook capture of new HubSpot chat events to start the flow
  • HubSpot message fetch using thread and message IDs for full context
  • Airtable lookup and storage of HubSpot thread to OpenAI thread mapping
  • OpenAI thread creation and run start using a set assistant ID
  • Run status polling with Wait and Switch to handle in progress, action needed, or completed states
  • Action routing with Switch and Code or HTTP Request to call external services and send results back to the assistant
  • Final message fetch from OpenAI and reply posted back into the HubSpot conversation
  • Duplicate control to avoid creating a new thread when one already exists

What are the benefits?

  • Reduce manual chat handling from minutes to under one minute
  • Automate up to 70 percent of repeated chat questions
  • Improve context accuracy by 90 percent with thread mapping in Airtable
  • Handle up to 5 times more chats during peak hours
  • Connect HubSpot, OpenAI, and Airtable in one flow
  • Cut first response time to less than one minute

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, set up HubSpot: double click any HubSpot node, click Create new credential, then follow the on screen steps to connect your HubSpot account or private app token.
  4. Set up OpenAI in n8n: double click an OpenAI node, click Create new credential, paste your OpenAI API key from the OpenAI API page, and save.
  5. Set up Airtable in n8n: double click an Airtable node, click Create new credential, paste your Airtable access token from your Airtable account, and save.
  6. In Airtable, create a base and a table to store links between the HubSpot thread ID and the OpenAI thread ID. Add fields for Service Thread ID and OpenAI Thread ID. Update the Airtable node to point to this base and table.
  7. Open the OpenAI Run node and replace the assistant ID with your own assistant ID. Keep the header openai beta assistants v1 in the HTTP nodes that call OpenAI.
  8. Copy the URL from the Webhook node in n8n and add it in your HubSpot app or webhook settings for conversation events so new messages post to n8n.
  9. Check the mapping in the Airtable node filters and field names so the workflow can find an existing thread and avoid duplicates.
  10. Run a test: send a new chat message in HubSpot. Confirm an OpenAI thread is created, the Airtable record appears, and a reply posts back to the same chat.
  11. If no reply returns, review the Get Run and Switch nodes. If status stays in progress, increase Wait times. If action is required, confirm the function routes and HTTP nodes return a valid JSON result to the assistant.
  12. Monitor logs in n8n for any credential errors. Reconnect any account that shows an auth error and test again.

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.