Dify
English
English
  • Getting Started
    • Welcome to Dify
      • Features and Specifications
      • List of Model Providers
    • Dify Community
      • Deploy with Docker Compose
      • Start with Local Source Code
      • Deploy with aaPanel
      • Start Frontend Docker Container Separately
      • Environment Variables Explanation
      • FAQs
    • Dify Cloud
    • Dify Premium on AWS
    • Dify for Education
  • Guides
    • Model
      • Add New Provider
      • Predefined Model Integration
      • Custom Model Integration
      • Interfaces
      • Schema
      • Load Balancing
    • Application Orchestration
      • Create Application
      • Chatbot Application
        • Multiple Model Debugging
      • Agent
      • Application Toolkits
        • Moderation Tool
    • Workflow
      • Key Concepts
      • Variables
      • Node Description
        • Start
        • End
        • Answer
        • LLM
        • Knowledge Retrieval
        • Question Classifier
        • Conditional Branch IF/ELSE
        • Code Execution
        • Template
        • Doc Extractor
        • List Operator
        • Variable Aggregator
        • Variable Assigner
        • Iteration
        • Parameter Extraction
        • HTTP Request
        • Agent
        • Tools
        • Loop
      • Shortcut Key
      • Orchestrate Node
      • File Upload
      • Error Handling
        • Predefined Error Handling Logic
        • Error Type
      • Additional Features
      • Debug and Preview
        • Preview and Run
        • Step Run
        • Conversation/Run Logs
        • Checklist
        • Run History
      • Application Publishing
      • Structured Outputs
      • Bulletin: Image Upload Replaced by File Upload
    • Knowledge
      • Create Knowledge
        • 1. Import Text Data
          • 1.1 Import Data from Notion
          • 1.2 Import Data from Website
        • 2. Choose a Chunk Mode
        • 3. Select the Indexing Method and Retrieval Setting
      • Manage Knowledge
        • Maintain Documents
        • Maintain Knowledge via API
      • Metadata
      • Integrate Knowledge Base within Application
      • Retrieval Test / Citation and Attributions
      • Knowledge Request Rate Limit
      • Connect to an External Knowledge Base
      • External Knowledge API
    • Tools
      • Quick Tool Integration
      • Advanced Tool Integration
      • Tool Configuration
        • Google
        • Bing
        • SearchApi
        • StableDiffusion
        • Dall-e
        • Perplexity Search
        • AlphaVantage
        • Youtube
        • SearXNG
        • Serper
        • SiliconFlow (Flux AI Supported)
        • ComfyUI
    • Publishing
      • Publish as a Single-page Web App
        • Web App Settings
        • Text Generator Application
        • Conversation Application
      • Embedding In Websites
      • Developing with APIs
      • Re-develop Based on Frontend Templates
    • Annotation
      • Logs and Annotation
      • Annotation Reply
    • Monitoring
      • Data Analysis
      • Integrate External Ops Tools
        • Integrate LangSmith
        • Integrate Langfuse
        • Integrate Opik
    • Extension
      • API-Based Extension
        • External Data Tool
        • Deploy API Tools with Cloudflare Workers
        • Moderation
      • Code-Based Extension
        • External Data Tool
        • Moderation
    • Collaboration
      • Discover
      • Invite and Manage Members
    • Management
      • App Management
      • Team Members Management
      • Personal Account Management
      • Subscription Management
      • Version Control
  • Workshop
    • Basic
      • How to Build an AI Image Generation App
    • Intermediate
      • Build An Article Reader Using File Upload
      • Building a Smart Customer Service Bot Using a Knowledge Base
      • Generating analysis of Twitter account using Chatflow Agent
  • Community
    • Seek Support
    • Become a Contributor
    • Contributing to Dify Documentation
  • Plugins
    • Introduction
    • Quick Start
      • Install and Use Plugins
      • Develop Plugins
        • Initialize Development Tools
        • Tool Plugin
        • Model Plugin
          • Create Model Providers
          • Integrate the Predefined Model
          • Integrate the Customizable Model
        • Agent Strategy Plugin
        • Extension Plugin
        • Bundle
      • Debug Plugin
    • Manage Plugins
    • Schema Specification
      • Manifest
      • Endpoint
      • Tool
      • Agent
      • Model
        • Model Designing Rules
        • Model Schema
      • General Specifications
      • Persistent Storage
      • Reverse Invocation of the Dify Service
        • App
        • Model
        • Tool
        • Node
    • Best Practice
      • Develop a Slack Bot Plugin
      • Dify MCP Plugin Guide: Connect Zapier and Automate Email Delivery with Ease
    • Publish Plugins
      • Publish Plugins Automatically
      • Publish to Dify Marketplace
        • Plugin Developer Guidelines
        • Plugin Privacy Protection Guidelines
      • Publish to Your Personal GitHub Repository
      • Package the Plugin File and Publish it
      • Signing Plugins for Third-Party Signature Verification
    • FAQ
  • Development
    • Backend
      • DifySandbox
        • Contribution Guide
    • Models Integration
      • Integrate Open Source Models from Hugging Face
      • Integrate Open Source Models from Replicate
      • Integrate Local Models Deployed by Xinference
      • Integrate Local Models Deployed by OpenLLM
      • Integrate Local Models Deployed by LocalAI
      • Integrate Local Models Deployed by Ollama
      • Integrate Models on LiteLLM Proxy
      • Integrating with GPUStack for Local Model Deployment
      • Integrating AWS Bedrock Models (DeepSeek)
    • Migration
      • Migrating Community Edition to v1.0.0
  • Learn More
    • Use Cases
      • DeepSeek & Dify Integration Guide: Building AI Applications with Multi-Turn Reasoning
      • Private Deployment of Ollama + DeepSeek + Dify: Build Your Own AI Assistant
      • Build a Notion AI Assistant
      • Create a MidJourney Prompt Bot with Dify
      • Create an AI Chatbot with Business Data in Minutes
      • Integrating Dify Chatbot into Your Wix Website
      • How to connect with AWS Bedrock Knowledge Base?
      • Building the Dify Scheduler
      • Building an AI Thesis Slack Bot on Dify
    • Extended Reading
      • What is LLMOps?
      • Retrieval-Augmented Generation (RAG)
        • Hybrid Search
        • Re-ranking
        • Retrieval Modes
      • How to Use JSON Schema Output in Dify?
    • FAQ
      • Self-Host
      • LLM Configuration and Usage
      • Plugins
  • Policies
    • Open Source License
    • User Agreement
      • Terms of Service
      • Privacy Policy
      • Get Compliance Report
  • Features
    • Workflow
Powered by GitBook
On this page
  • Background
  • Prerequisites
  • Initializing Zapier MCP Service in Dify
  • Step 1: Request a Zapier MCP Server URL
  • Step 2: Install the MCP SSE Plugin
  • Step 3: Create a Dify Agent Application and Enable MCP SSE Service
  • Use Case 1: Using MCP Service to Automatically Send a Single Email
  • Use Case 2: Configuring MCP Agent Strategy in Workflow
  1. Plugins
  2. Best Practice

Dify MCP Plugin Guide: Connect Zapier and Automate Email Delivery with Ease

PreviousDevelop a Slack Bot PluginNextPublish Plugins

Last updated 2 months ago

This article will help you:

This guide walks you through installing the MCP SSE plugin in your Dify workspace and configuring it to connect with Zapier’s MCP service for seamless automated email workflows.

Background

Anthropic introduced the Model Context Protocol (MCP) in late 2024. As an emerging open protocol, MCP builds a bidirectional communication channel between LLMs and external applications, functioning like a "USB-C" interface for AI, helping models discover, understand, and safely call various external tools or APIs.

In other words, developers no longer need to build complex custom integrations for each external service. Users can experience AI's ability to easily call a vast array of third-party applications, whether processing daily office tasks, analyzing data, or executing marketing automation. AI is moving from "intelligent conversation" to "efficient action."

In the Dify community, MCP has garnered significant attention. Community developers have contributed multiple MCP plugins to the plugin marketplace, allowing you to easily connect external MCP services to Dify Agent applications or workflows.

This article will use the MCP SSE plugin as an example to detail how to use MCP plugins within Dify to connect to Zapier and complete an automated email sending process.

Prerequisites

  • Dify Cloud version / Dify Community version ≥ v1.0.0

  • Zapier account

Initializing Zapier MCP Service in Dify

Zapier's MCP Server packages its existing 7000+ applications and 30,000+ actions into a single MCP Server URL. You can select and configure the tools and actions you need in the Zapier backend, such as sending emails, creating records in CRM, sending notifications in Slack, etc. Simply enter the MCP Server URL into the Dify MCP plugin configuration, and the LLM can automatically call these tools to complete various tasks during conversations or processes.

Step 1: Request a Zapier MCP Server URL

  1. Visit the .

  2. Obtain the MCP Server URL, which will be entered into the Dify plugin configuration later.

  1. Click "Edit MCP Actions" below the URL to enter the tools and actions addition page.

  2. Click Add a new action, then search for Gmail: Send Email.

  1. Taking "Send Email" as an example:

Click "Connect" under the Gmail account, then log in and authorize your Gmail inbox.

For fields like recipient, subject, and body, you can choose “Have AI guess a value for this field”. The Agent will then generate content dynamically based on the conversation context.

  1. After completing the setup, you can continue to add different Actions to enrich the Agent's available toolkit.

Step 2: Install the MCP SSE Plugin

  1. Go to the Dify plugin marketplace, search for the MCP SSE plugin and click install.

  1. Click the To Authorize button on the plugin page, and paste the Zapier MCP Server URL obtained earlier into the plugin. Reference address format:

{
  "server_name": {
    "url": "https://actions.zapier.com/mcp/*******/sse",
    "headers": {},
    "timeout": 5,
    "sse_read_timeout": 300
  }
}

Step 3: Create a Dify Agent Application and Enable MCP SSE Service

  1. Create an Agent-type application

From the navigation, select "Studio", choose "Create from Blank" in the application list and select the Agent application type, then complete the creation by entering an application name.

  1. Add MCP tools

Add both Fetch MCP Tools and Call MCP Tool in the application toolbar.

  1. Configure LLM

If you don't find the DeepSeek model in your model providers, please go to the Dify plugin marketplace to install the DeepSeek plugin.

Use Case 1: Using MCP Service to Automatically Send a Single Email

After configuration, you can automatically generate email drafts and send them to specified recipients simply by chatting with the Agent.

Simply instruct the Agent via chat to send an email, and it will handle the task using the configured MCP service. After the MCP finishes running, the email will be automatically sent to the recipient.

Use Case 2: Configuring MCP Agent Strategy in Workflow

In addition to adding the MCP SSE plugin as a tool to the Agent, you can also use the MCP Agent Strategy plugin in Workflow. After installation, configure it in the corresponding Agent node as follows:

Use the following JSON structure as a template, replacing the url value with the MCP Server address, then copy and paste the complete modified JSON into the MCP SERVER URL configuration box:

{
  "server_name": {
    "url": "https://actions.zapier.com/mcp/*******/sse",
    "headers": {},
    "timeout": 5,
    "sse_read_timeout": 300
  }
}

Once configured, when the Workflow runs to that Agent node, it can execute tasks using the configured Zapier MCP Server according to the Prompt instructions. As shown below, calling Gmail to send an email:

For optimal stability, we recommend using plugin version v0.0.4. You can change the version in the plugin’s detail settings.

Using MCP may consume a large number of tokens, so it is recommended to use a more cost-effective LLM. This article will use the deepseek-chat model as an example. You can apply for an API Key from and enter it in "Settings" → "Model Providers" → "DeepSeek".

Zapier MCP Settings page
DeepSeek Platform