After posting: I saw this other related post which instructs you to first extract the variables using the Extract Dynamic Variable Tool.
I followed those instructions.
I updated my custom function’s query parameter to use the variable {{requested_appointment_date}}:
