---
title: "Discussion on \"Zapier: Clean the Email With a Code Step Before ChatGPT Sees It (Quoted Threads, Signatures, First Names)\" | Hashnode"
description: "Discussion on \"Zapier: Clean the Email With a Code Step Before ChatGPT Sees It (Quoted Threads, Signatures, First Names)\". Disclosure: Signatoro's founder built the Signatoro Zapier app and invited me to its beta so I could build the lesson this post extends. I'm not paid by Signatoro and there's no affiliate link.\nEvery"
url: "https://hashnode.com/posts/zapier-clean-the-email-with-a-code-step-before-chatgpt-sees-it-quoted-threads-signatures-first-names/6ad91e1806260ddfc93dea82"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Zapier: Clean the Email With a Code Step Before ChatGPT Sees It (Quoted Threads, Signatures, First Names)](https://stepthrough.hashnode.dev/zapier-clean-the-email-with-a-code-step-before-chatgpt-sees-it-quoted-threads-signatures-first-names?utm_source=hashnode&utm_medium=feed)

Disclosure: Signatoro's founder built the Signatoro Zapier app and invited me to its beta so I could build the lesson this post extends. I'm not paid by Signatoro and there's no affiliate link. Every

Oct 21 · 7 min read · stepthrough.hashnode.dev  
Read the article

-   [#zapier](https://hashnode.com/tag/zapier)
-   [#automation](https://hashnode.com/tag/automation)
-   [#ai](https://hashnode.com/tag/ai)
-   [#javascript](https://hashnode.com/tag/javascript)

## Written by

[Robert Breen](https://hashnode.com/@rjb7607)

@rjb7607

  
[View profile](https://hashnode.com/@rjb7607)

## Responses 1

Markdown supported · ⌘↵ to post

[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.
