Best Way to List Multiple Responses (If They Exist) After API Call to Appointment Scheduler?
Currently working with Acuity Scheduling platform. After a GET request to fetch currently booked appointments for the user, the date and time of each appointment is listed as response.[i].date and response.[i].time where [i] is the appointment's position in the array. If the user has more than one appointment scheduled, what is the best method to relay the information while re-using the {date} and {time} variables? I'm trying to avoid creating dozens of unique variables in order to capture the information of each response.

1 Reply
Here’s a simple pattern that lets you surface any number of Acuity appointments without creating a new Voiceflow variable for every item.
1. API call ➜ capture the whole array
• In the API step, map the path that holds the list (usually just
• You only ever store one raw array and (optionally) one formatted string.
• The function step can loop over any length array, so you never have to pre-create
• Need richer UI (buttons, cards, carousel)? In that same function build the corresponding traces – Voiceflow chat will render them automatically (see “Dynamically Render Voiceflow Steps”). Docs: https://docs.voiceflow.com
• In the API step, map the path that holds the list (usually just
response
) to a single VF variable, e.g. {appointments_raw}
.
• The value will come into Voiceflow as a JSON-encoded string.
2. Code / Function step ➜ build the message you need
3. Speak or display the result
If you returned the trace above the user immediately sees the list. If you only returned outputVars
, simply drop a Text step afterwards and reference {appointment_list}
.
Why this approach works• You only ever store one raw array and (optionally) one formatted string.
• The function step can loop over any length array, so you never have to pre-create
{date1}
, {time1}
, {date2}
… variables.• Need richer UI (buttons, cards, carousel)? In that same function build the corresponding traces – Voiceflow chat will render them automatically (see “Dynamically Render Voiceflow Steps”). Docs: https://docs.voiceflow.com