A practical field guide from Automation Ace.
How to Parse Calendly Questions and Answers in Zapier Using Formatter and Code
When a Calendly invitee books a meeting and answers the intake questions you've set up, that data arrives in Zapier in a line item format — not as cleanly named fields. The questions and answers come through as a structured list where each entry contains the question text and the corresponding answer, but they are not automatically broken out into separate mappable fields named after your questions. To use a specific answer (say, the company name or project budget the invitee entered) in a downstream Zap step, you need to parse and extract it first. This guide covers how to do that with Formatter by Zapier and with a Code step.
How Calendly Sends Question Answers to Zapier
When you use the Calendly trigger in Zapier ("Invitee Created" event), the payload includes the invitee's answers to your booking page questions. Zapier surfaces these as line items — a set of fields that look like:
Questions And Answers Question(line item index 1) — the text of your first questionQuestions And Answers Answer(line item index 1) — the invitee's answer to question 1Questions And Answers Question(line item index 2) — your second questionQuestions And Answers Answer(line item index 2) — the invitee's answer- …and so on for each question
The challenge: Zapier displays these as line item index positions, not question names. If your questions change order or you add new questions, the index positions shift. More importantly, to use a specific answer (e.g., "What is your company name?") in an action step, you cannot simply map "Answer 1" — you need to find the answer that corresponds to a specific question by question text.
Approach A: Formatter by Zapier — Line Item to Text + Extract Pattern
For simple cases where you always know the position of the answer you need, Formatter's line item tools can help.
Using Formatter to access a specific position
- Add a Formatter by Zapier action step.
- Select Utilities as the transform type.
- Choose Pick from List as the action.
- Map the
Questions And Answers Answerline item field as the input list. - Specify the index position (1-based) of the answer you want to extract.
This works reliably when your Calendly questions are fixed and in a stable order. If you add or reorder questions, you must update the index in this Formatter step. For more dynamic parsing, use the Code step approach below.
Approach B: Code Step — Parse by Question Text (Recommended)
The robust approach is to parse the questions and answers by question text rather than position. This makes the Zap resilient to question reordering. A JavaScript Code step handles this in a few lines.
Step 1: Understand the data shape
In the Zap editor, run a test of the Calendly trigger and examine the output. The line item fields for questions and answers are available as arrays. In a Code step, these arrive as arrays in inputData — map them in as input variables.
Step 2: Set up the Code step inputs
In the Code by Zapier step, create two input data fields:
questions— map theQuestions And Answers Questionline item field from the Calendly triggeranswers— map theQuestions And Answers Answerline item field from the Calendly trigger
When line item fields are mapped as input data to a Code step, Zapier passes them as comma-separated strings. The Code step splits them back into arrays for processing.
Step 3: Write the parsing logic
// Split comma-separated line items back into arrays
const questions = inputData.questions.split(',').map(q => q.trim());
const answers = inputData.answers.split(',').map(a => a.trim());
// Build a lookup object keyed by question text
const qa = {};
questions.forEach((q, i) => {
qa[q] = answers[i] || '';
});
// Extract specific answers by question text
// Update these strings to match your exact Calendly question wording
output = {
company_name: qa['What is your company name?'] || '',
project_budget: qa['What is your project budget?'] || '',
how_did_you_hear: qa['How did you hear about us?'] || '',
phone_number: qa['What is your phone number?'] || '',
// Add additional question extractions as needed
raw_qa: JSON.stringify(qa) // full map as a debug field
};
The output fields (company_name, project_budget, etc.) are now available as named fields in all subsequent Zap steps — usable exactly like any other Zap field for mapping into CRM records, email templates, Slack messages, or routing conditions.
Step 4: Handle edge cases
- Optional questions: If a question is optional and the invitee left it blank, the answer will be an empty string. The
|| ''fallback in the extraction handles this gracefully. - Comma-containing answers: If invitees might enter answers containing commas (e.g., "New York, NY"), the simple comma split will break. For production Zaps with free-text answers, use the Calendly API webhook payload directly via a Webhooks by Zapier Catch Hook and parse the JSON body in the Code step instead of relying on the line item format.
- Multi-select answers: Calendly multiple-choice questions with multi-select enabled will have answers that include all selected options concatenated — handle these as a single string value.
Using Parsed Answers in Downstream Steps
Once the Code step extracts the named output fields, they integrate naturally into the rest of the Zap:
- Map
company_nameinto a HubSpot Create Contact action's Company field - Use
project_budgetin a Filter step to route high-value leads to a priority Slack channel - Pass
phone_numberto a Twilio lookup step to validate and format the number before storing it — see using the Twilio Lookup API in Zapier - Include all answers in an Airtable Create Record action to log every booking with full intake data
The line item format Calendly uses is a design decision that keeps the Zapier trigger generic across any question configuration — but it means every meaningful Calendly-to-Zapier workflow needs a parsing step. Building that parsing as a Code step with named outputs is a one-time investment that makes every downstream action in the Zap clean and readable.
For more on what is available in Zapier Code steps, see the guides on JavaScript libraries in Code steps and Python libraries in Code steps. For help building a complete Calendly booking workflow in Zapier, talk to Automation Ace.
Disclaimer: This article may include links to apps, products, or services. Some links may be affiliate links, which means Automation Ace may earn a commission at no extra cost to you.