Add the custom fields in Salesforce
In Setup, open Object Manager › Contact › Fields & Relationships and create six fields. Salesforce adds __c to each field name.
Integrations · n8n
Build a workflow that checks the phone number on every new Salesforce contact. Carrier, line type and ported status land on the contact.
Your first $5 of validations are on us, valid for 30 days. No card required.
score.phone.validation.mnpHTTP RequestSalesforce
What you'll build
One execution per new contact. Five results and the time of the check land on the contact.
A ScoreMachine account. Create your workspace with Start free. Your first $5 of validations are on us, valid for 30 days. No card required.
A long-lived API key. Ask your account manager for one. The key goes in the Token header of every request, where a login token would go. No key yet? The If You Have No API Key section logs in with your email and password.
n8n Cloud or a self-hosted instance. n8n counts a workflow run as one execution, whatever the number of nodes. Community Edition is free to self-host.
A Salesforce credential in n8n. n8n connects through an External Client App in Salesforce. Step 01 also needs permission to add custom fields to Contact.
Seven steps and four nodes. The workflow runs every time Salesforce creates a contact.
In Setup, open Object Manager › Contact › Fields & Relationships and create six fields. Salesforce adds __c to each field name.
In n8n, create a Header Auth credential. n8n keeps credentials apart from the workflow, so the key never sits in a node.
Add the Salesforce Trigger node, connect your Salesforce credential and pick On Contact Created.
Fetch Test Event returns a recent contact. Its Phone field holds the number to check.
Add an HTTP Request node and fill in the fields below. Import cURL also works, with the curl sample from doc.scoremachine.ai.
Switch the JSON field to Expression, so n8n fills in the contact's Phone. Use MobilePhone to check the mobile field.
phones takes numbers in E.164 format, such as +447911123456. geo_iso_code is optional and takes a two-letter ISO country code.
The node's output holds result, with phone_validation_mnp inside it.
Add an If node after the HTTP Request. The true output catches responses that carry error. Connect the false output to step 06.
Add a Salesforce node on the If node's false output. Set Contact › Update, then add one custom field row per result.
Click Execute workflow, then add a contact in Salesforce with the number +44 7911 123456. Open the contact when the execution finishes. Then click Publish, so the workflow runs on every new contact.
Line type mobile · Carrier Vodafone · Ported true · Phone E.164 +447911123456
Six fields land on the record. Five come from the response, and one is the time of the check.
valid says whether the number fits a numbering range. It does not say whether the number is in use. score.phone.ehlr answers that.
mcc and mnc identify the serving network by its mobile country and network codes. Add two text fields to store them.
A failed call returns an error object in place of result. The object carries code, message and optional data. An account with no funds left returns code -32004 and the message Low balance. The If node in step 05 sends error responses down its true output. Salesforce is left unchanged.
Retry On Fail in step 04 repeats a failed request up to three times, 2 seconds apart.
Up to 20 requests per second. 2 seconds average response. Up to 10,000 numbers per request. A flow that runs once per new record sends one request per record.
For records already in your CRM, export a CSV and upload the file in your workspace. Uploads take up to 5 MB and 200,000 rows.
auth.login takes your email and password. The token arrives in the Token response header, and it lasts 24 hours.
The HTTP Request node can return response headers with the body. A login node reads the token, and the check node sends it on.
Add an HTTP Request node between the trigger and the check, and name it ScoreMachine login.
In the check node, set Authentication to None and add a Token header. The phone now comes from the trigger by name, since the login node sits in between.
n8n returns header names in lowercase, so the expression reads headers.token.
The password sits in the workflow. Anyone who can edit it can read the password. Ask your account manager for an API key when you can.
Create your workspace, or walk through your stack with our team.
Zapier guideMake guideCRM integrationsAPI reference at doc.scoremachine.ai