We are looking to enrich our DB with new contacts.
We have Clearbit as our external enrichment tool, Clearbit allows to create contacts through API.
Can we do it using a webhook? How can we configure a webhook so that it will create new leads?
Using a Marketo Webhook cannot work. A Marketo webhook is an outbound API that Marketo can call and that is always related to an existing lead.
What you want to do it to use Marketo Rest API or Marketo form API or the Save2 endpoint and call them from your third party solution. Among these, the Save2 endpoint can be called from a third party webhook, in other terms, a webhook fired from Clearbit.
Be aware that adding new leads to your database without their individual explicit and well informed consent it quite a risky approach and will be totally illegal in all the EU in 8 days. This is called GDPR
A webhook can loop back and use the Marketo REST API to manipulate leads other than the lead that executed the 'hook. Obviously this entails custom code on the webhook platform.
But this is hardly the best way to add leads to Marketo, as you will smack up against API limits. What is the exact use case for creating additional leads *in real-time* based on passing a lead to a Clearbit webhook (or to an intermediate hook to that processes Clearbit results) rather than in batch?
What if we wanted to do a 'shopping cart abandonment' email for forms that were incomplete after 30 minutes of visiting a specific form page?
In this case, we are trying to trigger a Marketo email 30 minutes after a lead has visited a specific (non-Marketo, custom form) URL, but has not yet visited the form's thank you page (also non-Marketo).
We also have the data pushing into our CRM, but from what I am seeing, that entire process (form page visit TO crm TO marketo TO triggered email to lead) will not be quick enough to send within 30 minutes- and a Webhook in Marketo with a trigger campaign could be a faster/better route.
I don't see that you need one. While I wouldn't rely on Marketo to send the email exactly 30m later (describe it more like "approximately 30m under ideal instance conditions") you just need a wait step.