See llms.txt for all machine-readable content.

Back to Templates

Write compliant cold email drafts in Gmail with OpenAI and Precleared MCP

Quick overview

This workflow takes a list of leads, asks Precleared (via MCP) if each recipient can be emailed under common anti-spam/privacy rules, uses OpenAI to draft a short personalized cold email only when allowed, verifies the Precleared receipt, and then creates a Gmail draft or holds the lead back.

How it works

  1. Starts manually and loads your sender details and offer (country, name, company, postal address, opt-out line, and pitch).
  2. Generates sample leads (or your mapped lead source) with recipient email, name, company, address source, and notes.
  3. Uses an OpenAI agent to call Precleared’s MCP contact_check tool for each lead and, only when the verdict is ok_to_email, writes a short email and returns the verdict, receipt ID, subject, body, and reason as JSON.
  4. Parses the agent’s JSON response into structured fields and extracts the recipient email domain.
  5. Fetches the receipt from Precleared’s API and confirms both that the verdict is ok_to_email and that the receipt domain matches the recipient domain.
  6. Creates a Gmail draft for verified, allowed recipients, and routes all other leads to a hold-back output with the verdict, reason, and receipt ID.

Setup

  1. Add OpenAI credentials to the OpenAI chat model node and choose the model you want to use.
  2. Connect a Gmail account and ensure the draft message fields (to, subject, and body) match your desired formatting.
  3. Review and update the values in “Your settings” (sender country, company identity, postal address, opt-out line, and pitch).
  4. (Optional) Add a Precleared API key by configuring the Precleared MCP client to use Bearer authentication if you don’t want to rely on shared, IP-based access.
  5. Replace the sample leads with your own lead source (for example, Google Sheets, Airtable, HubSpot, or a webhook) and map its fields to email, first name, company, address source, and notes.