If you’re running Salesforce and getting hammered by spam leads, you already know the pain: junk clogs up your pipeline, sales reps waste time, and your reporting goes sideways. This guide is for admins, sales ops, and anyone tasked with cleaning up Salesforce lead quality. We’ll walk through how to connect Emailguard to Salesforce to keep out the garbage—without breaking your flow or making your users jump through hoops.
No fluff, no vague promises—just clear steps, common snags, and what to watch out for.
Why bother integrating Emailguard with Salesforce?
Let’s be honest: Salesforce’s out-of-the-box spam filtering is barely there. If you’re collecting leads via web forms, landing pages, or API, you’re probably getting junk—bots, fake emails, throwaways. Emailguard promises to filter that noise before it hits your CRM, saving your team from chasing ghosts.
But does it work? Usually, yes—if you set it up right. Integrating Emailguard with Salesforce isn’t plug-and-play, but it’s doable if you follow the steps. This guide assumes you already have both platforms up and running.
Step 1: Get your Emailguard account ready
First things first: log into your Emailguard dashboard. If you don’t have an account, set one up. Don’t bother comparing every pricing tier—just pick the one that matches your lead volume (don’t overthink it).
Checklist: - Access to Emailguard admin dashboard - API key or credentials (find this under “Integrations” or “API Access” in Emailguard) - A test email address (use your own, not a throwaway)
Pro tip:
Don’t use your main Salesforce account for testing. Make a sandbox user or use a dev org if you can. Mistakes happen.
Step 2: Map out where leads enter Salesforce
Emailguard works by checking emails before they get to Salesforce. So, you need to figure out how leads land in your CRM. Usually, it’s one of these:
- Salesforce Web-to-Lead forms
- Custom landing pages (often via Marketing Automation tools)
- API integrations (like Zapier, custom scripts, etc.)
- Manual imports (CSV uploads)
Why this matters:
Where the lead enters determines how you integrate Emailguard. If you skip this step, you’ll end up blocking legit leads or missing bad ones.
Step 3: Pick your integration method
There are three main ways to wire up Emailguard with Salesforce. Here’s a quick breakdown:
1. Direct form validation (best for Web-to-Lead)
- Add Emailguard’s API call to your form’s code.
- When a user submits, the email is checked via Emailguard before sending to Salesforce.
- Bad emails get blocked up front; good ones go through.
Pros:
- Stops junk before it hits Salesforce.
- No extra records to clean up.
Cons:
- Requires access to form code (not always easy if marketing owns the site).
Skip this if:
You use a platform like Pardot or Marketo that locks down the form code.
2. Middleware/API integration (best for custom flows)
- Route new leads through a middle layer (Zapier, custom Lambda function, whatever).
- Middleware calls Emailguard to check the email.
- Only valid leads get pushed to Salesforce.
Pros:
- Flexible—works with almost any setup.
- Can add more checks (phone validation, deduping, etc.)
Cons:
- More moving parts.
- Slight delay in lead creation.
Skip this if:
You don’t have someone who can write or maintain scripts.
3. Salesforce Flow or Apex Trigger (last resort)
- Lead enters Salesforce as usual.
- A Flow or Apex Trigger calls out to Emailguard’s API.
- If the email is bad, flag or delete the record.
Pros:
- No need to change front-end forms.
- Keeps everything inside Salesforce.
Cons:
- Spam still gets into Salesforce, even if briefly.
- Writing API calls in Flow or Apex can be a pain.
- API callouts are subject to governor limits and permissions.
Skip this if:
You want to keep junk out of Salesforce entirely.
Step 4: Set up the Emailguard API (the technical bit)
No matter which method you choose, you’ll need your Emailguard API key.
Basic API call structure:
http
POST https://api.emailguard.com/v1/validate
Headers:
Authorization: Bearer
You’ll get a response like: json { "email": "test@example.com", "valid": true, "reason": "deliverable" }
- If
"valid": true
, let the lead through. - If false, block or flag it.
What to ignore:
Don’t bother with “score” fields or extra metadata unless you really need to tune it. Start simple: pass/fail is enough.
Step 5: Plug Emailguard into your lead flow
Here’s how to wire things up, depending on your method.
A. Web-to-Lead Forms
- Open your form HTML or JavaScript.
- On form submit, send an AJAX call to Emailguard’s API with the email address.
- If the response is valid, let the form submit as usual.
- If not, show an error to the user (“Please enter a valid email address”).
Gotchas: - Watch out for race conditions—make sure the Emailguard check finishes before the form submits. - Don’t rely on client-side checks alone; savvy spammers can bypass them.
B. Middleware/API (Zapier Example)
- In your Zap, add a “Webhooks by Zapier” step before the Salesforce action.
- Set up a POST request to Emailguard with the lead’s email.
- Use a Filter step to only continue if
"valid": true
. - If valid, create the lead in Salesforce.
Gotchas: - Make sure to handle API timeouts gracefully. - Log rejections somewhere (Google Sheet, Slack, etc.) for debugging.
C. Salesforce Flow or Apex
- Create a Record-Triggered Flow on Lead creation.
- Add an “Action” element to call a custom Apex action that hits Emailguard’s API.
- Based on the response, update a custom field (“Email Validated”) or flag for review.
Gotchas: - You’ll need to write or install an Apex class to make HTTP callouts—Salesforce doesn’t do this natively in Flow. - Don’t exceed API limits; batch requests if possible. - Error handling is crucial so you don’t block all new leads if the API hiccups.
Step 6: Test with real (and fake) emails
Before rolling out, hammer your setup with a bunch of test emails:
- Obvious spam (
asdf@asdf.com
,test@123.com
) - Disposable emails (Mailinator, Guerilla Mail, etc.)
- Real company emails
- Misspelled domains (
gmail.con
,yaho.com
)
Check that:
- Spam gets blocked or flagged
- Good leads go through
- No legit emails are rejected
Pro tip:
Don’t trust the vendor’s “test” button alone. Try real submissions from your live forms.
Step 7: Roll out and monitor
Go live, but keep an eye on things:
- Watch for false positives (real leads getting blocked)
- Track the % of blocked leads—if it’s suspiciously high or low, something’s off
- Set up alerts for API failures
What to ignore:
Don’t obsess over every single blocked lead at first. Look for big patterns.
What works, what doesn’t, and what to skip
What works: - Blocking spam at the form/API level is the cleanest. - Emailguard catches most common junk, but nothing’s perfect. - Middleware setups give you the most control (but require a bit more work).
What doesn’t: - Relying only on Salesforce validation rules—they’re too basic. - Manual review—nobody has time. - Overcomplicating things with multiple layers of checks right away.
What to skip: - Fancy scoring or “AI-powered” lead enrichment until you’ve nailed basic email validation. - Plug-ins or AppExchange tools that just wrap Salesforce’s built-in validation—they won’t help much.
Wrapping up: Keep it simple, iterate as you go
Don’t chase perfection out of the gate. Start with a basic Emailguard check, plug it in where it’ll make the most impact, and see how it fits your flow. If you’re blocking too many real leads, ease up. If spam still gets through, tighten things a bit. Iterate until it’s good enough—without making your sales team’s life harder.
Remember, the goal isn’t to win an award for lead hygiene. It’s to save your team time and keep Salesforce clean enough to trust. If you do that, you’re way ahead of most.