Top 200 ReposEXPLORER
Browse agents, categories and pages
Back to results
Planned, not doneThe source describes an intention, not a finished result.

Add a Final Quality Gate to Sales Email Sequences

Overview

Build a Dify workflow that refines a draft sales email in stages, then has a final reviewer step label it send, defer or disqualify and routes it to the right queue for a person.

Problem or Objective

More in Sales, Marketing and Support

AI Agents and Models

Tools and Integrations

Tools
Dify
Prerequisites
A Dify workspace (cloud or self-hosted), an LLM provider, lead data you may lawfully use, and your own email tool for sending after approval.

How It Works

In Dify, create a workflow whose input is one lead record and one draft email. Add an LLM step that tightens the draft, then a second LLM step that checks every claim in the email against the lead record and flags anything unsupported. Add a final reviewer LLM step that returns one label, send, defer or disqualify, with a one-line reason, using rules you write: for example disqualify if the lead is on your suppression list or outside your market, defer if key facts are missing. Use an If-Else node on that label to route each case. Send-labelled drafts go to a review list where a person reads and approves each one before sending it from your own email tool; deferred and disqualified leads are logged with the reason.

Implementation Workflow

Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.

  1. Choose the agentSet up Dify.
  2. Connect the toolsConnect the tools this workflow relies on: Dify.
  3. Check the prerequisitesA Dify workspace (cloud or self-hosted), an LLM provider, lead data you may lawfully use, and your own email tool for sending after approval.
  4. Gather your detailsCollect what the prompt asks for: Lead data passed in, Refined draft from the earlier step, When to disqualify, When to defer.
  5. Run the starter promptPaste the starter prompt below into Dify and adapt it to your case.
  6. Check against the documentationCompare what you get with the documentation at github.com before you rely on it.

Practical Starter Prompt: Label a sales draft for the review queue

Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].

Preview
You are the final reviewer for outbound email. Lead record: [Lead data passed in]. Draft: [Refined draft from the earlier step]. Rules: disqualify if [When to disqualify]; defer if [When to defer]; otherwise send. Check that every claim in the draft is supported by the lead record. Return only a JSON object with label (send, defer or disqualify), reason in one sentence, and unsupported_claims as a list. A send label only puts the draft in the queue for a person to approve; never send anything.

Route on the label with an If-Else node. A person reads and approves every send-labelled draft before it goes out from your email tool.

Expected Results and Benefits

This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.

This is a suggested workflow, not a reported outcome. The Dify README describes building and testing AI workflows on a visual canvas, and the If-Else page says the node routes execution down different paths based on conditions, using variables that can come from LLM responses. No cited page shows a sales email gate, so how consistently the reviewer step labels drafts is untested here.

Limitations and Considerations

An LLM reviewer can mislabel drafts, so a person still approves every email before it is sent, and nothing in this workflow sends mail by itself. Check your email tool and contact data for suppression lists and opt-outs, and follow the rules on unsolicited commercial email where you and your leads are. Keep lead data in the workflow to what the email needs. Test the labels on a set of past drafts before relying on them. Results depend on your setup and were not independently reproduced by Top 200 Repos.

GitHub Repositories

AI Agent Repository

Source code of the agent that does the work.

Related Videos

About langgenius/dify

About langgenius/dify

Independent creators. Listing a video implies no endorsement, sponsorship or partnership.

Sources

  1. langgenius/dify README (opens in a new tab)

    Project documentation · github.com · Undated · Source checked 25 Nov 2026, 11:59 UTC

    What this source supports
    • Build and test powerful AI workflows on a visual canvas, leveraging all the following features and beyond.
  2. If-Else - Dify Docs (opens in a new tab)

    Project documentation · docs.dify.ai · Undated · Source checked 27 Nov 2026, 08:45 UTC

    What this source supports
    • The If-Else node adds decision-making logic to your workflows by routing execution down different paths based on conditions you define.
    • Variables can come from user input, LLM responses, API calls, or any other workflow node output.
Report a problem

More with Dify

Planned, not done

Reply to new GitHub issues automatically with a Dify workflow and GitHub trigger

Dify’s tutorial starts a workflow the moment an issue is opened, has an agent node read it and write a helpful comment, and posts that comment back to the issue through GitHub.

youtube.com · 15 Dec 2025langgenius/dify
Planned, not done

Use Separate Finder and Verifier Agents to Vet Bugs

A Dify workflow runs two agents in turn on a pasted code change or document: one lists suspected bugs, the other tries to confirm or disprove each with quoted evidence before anything is reported.

github.comlanggenius/dify
Planned, not done

Convert Feature Audits Into Engineering Handoffs

Build a Dify workflow that reads an export of bug reports and feature requests, groups them by feature, and writes a structured handoff a person reviews before any coding agent gets it.

github.comlanggenius/dify

View all: Dify