Overview
Euler provides an endpoint called `HubSpot-Reward` that allows HubSpot users to send webhook-triggered API requests from their workflows to create rewards, such as one-off SPFs, for partners. This guide walks you through configuring a HubSpot workflow to send a webhook to Euler.
Prerequisites
Your HubSpot plan must include access to the Webhook action in workflows.
You need an API key from Euler. This can be requested from the Euler team.
Webhook Configuration in HubSpot
Navigate to HubSpot Workflows:
Open your HubSpot account.
Go to Automation > Workflows and select an existing workflow or create a new one.
Add a Webhook Action:
Click Add Action and select Send a Webhook.
Configure the Webhook Request:
Method:
POST
Webhook URL:
https://tryeuler.bubbleapps.io/api/1.1/wf/HubSpot-Reward
Authentication Type:
API Key
API Key Name:
euler
API Key Location:
Request Header
API Key: Enter the Euler API key you received.
If not available, click Add Secret and create a new secret:
Secret Name:
euler
(all lowercase)Secret Value: The API key provided by Euler
Define the Request Properties: You will need to include the following key-value pairs in the request body:
Key | Description |
| The date of the transaction |
| The amount to be rewarded |
| The associated deal ID in HubSpot |
| The charge ID related to the reward |
| The currency of the reward (e.g., USD) |
| The type of reward (e.g., "Demo Reward") |
All keys must be lowercase, except dealId
, chargeId
, and rewardType
, which are all camel case.
5. Save the Webhook Action and Activate the Workflow.
Handling Responses
The webhook will always return a `200 OK` response, but you must check the body of the response:
If success, the response will contain an `id` representing the created record in Euler.
If error, the response will include a `reason` explaining the issue (e.g., "A charge with this charge ID already exists").
Example Error Response:
{
"status": "error",
"response": {
"reason": "A charge with this charge ID already exists"
}
}
Use Case Example
A company wants to pay a partner a reward when a demo occurs. The logic determining when a demo has happened remains inside HubSport. When that condition is met, the HubSpot workflow triggers this webhook to create the reward in Euler.