Retrieve leads using Zapier
This tutorial shows how to save leads generated in Aurora to other applications in your IT ecosystem in real-time using Zapier in conjunction with the Leads webhook and related API endpoint.
A similar process can be followed to use other webhooks and Aurora endpoints with Zapier.
How It Works
When a potential customer submits contact information in Lead Capture AI, Aurora creates a lead object in your tenant and triggers lead_created
webhook event. On the webhook receipt in Zapier, you will retrieve lead information from Aurora using Retrieve Lead API and save the information to your target application.
Getting Started
To complete this tutorial, you will need:
- your Aurora tenant to be on the Custom or Business plan,
- your Aurora tenant to use the current API version,
- your Aurora bearer token,
- your Aurora
tenant_id
, - your own Zapier account
- Webhooks is a premium Zapier feature and, thus, will require a paid or a trial plan.
You or any Administrator for your Aurora tenant can retrieve the token and tenant id from the API Settings page.
Step 1. Create a Webhook trigger in Zapier.
After you create a new Zap, search for “Webhooks by Zapier”. Select the “Catch Hook” trigger.
Zapier will then generate a unique URL associated with this Zap that will look something like this:
<https://hooks.zapier.com/hooks/catch/12652737/ba3k7qt/
>
You will use the URL to create a webhook in Aurora. Copy the URL and keep it for the next step.
Step 2. Subscribe to lead_created webhook event.
Subscribe to lead_created
webhook event, pointing webhooks to the Zapier Catch Hook created in the previous step. See Webhooks for more details.
//POST https://api-sandbox.aurorasolar.com/tenants/{tenant_id}/webhooks
{
"webhook": {
"description": "Lead Created",
"event": "lead_created",
"url_template": "hhttps://hooks.zapier.com/hooks/catch/12652737/ba3k7qt/?lead_id=<LEAD_ID>",
"enabled": true
}
}
Step 3. Retrieve lead details and store them in our target system.
Now that Zapier is receiving the Aurora webhook, create an associated Zapier “action” that will use the lead_id
sent via webhook in an API GET request.
Continue to “Set up action,” enter the Retrieve Lead URL adding the lead_id
from the previous step at the end.
<https://api-sandbox.aurorasolar.com/tenants/{tenant_id}/leads/{lead_id}
>
Add Aurora API bearer token.
Test your action in Zapier. You should receive something similar to the following:
lead
id: 77223e00-c646-442c-b80b-4f55ef698ba5
address: 719 Albemarle St, El Cerrito, CA 94530, USA
project_id: null
latitude: 37.9089078
longitude: -122.2986376
customer
customer_address: 719 Albemarle St, El Cerrito, CA 94530, USA
customer_email: [email protected]
customer_first_name: Zapier
customer_last_name: Test
customer_phone: 55555588888
monthly_average_bill: 100
system_size_stc: 5.03
annual_production: 6398
module_count: 15
Lastly, save lead information to the application of your choice such as Google Sheets:
Considerations
- Consider using a webhook test site like https://webhook.site to verify that your webhook subscription is live.
- Your users might modify select lead attributes in Aurora. To keep your application in sync with lead changes as well, complete the steps above with
lead_changed
webhook event.
Updated 11 months ago