Skip to main content
The test fails whenever I include the Body Plain

I’m building a Zap that uses Webhooks by Zapier → Custom Request to call the OpenAI Chat Completions API. A static JSON payload works perfectly, but as soon as I try to inject the dynamic Body Plain field from my “New Email Matching Search” trigger, I get this error:

We could not parse the JSON body of your request. (HINT: This likely means you aren’t using your HTTP library correctly. The OpenAI API expects a JSON payload, but what was sent was not valid JSON…)

What I’ve tried so far:

  1. Manually typing {{New_Email_Matching_Search.Body_Plain}} wrapped in escaped quotes (\"…\").

  2. Using the ➕ Insert Data picker to inject the variable.

The Zap is supposed to automatically monitor unread emails in my Gmail inbox, extract each message’s full text (Body Plain), and send that content to ChatGPT via a webhook, and generate a personalized draft response. It then creates that response as a Gmail draft in the original thread so I can quickly review and send it.

Hi ​@Username109393003333 

Is there a reason you are not trying to use the available ChatGPT/OpenAI Zap app integration?

https://zapier.com/apps/chatgpt/integrations#triggers-and-actions

 

For us to have more info, post these:

  • screenshots showing how your Zap steps are outlined
  • screenshots showing how your Zap steps are configured in EDIT mode
  • screenshots showing the encountered error
  • link to the app API endpoint documentation you used to configure the Zap step API request

 

TIP: Try asking ChatGPT for help with configuring the API request in the Zap step and troubleshooting the error


Would it be easier for me to use the integration? My goal is to have ChatGPT automatically read each incoming email, generate a tailored reply using the full plain‑text content, and save it as a draft in Gmail.


@Username109393003333 

Try these Zap actions: