We've added two new actions to bots that will allow developers to have direct control over bot responses: webhooks and snippets.
Webhook actions will send data related of the current chat session to an external system, while snippets will let you run JavaScript code inside HubSpot as a step in the bot conversation.