https://developers.hubspot.com/docs/guides/api/conversations/working-with-chatbots/webhooks?_ga=2.44363489.458552730.1745500593-824713594.1745500593 I am trying to pass a formatted response to “botMessage” and am not having any luck. It appears markdown is not supported. Does botMessage support any formatting of the bot’s response?
Hi @mdanz
As far as I know: no.
The botMessage payload that you send back to HubSpot’s chat webhook is rendered exactly as plain-text. The webhook endpoint doesn’t parse Markdown, HTML, or any other markup, so anything like **bold**, _italic_, bullet points or <br> tags will be delivered to the visitor literally, not formatted.
What you can do:
- Line breaks: use the standard \n escape in your JSON string (HubSpot converts it to a new bubble).
- Links: paste the full URL; the widget will turn it into a clickable link automatically.
- Richer layouts: build the conversation inside HubSpot’s bot editor instead (e.g., Send simple message or Ask a question actions) where marketers can add multiple bubbles, emojis, images, etc. These blocks allow limited formatting but are configured in the UI, not through the webhook. HubSpot Knowledge Base
Work-arounds if you really need richer formatting from your server:
- Split one “fancy” response into several plain-text messages (each line as its own botMessage).
- Send a link to a hosted landing page that contains the fully formatted content.
- Embed images (host the image and include the URL); the chat widget will render the image bubble.
But for now, HubSpot’s webhook itself won’t render Markdown or HTML, so plan on plain-text responses only.
Hope It helps.!
Real-Time Data Sync Between any CRM or Database | Founder @Stacksync (YC W24)
Hi Ruben, thanks for the help!
I am not seeing \n supported.
Here is an example of the exact webhook response:
{
"botMessage": "New York annual report requirements vary by entity type:\nCorporations (Domestic and Foreign):\nAgency: New York State Department of State - Division of Corporations, State Records and Uniform Commercial Code\nForm: Mailed to the principal office or registered agent\nFiling Method: Mail or online\nFee: $9\nDue Date: Biennially by the end of the registration anniversary month (e.g., if incorporated on March 15, the report is due every two years by March 31)\nLaw: NY CCO L § 1708\nLimited Liability Companies (LLCs):\nAgency: New York State Department of State - Division of Corporations, State Records and Uniform Commercial Code\nForm: Mailed to the principal office or registered agent\nFiling Method: Mail or online\nFee: $9\nDue Date: Biennially by the end of the registration anniversary month\nLaw: NY LLC L § 301(e)\nPenalties: No late fee, but the LLC loses good standing and is marked delinquent in state records, risking dissolution or revocation\nBenefit Corporations:\nAgency: New York State Department of State - Division of Corporations, State Records and Uniform Commercial Code\nFiling Method: Mail or online\nFee: $60\nDue Date: Annually within 120 days of the end of the fiscal year\nLaw: NY BSC L § 1708\nProfessional Corporations (Domestic):\nAgency: New York State Education Department - Office of the Professions\nFee: $105\nDue Date: Triennially\nProfessional Corporations (Foreign):\nAgency: New York State Education Department - Office of the Professions\nFee: $35\nDue Date: Annually by June 30\nNonprofit Corporations:\nNot required to file annual or biennial reports with the New York Department of State\nCooperative Corporations:\nAgency: New York State Department of State - Division of Corporations, State Records and Uniform Commercial Code\nFiling Method: Mail or online\nFee: $9\nDue Date: Biennially by the end of the registration anniversary month\nNotes:\nReports may be filed starting on the first day of the anniversary month\nFailure to file can result in loss of good standing, public marking as delinquent, and potential dissolution or revocation",
"responseExpected": false
}
And here is what I am seeing testing the chatbot preview:
Am I doing something wrong? Thanks! ~Megan

