Sync Peerbound advocacy signals to HubSpot every night
Each night, refresh your HubSpot companies with their latest customer story, review count, and advocate status from Peerbound so reps always know who to ask for a reference.
Every night at 2am, sync Peerbound customer-proof signals into HubSpot so our company records reflect who is an advocate, what their latest story is, and how recent their third-party reviews are. This should be a code workflow on a cron trigger. It is a deterministic field-level sync with no language-model calls and no fuzzy matching.
On each run:
1. Call Peerbound List Stories with updated_since set to the watermark stored from the last successful run. Paginate through all results using the returned cursor until has_more is false.
2. Call Peerbound List Reviews with the same updated_since watermark. Paginate the same way.
3. Group every returned story and review by its embedded account.hubspot_id. Skip any record whose account does not carry a HubSpot company id.
4. For each grouped HubSpot company id, build an update payload from the most recent non-deleted story and review on file: peerbound_is_advocate (true if any non-deleted story exists for the account), peerbound_latest_story_url and peerbound_latest_story_date (from the newest live story), peerbound_review_count (count of non-deleted reviews), and peerbound_latest_review_rating (from the newest live review).
5. If every story and review tied to an account has is_deleted set to true on the Peerbound side, instead set peerbound_is_advocate to false and clear the latest_story_url and latest_story_date fields. This keeps deletions in sync.
6. Call HubSpot Update Company once per affected company id with the resulting payload. Treat 404s as warnings and continue (the company may have been deleted in HubSpot). Treat 429s as retry-after-backoff using the Retry-After header.
7. After all updates succeed, persist the new watermark (the max updated_at observed across both story and review responses this run) so the next nightly run only pulls new changes.
On the very first run there is no watermark, so omit updated_since and treat the full result set as the seed. The Peerbound HubSpot company properties (peerbound_is_advocate, peerbound_latest_story_url, peerbound_latest_story_date, peerbound_review_count, peerbound_latest_review_rating) must already exist as custom properties on the HubSpot Company object before this workflow runs.
Additional information
What does this prompt do?
- Runs every night and pulls every Peerbound customer story and review that changed since the last sync.
- Matches each story and review to its HubSpot company and refreshes fields like advocate status, latest story link, and most recent review rating.
- Clears the advocate flag automatically when a Peerbound story or review is removed, so your CRM stays clean.
- Powers sales filters like 'accounts with a published story' or 'advocates from the last 90 days' so AEs and CSMs can prioritize reference requests.
What do I need to use this?
- A Peerbound account with API access enabled and an admin who can create an API key.
- A HubSpot account where you can grant access to read and update company records.
- Custom HubSpot company properties for the fields you want to populate (advocate flag, latest story link and date, review count, latest review rating).
How can I customize it?
- Move the nightly run off 2am, or run it more often during a launch window.
- Map a different set of HubSpot company properties, or add a lifecycle stage update when a company becomes an advocate.
- Filter by story or review type if you only want to flag specific kinds of customer proof (for example, only G2 reviews or only published case studies).
Frequently asked questions
Do I need both Peerbound and HubSpot for this?
How are Peerbound accounts matched to HubSpot companies?
What happens if a customer story is removed in Peerbound?
Will this overwrite work I have done by hand in HubSpot?
Do I need new properties in HubSpot before turning this on?
Make Peerbound proof show up where your reps actually look.
Connect Peerbound and HubSpot once. Geni keeps every matched company up to date with the latest customer story, review, and advocate status every night.