Send leads to Zapier
Connect Qzzr to 5,000+ apps without writing code. Use Zapier when you want to send leads to a tool that Qzzr does not have a direct integration for — such as HubSpot, Notion, Airtable, Slack, or any app in the Zapier ecosystem. This guide shows how to extract specific fields like email and name from a Qzzr webhook payload using a Code step in Zapier.
Why this is needed: Qzzr sends form responses as a nested JSON array inside data.form. Zapier cannot map array items reliably by name, so a small JavaScript step is used to flatten the data into clean fields.
Step 1 — Create the webhook trigger
- In Zapier, create a new Zap and choose Webhooks by Zapier as the trigger app.
- Set the Trigger event to Catch Hook.
- Zapier will generate a unique webhook URL. Copy it.
- In Qzzr, go to PUBLISH and click on Save and connect data. Under Add integrations, find Webhook, click on ADD, paste the URL into the Webhook URL field, and click on CONTINUE.
- Submit a test response in your Q so Zapier can capture a sample payload.
- Back in Zapier, click Test trigger. You should see a captured record (e.g.
request A). Select it and continue.
Step 2 — Add a Code step to extract fields
- Add a new action step and select Code by Zapier.
- Choose Run JavaScript as the event.
- Under Input Data, create one entry:
- Key (left field):
form - Value (right field): click the + icon and select
Raw Output: Object.to_json(...)from the Catch Hook step. This passes the full webhook payload as a JSON string into the code.
- Key (left field):
- Paste the script below into the Code field:
const payload = JSON.parse(inputData.form); const form = payload.data.form; const byId = {}; form.forEach(f => { byId[f.customId] = f.value; }); return { email: byId.email, name: byId.first_name };
How it works: The script parses the JSON payload, loops through the data.form array, and uses each field's customId as a key. The result is a flat object with predictable field names — independent of the order in which fields appear in the Q.
Step 3 — Test the code step
- Click Test step.
- Under Data out, you should see two clean fields:
- Email — e.g.
janluca@qzzr.com - Name — e.g.
James Smith
- Email — e.g.
- If you see an error like
"Unexpected token / is not valid JSON", the Input Data is not mapped correctly. Open the value field again and make sure you selected the raw JSON output from the Catch Hook step, not a single character or unrelated field.
Step 4 — Use the fields in your next action
Add your next action — for example Email by Zapier — Send Outbound Email, or any CRM, spreadsheet, or marketing tool. In the action's field mapping, the Email and Name outputs from the Code step are now available as regular, selectable fields.
Adding more fields
To return additional form fields, extend the return object with any customId defined in your Qzzr form:
return {
email: byId.email,
name: byId.first_name,
company: byId.company,
phone: byId.phone
};
You can also pull values from payload.data.question (quiz answers), payload.data.personality (personality results), or payload.data.magic (winning personality) using the same pattern.