Integrate Forethought with HubSpot to automate email replies to support tickets. This guide walks you through setting up a private app, configuring scopes and webhooks, creating custom fields in your HubSpot instance, and mapping context variables to workflows in the Forethought dashboard.
When to Use This Feature
Use this integration when:
- You use HubSpot as your help desk platform
- You want to automate email replies using Forethought’s AI
- You need to tag and track feedback from automated workflows
- You’re building Solve workflows for email in Forethought’s Workflow Builder
Why It Matters
Automate Support at Scale
Reduce manual email handling and resolve customer questions faster with AI-powered responses.
Capture Structured Data
Tag tickets with status and feedback to enable rich reporting and downstream workflows.
Personalize Your Workflows
Use ticket metadata and user details to craft tailored responses that feel human.
Improve Feedback & Deflection
Track if emails were effective and if users were deflected to other channels like chat.
How It Works (Step-by-Step)
Step 1: Set Up a Private App in HubSpot
- Go to Settings > Integrations > Private Apps in HubSpot.
- Click Create a Private App > Scopes.
- Add the following scopes:
cms.knowledge_base.articles.publish cms.knowledge_base.articles.read cms.knowledge_base.articles.write cms.knowledge_base.settings.read cms.knowledge_base.settings.write collector.graphql_query.execute collector.graphql_schema.read content conversations.read conversations.write crm.objects.contacts.highly_sensitive.read crm.objects.contacts.highly_sensitive.write crm.objects.contacts.read crm.objects.contacts.sensitive.read crm.objects.contacts.sensitive.write crm.objects.contacts.write crm.objects.owners.read crm.objects.users.read crm.schemas.contacts.read sales-email-read tickets tickets.highly_sensitive tickets.sensitive |
Step 2: Configure a Webhook
- In the same private app, go to the Webhooks tab.
- Click Create Webhook.
- Set the Target URL to:
https://app.forethought.ai/hubspot/webhook/<ORG_NAME>/ticket-event
💡 Replace <ORG_NAME> with your organization’s name. - Click Create Subscription and select:
- Object type: Conversation
- Event: New message
- Click Subscribe > Create app.
- Go to the Auth tab and copy your Access Token and Client Secret.
Step 3: Connect HubSpot in Forethought
- Go to Settings > Integrations in the Forethought Dashboard.
- Click + Connect New Integration > HubSpot.
- Enter your Access Token and Client Secret.
- Click Connect.
Step 4: Create Custom Ticket Fields in HubSpot
- Go to Settings > Data Management > Properties.
- Click Create Property.
- Set the following:
- Object type: Ticket
- Field type: Dropdown select
- Create the following fields:
Field Name | Purpose | Values |
forethought_solve_email_status | Tracks if Forethought responded | automated, not_automated, fallback_response_sent, fallback_response_not_sent |
forethought_email_feedback | Captures user feedback (thumbs up or down) from emails | positive, negative |
forethought_interactive_email_status | Indicates chat deflection status after the interactive email interaction | deflected, not_deflected, pending |
Step 5: Map Context Variables in Forethought
- Go to Solve > Workflow Builder > Email in Forethought.
- Create a workflow.
- At the top-right corner of your screen, click the context variable icon.
- Use the Mapping dropdown to match HubSpot ticket fields to context variables.
Default context variables available:
- $Email: User’s email address
- $Full Name: User’s full name
- $First Name: Derived from $Full Name
- $Ticket ID: Ticket ID from HubSpot
Step 6: Build and Publish Your Email Workflow in Forethought dashboard
- In the Forethought dashboard, go to Solve > Workflow Builder > Email tab.
- Click + New Intent.
- Configure a response in the Response tab.
- Go to the Journey tab and click a path with tags. Then, enter a ticket tag that you want to add, or you can also add ticket fields. By default, tickets processed through this path are automatically tagged as ‘ft-email-automated’.
- Test your email workflow. Follow the instructions here.
- Click Publish to make it live.
How to Test
HubSpot does not support thread creation via API. To generate tickets, you'll need to send a real email to your HubSpot instance. If you'd like to test and preview your workflows before publishing, you can use the Email Preview feature or the Solve Email Simulator.
Best Practices
✅ Use meaningful labels for custom fields
✅ Always test with real HubSpot tickets before going live
❌ Don’t skip the webhook setup—it’s required to trigger workflows
💡 Create fallback responses for unhandled scenarios
Q&A
You need permission to create private apps and access conversations and tickets.
No. HubSpot does not support email ticket creation via API.
Workflows won’t trigger because Forethought won't receive ticket updates.
It’s best to use separate apps for each environment for clarity.
Look at the forethought_solve_email_status field in the ticket.
Comments
Please sign in to leave a comment.