Integration, webhook
Turn Google Ads lead forms into answered leads in your real estate CRM
Treasury receives Google Ads lead form submissions by webhook. Paste your brand's webhook URL and key into the lead form extension, and each submission becomes a lead in that brand's pipeline, tagged google-ads, with the owner alerted. Test leads are acknowledged and not stored, and a replayed lead is not filed twice.
The claim
A Google Ads lead form submission becomes one lead in the brand named in the URL, through POST /api/google/leads, and a replay of the same lead id is reported as a duplicate. The setup steps are tested against the route's own test file.
What is in place
What the route does with each submission
- Checked key
- Google cannot send an Authorization header, so the key travels in the body as google_key. Treasury compares it, in constant time, to the brand's webhook secret. A wrong key and an unknown brand get the same 401, so brand names cannot be probed.
- Mapped fields
- Full name (or first and last), email and phone number are mapped to the lead. Any other question on the form, such as budget or bedrooms, rides along as the property interest, up to 500 characters.
- Test leads skipped
- The Send test data button in Google Ads is acknowledged with stored false, so the form saves and nothing lands in your pipeline.
- Replays are duplicates
- The external id is google: plus Google's lead id. Posting the same lead id again returns a duplicate and creates nothing.
- Same door as every lead
- The route rewrites the body and hands it to /api/leads, so the rate limits, plan limits and owner alert are that route's, once.
Steps
How to set it up
1. Find your brand's workspace slug and its webhook secret in the app. 2. In Google Ads, open the lead form extension and set the webhook URL to https://<your workspace host>/api/google/leads?org=<slug>. 3. Paste the webhook secret into the key field.
4. Press Send test data in Google Ads. You should see the form save with no lead created. 5. Submit one real test form with a placeholder number and confirm a lead appears with the source google-ads. The URL shape and the 401, duplicate and test-lead behaviour above are the cases in src/app/api/lead-path-google.test.ts.
What is not covered
What this does not do
Treasury does not read your Google Ads campaign into the lead beyond the form answers, and it does not send conversion outcomes back to Google. Treasury sends outcomes back to Meta for Facebook and Instagram lead ads; there is no equivalent for Google.
The form's own consent wording is yours to write. Treasury files what Google sends and does not add consent text to a Google form.
Asked and answered
Questions
- What URL do I paste into Google Ads?
- Your workspace's address followed by /api/google/leads?org= and your workspace slug. The key field takes the brand's webhook secret, which Treasury checks against the key in the body.
- Will Send test data create a lead?
- No. Treasury acknowledges a test lead so the form saves and stores nothing.
- What if Google sends the same lead twice?
- The second delivery is reported as a duplicate and no second lead is created, because the Google lead id is the external id.
- Does Treasury report Google Ads conversions back to Google?
- No. Treasury sends lead outcomes back to Meta for Facebook and Instagram lead ads. There is no equivalent feedback to Google Ads today.
Request access
Tell us how many brands you run and who needs to see them. We will walk you through the system with your names in it, not ours.
We reply within one working day. Already a customer? Sign in at app.treasurycrm.com.