---
title: "Comment by Hayrullah Kar on \"Zapier: Clean the Email With a Code Step Before ChatGPT Sees It (Quoted Threads, Signatures, First Names)\" | Hashnode"
description: "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"
url: "https://hashnode.com/posts/zapier-clean-the-email-with-a-code-step-before-chatgpt-sees-it-quoted-threads-signatures-first-names/6ad91e1806260ddfc93dea82/comment/6ad9283a6211a13322e8b1c0"
---

[Discussion](https://hashnode.com/posts/zapier-clean-the-email-with-a-code-step-before-chatgpt-sees-it-quoted-threads-signatures-first-names/6ad91e1806260ddfc93dea82)

Comment [Zapier: Clean the Email With a Code Step Before ChatGPT Sees It (Quoted Threads, Signatures, First Names)](https://hashnode.com/posts/zapier-clean-the-email-with-a-code-step-before-chatgpt-sees-it-quoted-threads-signatures-first-names/6ad91e1806260ddfc93dea82)

[Hayrullah Kar](https://hashnode.com/@magesheet)

[Oct 21](https://hashnode.com/posts/zapier-clean-the-email-with-a-code-step-before-chatgpt-sees-it-quoted-threads-signatures-first-names/6ad91e1806260ddfc93dea82/comment/6ad9283a6211a13322e8b1c0)

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.
