Cleaning before the AI step is the right place for this, and the Filter on isAutoReply saves a paid call on robots. The check itself worries me, though, because it also tests the first 500 characters of the raw body. A patient writing "I'm out of office next week, can I book something after the 28th?" matches /out of (the )?office/, the Filter ends the Zap quietly, and a real inquiry gets no draft with nothing to show why. For a practice, that is exactly the lead the Zap exists to catch. I would treat a subject match ("Automatic reply:", "Out of Office:") as the strong signal. When only the body matches, I would let the Zap continue and label the draft for a person to check, rather than drop it. Gmail's vacation responder uses whatever subject the person set, so subject alone will miss some auto-replies. One smaller thing: the JavaScript version strips punctuation from firstName and the Python one does not, and both turn "Dr. Dana Whitfield" into a greeting for "Dr", so a short list of titles to skip would help.
Cleaning before the AI step is the right place for this, and the Filter on isAutoReply saves a paid call on robots. The check itself worries me, though, because it also tests the first 500 characters of the raw body. A patient writing "I'm out of office next week, can I book something after the 28th?" matches /out of (the )?office/, the Filter ends the Zap quietly, and a real inquiry gets no draft with nothing to show why. For a practice, that is exactly the lead the Zap exists to catch. I would treat a subject match ("Automatic reply:", "Out of Office:") as the strong signal. When only the body matches, I would let the Zap continue and label the draft for a person to check, rather than drop it. Gmail's vacation responder uses whatever subject the person set, so subject alone will miss some auto-replies. One smaller thing: the JavaScript version strips punctuation from firstName and the Python one does not, and both turn "Dr. Dana Whitfield" into a greeting for "Dr", so a short list of titles to skip would help.