HubSpot recipe

Portico leads and rewards into HubSpot.

Portico has no native HubSpot connector. This recipe takes each signed webhook event into HubSpot through Zapier's HubSpot app, Make or a small endpoint of your own: a player who leaves their details becomes a contact with the form's answers in the properties you named, their marketing consent is recorded the way HubSpot expects, and the reward they won is written to the contact.

Discuss your campaign
01

Before you start

You need a brand on the Brand or Group plan, where webhooks and identified embeds are included, a HubSpot account with API access or a Zapier or Make account, and the brand's webhook secret from the Portico console (Integrations). Portico posts to public https URLs only, never follows a redirect, and sends each event as JSON with the headers x-portico-event (the type), x-portico-delivery (the delivery's id) and x-portico-signature. Every key is always present, with null where the event has no value, so a mapping made from the sample works on every real event. A brand may have up to ten endpoints; one per automation is the usual pattern.

02

Which event goes where

Four of Portico's six events carry what a CRM wants: lead.captured when a player leaves their details, reward.awarded when they win, reward.redeemed when the code is used at your till or checkout, and quiz.completed when a quiz is scored. (calculator.completed and prediction.settled follow the same envelope.) Each event names the campaign, the participant, the session and the form's answers under the CRM names you chose, then its own block. This is how they land in HubSpot.

Portico eventHubSpot callWhat it records
lead.capturedCreate or update the contact by email (HubSpot Contacts API, or Zapier's Create or Update Contact).email, firstname, lastname, phone, company, jobtitle, plus any property named in answers; qualified and reasons on a B2B lead quiz.
lead.captured, with marketingConsent trueSubscribe the email to your marketing subscription type (Communication Preferences API), or set your own consent property; add the contact to a static list (Add Contact to List).Consent with its legal basis and time, and the list your workflows start from.
reward.awardedUpdate the contact's properties (Update Contact).Custom properties such as portico_last_reward and portico_last_reward_at from reward.label and occurredAt. The code only if your endpoint includes codes.
reward.redeemedUpdate the contact's properties.portico_last_redeemed_at from redemption.redeemedAt and the receipt reference.
quiz.completedUpdate the contact's properties.portico_quiz_score and portico_quiz_passed from quiz.score and quiz.passed, for a workflow that treats a pass differently.
03

Consent, and how it maps

HubSpot separates a contact's marketing status, its legal basis and its subscriptions. Portico sends one boolean, as it stands now, and the time of the event. In Portico a capture form records consent by purpose: participation and prize delivery are implied and their texts shown, marketing is a tick box that is never pre-ticked or required, and analytics follows the page's cookie banner. participant.marketingConsent is the marketing purpose's latest state; a form field you marked as marketing-only is left out of answers when it is false.

Portico fieldHubSpot fieldRule
participant.marketingConsent (true)A subscription to your marketing subscription type, with legal basis and the timeSubscribe only on true. occurredAt is the time of the consent.
participant.marketingConsent (false)No subscriptionDo not subscribe. Do not unsubscribe either, unless your policy says a no in Portico withdraws a consent given elsewhere.
participant.marketingConsentA custom property, such as portico_marketing_consentOptional. A boolean property lets a workflow branch without reading subscriptions.
participant.email, participant.phoneemail, phoneContact properties. They are never in answers.
answers.<your CRM names>Properties of the same namesName each form field after its HubSpot internal property name in the Portico console, such as company or jobtitle.
profile.marketingOptIn (opted_in, opted_out, not_asked)The same subscription, on campaigns with entry requirementsTreat not_asked as no change, not as a no.
04

Set up in Zapier

One Zap with a Catch Raw Hook trigger, a signature check and a path per event type. Zapier's hook URL is a public https address, which is what Portico requires.

  1. In Zapier, start a Zap with the trigger Webhooks by Zapier, Catch Raw Hook, and copy the hook URL.
  2. In the Portico console, open Integrations, Event webhooks, and add an endpoint with that URL. Tick lead.captured, reward.awarded, reward.redeemed and quiz.completed. Leave “Include prize codes and offer links” off unless HubSpot should hold the code.
  3. Press “Test lead.captured”. Zapier receives the sample with every key filled, so the mapping you make from it works on every real event.
  4. Add a Code by Zapier step that checks x-portico-signature against your webhook secret (the snippet below) and parses the body, then a Paths step on type.
  5. lead.captured path: HubSpot, Create or Update Contact, with email from participant.email, phone from participant.phone and each property from answers. Then a Filter on participant.marketingConsent is true, and HubSpot, Add Contact to List, for your marketing list.
  6. reward.awarded, reward.redeemed and quiz.completed paths: HubSpot, Update Contact, found by email, writing your portico_ properties.
  7. Turn the Zap on. In Portico's delivery log, each event should show sent with status 200; a failed delivery can be sent again from there with the same id.
05

Set up in Make

The same shape in Make: a custom webhook, a router and HubSpot's modules or the HTTP module. Make's formula language has sha256 with a key, so the signature check is a filter rather than a code step.

  1. In Make, add a Webhooks, Custom webhook module and copy its address.
  2. Add the address as an endpoint in the Portico console (Integrations, Event webhooks), tick the four events and press a test so Make learns the structure.
  3. Add a Router. On every route, a filter compares the header's v1 with sha256(t + "." + body; hex; secret) and stops when they differ; a second condition routes on type.
  4. lead.captured: HubSpot CRM, Create or Update a Contact, by email; then, when marketingConsent is true, HubSpot CRM, Add a Contact to a List.
  5. reward.awarded, reward.redeemed, quiz.completed: HubSpot CRM, Update a Contact, writing your portico_ properties.
  6. Run once, check the delivery log in Portico shows 200, then schedule the scenario to run on each webhook.
06

A worked lead.captured payload

This is the published sample, exactly as the console's Sample payloads and “Test lead.captured” send it: the envelope every event shares, then the lead's own keys. qualified and reasons appear only on a campaign that qualifies its leads (the B2B lead quiz), and profile only on a campaign with entry requirements; every other campaign leaves them out, so an existing mapping reads the same.

lead.captured, as the test send posts it
{
  "version": 1,
  "occurredAt": "2026-10-01T09:30:00.000Z",
  "campaign": {
    "id": "7b3f6a52-3f0e-4c8e-9a51-2f7d8c1e0a11",
    "slug": "spring-quiz"
  },
  "participant": {
    "id": "crm-123",
    "email": "[email protected]",
    "phone": "+46701234567",
    "marketingConsent": true
  },
  "session": {
    "ref": "0123456789abcdef"
  },
  "answers": {
    "company": "Example AB",
    "role": "Buyer",
    "newsletter": true
  },
  "id": "lead.captured:c1a2b3c4-d5e6-4f70-8a91-b2c3d4e5f607",
  "type": "lead.captured",
  "qualified": true,
  "reasons": [
    "Quiz: 4 of 5 (pass mark 3)",
    "Company size: 50–249 (at least 10–49)"
  ],
  "profile": {
    "version": 1,
    "name": "Alex Example",
    "company": "Example AB",
    "title": "Head of Marketing",
    "phone": "+46701234567",
    "telegram": "alex_example",
    "linkedinFollowClickedAt": "2026-10-01T09:28:00.000Z",
    "marketingOptIn": "opted_in"
  }
}
07

A worked reward.awarded payload

The same envelope with the reward block. code and deepLink are filled only for an endpoint that includes codes; otherwise both are null. delivery says how Portico delivered the reward (such as code or link). A gift card adds a giftCard block with its value and expiry.

reward.awarded, for an endpoint that includes codes
{
  "version": 1,
  "occurredAt": "2026-10-01T09:30:00.000Z",
  "campaign": {
    "id": "7b3f6a52-3f0e-4c8e-9a51-2f7d8c1e0a11",
    "slug": "spring-quiz"
  },
  "participant": {
    "id": "crm-123",
    "email": "[email protected]",
    "phone": "+46701234567",
    "marketingConsent": true
  },
  "session": {
    "ref": "0123456789abcdef"
  },
  "answers": {
    "company": "Example AB",
    "role": "Buyer",
    "newsletter": true
  },
  "id": "reward.awarded:5d2c9e1a-8b4f-4a37-b6c2-0e9f1a2b3c4d",
  "type": "reward.awarded",
  "reward": {
    "claimId": "5d2c9e1a-8b4f-4a37-b6c2-0e9f1a2b3c4d",
    "tierKey": "coffee",
    "label": "A free coffee",
    "delivery": "code",
    "code": "COFFEE-7Q2X",
    "deepLink": "https://example.com/redeem?code=COFFEE-7Q2X"
  }
}
08

Check the signature

Every delivery carries x-portico-signature: t=<unix seconds>,v1=<hex>, where v1 is HMAC-SHA256 of t, a full stop and the raw body, keyed with the brand's webhook secret. Recompute it over the body exactly as received, before parsing, and compare in constant time. Dedupe on id: a retry of the delivery, a replay from the delivery log and a repeat of the same action all carry the same id. If you want replay protection, refuse a t more than a few minutes from your clock; Portico's own inbound signed calls allow five.

Node, as the console shows it
// Header: x-portico-signature: t=<unix seconds>,v1=<hex>
// Recompute over the raw body exactly as received.
const [t, v1] = header.split(",").map((p) => p.split("=")[1]);
const expected = crypto
  .createHmac("sha256", WEBHOOK_SECRET)
  .update(t + "." + rawBody)
  .digest("hex");
const genuine = crypto.timingSafeEqual(
  Buffer.from(v1, "hex"),
  Buffer.from(expected, "hex"),
);
09

Retries, and where it stops

A delivery that fails is tried again after one minute, then five, thirty, two hours and twelve: six attempts over about sixteen hours, after which it is marked dead and can be sent again by hand from the delivery log. Create the portico_ properties in HubSpot first; a Zap cannot write a property that does not exist. Timeline events need a timeline event template in a HubSpot app, so the recipe uses properties instead. Portico never reads from HubSpot: nothing comes back unless your systems send a business event or a redemption callback.

HubSpot is a trademark of its owner; Portico Play is not affiliated with it. The Portico side of this recipe (events, keys, headers, signature, retries, consent) is taken from the product as it runs. The HubSpot, Zapier and Make names are from their public documentation at the time of writing and may change; check them against your account.

Your brand. Your next big idea.

Let’s make it
worth playing.

Tell us about your audience and your next campaign. We’ll help you find the right game.

Talk to the studio