---
title: "Send a Webhook to HubSpot | WebhookRelay"
meta:
  "og:description": "Send any webhook to HubSpot. Transform an incoming webhook into the HubSpot API format in flight and forward it — no glue server, no code to maintain."
  "og:title": "Send a Webhook to HubSpot"
  description: "Send any webhook to HubSpot. Transform an incoming webhook into the HubSpot API format in flight and forward it — no glue server, no code to maintain."
---

![Stripes](https://webhookrelay.com/blog/webhook-to-hubspot/images/stripes.svg)

# **Send a Webhook to HubSpot**

Send any webhook to HubSpot. Transform an incoming webhook into the HubSpot API format in flight and forward it — no glue server, no code to maintain.

![Send a Webhook to HubSpot: Transform &amp; Forward Any Payload](https://webhookrelay.com/blog/webhook-to-hubspot/images/blog/heroes/route.jpg)

You have a service that fires webhooks — a form, a payment provider, a CI pipeline, a monitoring tool — and you want each event to create or update a contact in **HubSpot**. The problem: the HubSpot API won't accept the raw webhook. It expects its own JSON shape and authentication, and the payload your source sends never matches.

[Webhook Relay](https://webhookrelay.com) sits in the middle. It receives the incoming webhook at a stable public URL, **transforms** the payload into the format HubSpot expects, and delivers it — no glue server, no Lambda, no maintenance.

## [How it works](#how-it-works)

1. Your source service POSTs its webhook to a Webhook Relay endpoint.
2. A transformation function parses the payload and builds a HubSpot API request.
3. Webhook Relay forwards it to HubSpot, and the record is created.

## [Step 1: Get your HubSpot credentials](#step-1-get-your-hubspot-credentials)

You need a **private app** access token (HubSpot → Settings → Integrations → Private Apps) with CRM write scopes.

## [Step 2: Create a Webhook Relay output to the HubSpot API](#step-2-create-a-webhook-relay-output-to-the-hubspot-api)

Create a bucket with a public input, then add an output pointing at the HubSpot API:

- **Output destination:** `https://api.hubapi.com/crm/v3/objects/contacts`
- **Headers:**
  - `Authorization: Bearer <your-private-app-token>`
  - `Content-Type: application/json`

## [Step 3: Add a transformation function](#step-3-add-a-transformation-function)

Attach a function that reshapes the incoming webhook. HubSpot's CRM API expects a `properties` object whose keys are HubSpot contact properties (`email`, `firstname`, `lastname`, `phone`).

```
-- incoming payload is in r.RequestBody
local body = json.decode(r.RequestBody)

local contact = {
  properties = {
    email = body.email,
    firstname = body.first_name or body.name,
    lastname = body.last_name
  }
}

r:SetRequestBody(json.encode(contact))
```

## [Step 4: Point your source at the URL and test](#step-4-point-your-source-at-the-url-and-test)

Configure your source service's webhook to point at the Webhook Relay public URL. Trigger an event — or replay one from the [Webhook Bin](https://webhookrelay.com/blog/webhook-to-hubspot/webhook-bin/) — and the record appears in HubSpot within seconds. If the API rejects the request, the Webhook Relay logs show HubSpot's exact error so you can fix the mapping.

## [Going further](#going-further)

- **Fan out:** send the same event to [Salesforce](https://webhookrelay.com/blog/webhook-to-hubspot/blog/webhook-to-salesforce/) or [Slack](https://webhookrelay.com/blog/webhook-to-hubspot/blog/webhook-to-slack/) at the same time with [multiple destinations](https://webhookrelay.com/blog/webhook-to-hubspot/features/webhook-multiple-destinations/).
- **Filter:** use [forwarding rules](https://webhookrelay.com/blog/webhook-to-hubspot/features/forwarding-rules/) so only the events you care about reach HubSpot.
- **Inspect first:** see the raw payload in the [Webhook Bin](https://webhookrelay.com/blog/webhook-to-hubspot/webhook-bin/) before writing the mapping.

## [Get started](#get-started)

[Create a free Webhook Relay account](https://my.webhookrelay.com/register) and turn any webhook into HubSpot records — no servers to run. New to webhooks? Start with [what is a webhook](https://webhookrelay.com/blog/webhook-to-hubspot/blog/what-is-webhook/) and [how to transform webhooks](https://webhookrelay.com/blog/webhook-to-hubspot/features/transform-webhooks/).