Send incidents to HubSpot with the Incidents Webhook
Open a HubSpot ticket for every new Xyte incident, using Incidents Webhooks and a HubSpot private app.
Xyte has no built-in HubSpot integration yet. Until it does, you can use Incidents Webhooks to open a ticket in HubSpot whenever Xyte creates an incident.
- Create only — each new Xyte incident opens one HubSpot ticket. Later updates and closes in Xyte don't change that ticket, and nothing syncs back from HubSpot to Xyte.
- What you need — a HubSpot account where you can create a private app, and access to Settings → Integrations → Webhooks in the Xyte Organization portal.
Step 1 — Create a private app in HubSpot
- In HubSpot, go to Settings → Integrations → Private Apps and create a private app.
- On the Scopes tab, add
crm.objects.tickets.write. You can also addcrm.objects.tickets.read, but it isn't required to create tickets. - Create the app and copy its access token. You'll paste it into Xyte in the next step.
Keep the token secretThe access token lets anyone who has it create tickets in your HubSpot account. Treat it like a password.
Step 2 — Set up Incidents Webhooks in Xyte
In the Xyte Organization portal, go to Settings → Integrations → Webhooks → Incidents Webhooks.
Endpoints
-
Set Create incident URL to:
https://api.hubapi.com/crm/v3/objects/tickets -
Leave Update incident URL and Close incident URL empty. See Limitations.
-
Turn on Add custom header to requests and enter:
- Field name:
Authorization - Field value:
Bearer <your access token>— the wordBearer, a space, then the token from Step 1.
- Field name:
-
Make sure Send payload as string is off.
-
Click Update.
Turn off "Send payload as string"HubSpot expects a JSON object. With Send payload as string on, HubSpot rejects every request with 400 Bad Request and the webhook goes into an error state.
Create template
-
Open the Create template step.
-
Paste this template:
{ "properties": { "subject": "[Xyte] {title}", "content": "{description} (device: {device}, location: {location}, priority: {priority})", "hs_pipeline": "0", "hs_pipeline_stage": "1" } } -
Click Save template.
"0" and "1" are HubSpot's default Support Pipeline and its New stage. If you use a different pipeline, replace them with your own pipeline and stage IDs, which you can find in HubSpot's pipeline settings for tickets.
{priority} is sent as a number from 1 (Critical) to 5 (Planning). For the full list of placeholders you can use, see Webhooks.
Leave Update template and Close template blank.
Step 3 — Test and enable
- In the Create template step, click Test create. A new ticket should appear in HubSpot under Tickets, in the pipeline and stage you set.
- Open the Enable step and click Activate.
From now on, each new Xyte incident opens a ticket in HubSpot.
Limitations
- Tickets are created, never updated or closed. Xyte's update and close requests can't change an existing HubSpot ticket. If you fill in the Update incident URL or Close incident URL with the HubSpot address, each update and close creates another new ticket instead. Leave both empty, and update or close tickets in HubSpot yourself.
- No sync back to Xyte. Changes you make to the ticket in HubSpot don't reach Xyte.
Learn more
- Webhooks — every Incidents Webhooks setting, the available placeholders and what happens when a request fails.
- HubSpot's tickets API — the ticket properties HubSpot accepts.
Troubleshooting
- 400 Bad Request — Send payload as string is on. Turn it off in Endpoints and click Update.
- Other errors — Incidents Webhooks shows the error below the wizard. Click Show full error to see HubSpot's full response, then check the access token, the
Bearerprefix in the header value and the private app's scopes. - A new ticket for every incident update — the Update incident URL or Close incident URL is set. Clear both and click Update.
Updated less than a minute ago
