n8n-nodes-dify
v0.0.2
Published
n8n community node for Dify API integration
Maintainers
Readme
n8n-nodes-dify
An enterprise-ready n8n community node for integrating with Dify – the LLM application development platform.
This node is designed with strict governance and security in mind, allowing you to securely connect n8n workflows to Dify APIs using centralized credentials, with provenance-backed npm publishing.
Features
This package provides a dedicated node for Dify with the following operations:
- Chat Message (
POST /chat-messages): Send a query to a Dify Chat App and receive the AI's response. - Run Workflow (
POST /workflows/run): Trigger a Dify Workflow App. - Text Completion (
POST /completion-messages): Execute a Text Generator App for tasks like summarization or translation. - Get App Info (
GET /info): Retrieve the metadata and configuration of the connected Dify application.
Installation
Community Nodes UI (Recommended)
- Go to Settings > Community Nodes in your n8n instance.
- Click Install.
- Enter
n8n-nodes-difyand click Install.
Manual Installation
Run the following command in your n8n custom nodes directory (e.g., ~/.n8n/custom/):
npm install n8n-nodes-difyCredentials
To use the node, you need to configure the Dify API credentials in n8n:
- API Key (required): Your Dify API key (from Dify App -> API Access).
- Base URL (required):
- For Dify Cloud: Leave as the default
https://api.dify.ai/v1. - For Self-Hosted Dify: Change this to your local or private Dify instance URL (e.g.,
http://your-dify-server/v1).
- For Dify Cloud: Leave as the default
⚠️ Important Limitations & Usage Notes
Please read the following constraints carefully before using this node in a production environment:
- Streaming is NOT supported: Currently, all operations force
response_mode: "blocking". n8n's internal execution engine relies on batched JSON arrays, making Server-Sent Events (SSE) streaming inherently incompatible with the standard n8n node execution model. - AI Tool Usage is Experimental (v1): While the node compiles with
usableAsTool: trueto satisfy internal n8n linter requirements, using this package directly as an AI Tool within n8n's Advanced AI nodes is not officially supported in v1. n8n requires theN8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=trueenvironment variable to be set, and the integration remains unstable in the community ecosystem. Use it as a standard standard action node for the best stability.
Security & Provenance
This package is built and published exclusively via GitHub Actions with npm provenance. This ensures full transparency and auditability of the software supply chain. No local publishes or long-lived npm tokens are used in the deployment pipeline.
Development
# Install dependencies
npm install
# Build for production
npm run build
# Lint code
npm run lintPackage Information
- Repository: https://github.com/YushiYamamoto/n8n-nodes-dify
- npm: https://www.npmjs.com/package/n8n-nodes-dify
