Integrations / Workflow & GTM
// rest recipe Dizo + Salesforce
Enrich Salesforce leads with an Apex callout from a record-triggered Flow, using a Named Credential for the Dizo key.
No native app needed. This calls the Dizo REST API at
https://api.dizo.ai/v1. Use a dz_test_ key while you build: it returns synthetic data and costs nothing.Steps
- Create an External Credential + Named Credential
Dizoforhttps://api.dizo.aiwith a customAuthorizationheader. - Add the invocable Apex class below.
- Call it from a record-triggered Flow on Lead create (run asynchronously).
public with sharing class DizoEnrich {
@InvocableMethod(label='Dizo: enrich lead' callout=true)
public static void run(List<Id> leadIds) {
for (Lead l : [SELECT Id, Email FROM Lead WHERE Id IN :leadIds]) {
HttpRequest req = new HttpRequest();
req.setEndpoint('callout:Dizo/v1/people/enrich');
req.setMethod('POST');
req.setHeader('Content-Type', 'application/json');
req.setHeader('Idempotency-Key', l.Id);
req.setBody(JSON.serialize(new Map<String,Object>{ 'email' => l.Email, 'max_credits' => 2 }));
HttpResponse res = new Http().send(req);
if (res.getStatusCode() != 200) continue; // 404 = not found, not charged
Map<String,Object> p = (Map<String,Object>)((Map<String,Object>)JSON.deserializeUntyped(res.getBody())).get('person');
l.Title = (String)p.get('title');
}
// update leads outside the loop in production code
}
}Notes
- Run callouts asynchronously (Flow async path or Queueable) and respect Salesforce callout limits; for large backfills use Dizo batch and import the results file.
Endpoints used
Related integrations
n8n
Call Dizo from an n8n HTTP Request node to enrich leads, find emails and route results anywhere in your workflow.
Make
Enrich records in Make scenarios with the HTTP "Make a request" module and Dizo’s REST API. No custom app required.
Zapier
Use Webhooks by Zapier to send new leads to Dizo and write the verified email and phone back to your CRM or sheet.