Digital Scientists · Internal Reference

Website-to-CRM Integration

How digitalscientists.com captures leads, attributes campaigns, and routes every form submission and meeting booking into Pipedrive — automatically.

SYSTEMS // Formspree · Pipedrive Scheduler · Google Calendar REV // March 2026

At a Glance

3
Integrated systems: Formspree, Pipedrive Scheduler, Google Calendar
20+
Pages with Formspree forms routing submissions into Pipedrive
3
Netlify Functions: form webhook, pre-booking, post-booking enrichment
System 1
Formspree Forms
All web form submissions. Single endpoint, 20+ pages, webhook triggers Deal or Lead creation.
System 2
Pipedrive Scheduler
All meeting bookings. Two-phase flow: pre-booking UTM capture + post-booking contact enrichment.
System 3
Google Calendar
Two-way sync with Pipedrive. Scheduler bookings appear on Bob's calendar automatically.
System 1

Formspree Forms

All contact and inquiry forms on the site submit to a single Formspree endpoint (formspree.io/f/xvzbywbr). Formspree stores the submission, fires an email notification, and triggers a webhook to a Netlify Function that creates the appropriate Pipedrive record.

Every form automatically includes hidden UTM fields (injected by ds-includes-v2.js from sessionStorage) and a hidden source field identifying the page — so every submission is traceable back to its origin.

Form → Pipedrive Flow

1
Visitor fills out a form
Name, email, company, and message collected. Hidden fields carry the source page ID, UTM parameters (if present), and any additional context fields (starting_phase, primary_interest, etc.).
2
Form submits to Formspree
Formspree stores the submission and sends an email notification. No interruption to the visitor experience.
formspree.io/f/xvzbywbr
3
Formspree fires webhook to Netlify
formspree-webhook.mjs receives the POST. It finds or creates a Person (deduplicated by email) and an Organization (from company field), then checks for UTM parameters.
/.netlify/functions/formspree-webhook
4
Deal or Lead created in Pipedrive
If UTMs present: Creates a Deal in Inbound Project → Marketing Qualified, with all UTM fields as native custom fields and a pinned note including a Campaign Attribution section.
If no UTMs: Creates a Lead in the inbox with a pinned note containing form details.
Deal (campaign traffic) or Lead (organic/direct)

Complete Form Inventory

PageSource IDPipedrive TitleAlso Has Scheduler?
CORE CONVERSION PAGES
/homepageHomepage — New LeadNo
/start/start-pageGet Started — New LeadYes (button)
/proof/proof-landing-pageProof in 5 Days — New LeadNo
/method/method-pageMethod Page — New LeadNo
/reasons-to-believe/reasons-to-believeReasons to Believe Page InquiryNo
HEALTHCARE HUB & SOLUTIONS
/healthcare/healthcare-hubHealthcare Hub — New LeadNo
…/patient-portal-digital-front-door/patient-portalPatient Portal InquiryNo
…/electronic-health-record-practice-management/ehr-practice-managementEHR/Practice Management InquiryNo
…/telemedicine-app-development/telemedicine-app-developmentTelemedicine Solutions InquiryNo
…/healthcare-interoperability-solutions/healthcare-interoperabilityHealthcare Interoperability InquiryNo
…/predictive-analytics-healthcare/predictive-analyticsPredictive Analytics InquiryNo
…/population-health-management/population-health-managementPopulation Health Management InquiryNo
…/remote-patient-monitoring-solutions/remote-patient-monitoringRemote Patient Monitoring InquiryNo
…/cdss-clinical-decision-support-system/cdssClinical Decision Support InquiryNo
HEALTHCARE CAPABILITIES
…/healthcare-ai-development/healthcare-ai-developmentHealthcare AI Development InquiryNo
…/healthcare-saas-development/healthcare-saasHealthcare SaaS Development InquiryNo
…/healthcare-data-analytics-engineering/healthcare-data-analyticsHealthcare Data Analytics InquiryNo
…/healthcare-ux-design-research/healthcare-ux-designHealthcare UX Design InquiryNo
…/software-as-medical-device-samd/software-as-medical-deviceSoftware as Medical Device InquiryNo
HEALTHCARE ASSESSMENT & OTHER
/healthcare/assessment/partnership/healthcare-assessment-partnershipPartnership Assessment InquiryNo
/healthcare/assessment/platform/healthcare-assessment-platformPlatform Assessment InquiryNo
Newsletter popup (all pages)newsletter-popupInsights Newsletter — New SubscriberN/A

Pages with Scheduler Only (No Form)

PageScheduler Format
/thank-you/Button — post-form conversion CTA
/healthcare/assessment/Embedded iframe — in-page booking widget
/event/paltc26-annual-conference/4 buttons — hero CTA + "Book time" pills + footer CTA
/event/beckers-health-it-rcm-2026/4 buttons — hero CTA + "Book time" pills + footer CTA
/event/2026-nchcfa-annual-convention-expo/1 button — footer CTA

Note: /start/ is the only page with both a Formspree form and a Pipedrive Scheduler link.

System 2

Pipedrive Scheduler

Replaced Calendly in March 2026. The Scheduler creates meetings natively in Pipedrive, eliminating a third-party middleware layer. Because booking happens on Pipedrive's domain (not ours), campaign attribution and contact details can't be captured in a single request — so the integration runs in two phases.

All scheduler links point to: digitalscientists3.pipedrive.com/scheduler/kOOeAEu2/meeting-with-bob-klein

Phase 1 — Pre-Booking (on our site, before redirect)

1
Visitor clicks "Schedule a Call"
ds-includes-v2.js intercepts the click and reads UTM data from sessionStorage.
2
Pre-booking function fires
If UTMs present: schedule-lead.mjs creates a Deal in Inbound Project → Marketing Qualified with UTM fields and source page populated. No person linked yet.
If no UTMs: Passthrough — no Pipedrive action at this stage.
2-second timeout fallback — booking is never blocked
3
Browser redirects to Pipedrive Scheduler
Prospect enters name, email, phone, company, and agenda — then picks a time. Seamless from their perspective.

Phase 2 — Post-Booking (after prospect completes the form)

4
Pipedrive creates Person, Organization, and Activity
The booking is recorded natively. Person is deduplicated by email. Activity subject: "{Name} / Bob Klein - Meeting with Bob Klein."
5
Webhook fires to post-booking function
Pipedrive Webhook #3102756 fires on activity.create. scheduler-webhook.mjs fetches full Activity details (note text is not in the webhook payload — requires a separate API call), then searches for a recent unlinked Deal by title pattern within a 10-minute window.
Webhook #3102756 — activity.create
6
Deal enriched or Lead created
If matching Deal found (campaign traffic): Person and org linked, Activity attached, form text added as pinned note. The Deal now has full attribution AND contact details.
If no matching Deal (organic traffic): Creates a Lead titled "Scheduler — {Person Name}" with person, org, and form text note.
7
Activity syncs to Google Calendar
Two-way Pipedrive ↔ Google Calendar sync pushes the meeting to Bob's calendar automatically.
Pipedrive Activity → Google Calendar

UTM Attribution — How It Works Across Both Systems

The same UTM capture mechanism feeds both Formspree and the Scheduler. When a visitor arrives via a campaign link, ds-includes-v2.js stores the UTM values in sessionStorage — persisting across page navigations within the same session. At conversion (form submit or scheduler click), UTMs are passed to the Netlify Function.

UTMs Present
Campaign Traffic → Deal
Visitor arrived via a tracked link. UTMs are passed to the function and written as native custom fields.
Pipedrive OutcomeDeal in Inbound Project → Marketing Qualified. UTM Source, Medium, Campaign, Content, and Source Page stored natively — filterable and reportable.
No UTMs
Organic / Direct → Lead
Visitor arrived via organic search, direct navigation, or untracked referral.
Pipedrive OutcomeLead in inbox. Form details in pinned note. No campaign fields. Qualify and convert to Deal manually.
Why Deals for campaign traffic, not Leads? Pipedrive Leads do not support custom fields — this is a Pipedrive platform limitation. UTM data can only be stored natively (filterable, reportable) on Deals. Without attribution data to capture, a Lead is sufficient.

Pipedrive Custom Field API Keys (Deal)

FieldAPI KeyUTM Parameter
UTM Source2d987c86f8c2ba6d4a2ba671202fb101963cb7aeutm_source
UTM Medium5bc2cf59b8f65bac7fee4f0049decda09e64eefbutm_medium
UTM Campaignf6983c094a3678e33fa339a912595b1d8c1a0ed3utm_campaign
UTM Contentde10675163c2f6d75a0699052c21d3a36e71091eutm_content
Source Page1fe5fef0101f8b10a757d9944b072e0c098da15a(source field)

End-to-End Examples

Example 1 — Form path
LinkedIn Ad → /start/ Form Submission
  • LinkedIn ad with utm_campaign=paltc26
  • Dr. Martinez lands on /start/, UTMs stored
  • Fills out contact form → submits to Formspree
  • Webhook fires → formspree-webhook.mjs runs
Result in PipedrivePerson: Dr. Martinez · Org: Midwest Health Partners · Deal in Inbound Project → Marketing Qualified · UTM fields populated · Pinned note with form text + Campaign Attribution
Example 2 — Scheduler path
Email Campaign → Event Page → Scheduler
  • Email link with utm_campaign=paltc26-invite
  • Sarah lands on event page, UTMs stored
  • Clicks "Schedule a Meeting" → Deal pre-created
  • Books on Pipedrive Scheduler → webhook enriches Deal
Result in PipedrivePerson + Org linked · Deal with UTM fields + source page · Pinned note with agenda · Activity attached · Meeting on Google Calendar
Example 3 — Organic form
Organic Search → /proof/ Form Submission
  • Prospect finds site via Google, no UTMs
  • Browses to /proof/, fills out form
  • Formspree webhook fires, no UTMs detected
Result in PipedrivePerson created/found · Lead "Proof in 5 Days — New Lead" in inbox · Pinned note with form details (no Campaign Attribution section)
Example 4 — Organic scheduler
Direct Visit → /healthcare/assessment/ Embedded Scheduler
  • Prospect navigates directly, no UTMs
  • Books via embedded iframe on assessment page
  • Pre-booking is passthrough (no Deal created)
  • Post-booking webhook creates Lead directly
Result in PipedrivePerson + Org from booking details · Lead "Scheduler — {Name}" in inbox · Pinned note with agenda · Meeting on Google Calendar
System 3

Google Calendar Integration

Pipedrive's native two-way calendar sync connects Scheduler bookings to Bob's Google Calendar. Pipedrive is the single source of truth — no duplicate events (the old Calendly setup could write directly to Google Calendar and create doubles).

Pipedrive Scheduler
Pipedrive Activity (Meeting)
Google Calendar (two-way sync)

Configured in Pipedrive → Settings → Calendar Sync → Google Calendar. "Meeting" activity type must be enabled for sync.

Technical Reference

Netlify Functions

formspree-webhook.mjs

Triggered by Formspree webhook on every form submission. Finds/creates Person + Org, then creates a Deal (UTMs present) or Lead (no UTMs) in Pipedrive.

schedule-lead.mjs

Pre-booking. Called by frontend JS on scheduler click. Creates a Deal with UTM fields for campaign traffic; passthrough for organic.

scheduler-webhook.mjs

Post-booking. Triggered by Pipedrive Webhook #3102756 on activity.create. Enriches Deal with person/org/note, or creates a Lead if no Deal found.

ds-includes-v2.js

Frontend JS, loaded site-wide. Captures UTMs into sessionStorage, intercepts scheduler clicks, and injects UTM hidden fields into Formspree forms.

External Service Connections

FromToConnection TypeCredential
Website formsFormspreeHTML form actionNone (public endpoint)
FormspreeNetlify FunctionREST webhook (x-hook-secret)Configured in Formspree dashboard
Netlify FunctionsPipedrive APIREST API v1PIPEDRIVE_API_TOKEN env var
PipedriveNetlify FunctionWebhook v2.0 (#3102756, activity.create)Registered via Pipedrive API
PipedriveGoogle CalendarNative two-way syncOAuth (Pipedrive Settings)
WebsitePipedrive Scheduleriframe embed + outbound linksPublic scheduler URL

Pipedrive Configuration

SettingLocationValue
Webhook #3102756Settings → Webhooksactivity.createscheduler-webhook.mjs
Calendar syncSettings → Calendar SyncGoogle Calendar, two-way, Meetings enabled
UTM custom fieldsSettings → Data Fields → Deal5 fields (see keys table above)
SchedulerSettings → SchedulerkOOeAEu2/meeting-with-bob-klein
Environment variable required: PIPEDRIVE_API_TOKEN must be set in Netlify's environment variables. All three Netlify Functions authenticate with Pipedrive using this token.

Resilience & Failure Modes

FailureImpactMitigation
Pre-booking function failsVisitor still reaches Scheduler (2s timeout fallback)Post-booking webhook creates a Lead without UTMs
Scheduler webhook doesn't fireActivity + Person still created by Pipedrive nativelyLead/Deal must be created manually; bookings are not lost
Formspree webhook failsFormspree still stores submission + sends emailFunction returns 200 to prevent retries; check Netlify logs
Pipedrive API downFunctions log errors, return gracefullyFormspree retains submissions; Scheduler retains bookings — can backfill
UTM sessionStorage clearedNo campaign attribution capturedRare (private browsing, storage cleared); visitor shows as organic
Concurrent campaign bookingsWebhook could mismatch Deals (10-min window)Extremely rare in B2B; review Deal titles if suspicious

Pipedrive Reporting

With UTM fields on Deals, Pipedrive's built-in reporting can answer:

Which campaigns generate the most deals?Group by UTM Campaign
Which channels perform best?Group by UTM Source
Which pages convert best?Group by Source Page
Pipeline value by campaign?Filter UTM Campaign, sum values
Campaign close rate?Filter UTM Campaign, won vs total
Form vs Scheduler conversion mix?Title prefix: "Website Inquiry" vs "Scheduler from"

Webhook Payload Reference (Pipedrive v2.0)

Sent to scheduler-webhook.mjs on activity.create. The webhook uses person_id and org_id to link the Deal. Booking form text (name, phone, company, agenda) is not in this payload — the handler fetches it via a separate call to GET /activities/{id}.

{
  "data": {
    "id": 12345,
    "type": "meeting",
    "subject": "Jane Smith / Bob Klein - Meeting with Bob Klein",
    "person_id": 20348,
    "org_id": 13528,
    "due_date": "2026-03-25",
    "due_time": { "value": "10:00:00" }
  },
  "previous": null,
  "meta": {
    "action": "create",
    "entity": "activity",
    "version": "2.0"
  }
}