Playbooks · Coding tasks
Dify 1.20.0 adds messaging approvals and agent tokens
Written November 23, 2026
Dify 1.20.0 brings human approvals into Slack, Teams and email, adds personal access tokens for agents, scans knowledge uploads, and keeps Langfuse traces live.
A workflow that paused for a human decision used to bring the approver back to Dify. Scripts and agents calling the Dify OpenAPI had to work through a Console session, and files uploaded to a knowledge base were indexed without a malware check. Dify 1.20.0 changes those three paths, and updates tracing after Langfuse Cloud retired its legacy ingestion endpoint on November 16, 2026.
Approvals move into email and messaging tools
New HITL is enabled by default, with NEXT_PUBLIC_ENABLE_HITL_IM=true. It delivers workflow review requests by email and by an IM platform: Slack, Feishu/Lark, Microsoft Teams, DingTalk, or WeCom. The setup uses shared channels, notification templates, and verified approval forms, so a request can carry workflow context in its subject and body.
Recipients are managed in Contacts, where IM directories can be synced and approvers picked from a shared list. A workflow can also address its initiator, or use one-time and dynamic email recipients. Recipients are configured once and reused across Human Input nodes, rather than being set up again for each node.
An approver can act in an IM card or open a standalone form. Identity is checked with a Dify login or with email verification.
Existing workflows are not moved automatically. Legacy Human Input nodes stay as they are until you use the opt-in migration. On the deployment side, TRIGGER_URL must be set to the public HTTPS API origin, because it is used to generate channel callback URLs. Only WEBHOOK transport is available for IM events, so the API has to be reachable from outside. A workflow can wait at most seven days for human input: HUMAN_INPUT_GLOBAL_TIMEOUT_SECONDS is 604800.
Personal access tokens for scripts and agents
A personal access token lets a script, a CI job, or a personal agent call the Dify OpenAPI on your behalf, without sharing your Console session. You create a token from the Account page and scope it to specific workspaces and resources. You can set an optional expiration date, update its scope later, or revoke it when it is no longer needed.
The OpenAPI endpoints are now on by default to match. OPENAPI_ENABLED is true, where it was false before, so tokens and difyctl work without an extra setting. Set it to false if you want those endpoints off.
Traces to OpenTelemetry and Langfuse
The new OpenTelemetry provider exports app and Agent traces to any compatible collector. Workflow steps, model calls, and tool activity can then be followed together in the observability platform you already use, instead of through a vendor-specific Dify integration.
Langfuse tracing now supports Langfuse v4 and the current Langfuse Cloud ingestion service, and existing Langfuse configurations continue to work. That change matters on a date: Langfuse Cloud retired its legacy ingestion endpoint on November 16, 2026, and self-hosted Langfuse v4 rejects events sent to that endpoint. Upgrading to 1.20.0 is what keeps traces flowing to those deployments.
Knowledge uploads are scanned before indexing
When FILE_SCAN_ENABLED=true, uploaded knowledge files are scanned for malware before they are extracted or indexed. Scanning is off by default. Workspace owners and admins configure scanners once under Integrations → File Security Scan. The supported scanners are Cloudmersive, Scanii, OPSWAT MetaDefender Cloud, and a Custom Endpoint.
Each knowledge base also has to opt in, and each one picks a scanner and a fallback behavior for when scanning is unavailable or a file cannot be scanned. Both of those cases default to blocking the file. Scanning covers classic knowledge bases, RAG Pipeline local-file sources, and Agent Knowledge Base uploads. When a file is blocked, the reason appears in the document list.
Agent activity in Chatflow, and GitHub sources from a tree
When a Chatflow delegates to an Agent v2 node, users can now see the tools it invokes as it works, in both previews and published chats. Expand a tool card to see what it requested and returned. The feature needs NEXT_PUBLIC_ENABLE_AGENT_V2_IN_CHATFLOW=true.
GitHub content for a knowledge base is now picked from an expandable tree of repositories, directories, issues, and pull requests, so you can select the exact pages to import.
Fixes for blocking workflows, plugin tools, and file previews
Blocking workflows now release database connections before execution, and preparation failures return at once, which addresses connection-pool exhaustion and requests that hung until timeout. Parallel calls to the same plugin tool are preserved. Inline SVG previews are sandboxed.
What to do
- If a workflow pauses for approval, set up a shared channel and Contacts, then send a test notification before relying on it.
- Before enabling New HITL on a self-hosted deployment, set TRIGGER_URL to the public HTTPS API origin and make sure the webhook callback route reaches the API.
- Migrate legacy Human Input nodes only when that workflow is ready, since the migration is opt-in.
- Create personal access tokens from the Account page with the narrowest workspace and resource scope that works, and set an expiration where you can.
- If you send traces to Langfuse Cloud or a self-hosted Langfuse v4, upgrade so traces keep flowing after the legacy endpoint retirement.
- To scan knowledge uploads, set FILE_SCAN_ENABLED=true, configure a scanner under Integrations → File Security Scan, then opt each knowledge base in.
- Set NEXT_PUBLIC_ENABLE_AGENT_V2_IN_CHATFLOW=true if you want live Agent tool activity shown in Chatflow.
Related playbooks
- Claude Code 2.1.330 adds easel charts and org sign-in
- Claude Code 2.1.332 adds MCP skills and a shell hook
- Check whether your Claude Code hooks are adding tokens to every prompt or cutting them
- Codex 0.170 adds realtime voice to the TUI
Sources
- Dify 1.20.0 release notes — GitHub — The New HITL channels, Contacts, approval forms and deployment settings, the personal access tokens and OPENAPI_ENABLED default, the OpenTelemetry export and Langfuse v4 support with the November 16, 2026 endpoint retirement, the knowledge upload scanning and its scanners, the Chatflow Agent v2 tool activity, the GitHub tree picker, and the blocking workflow, plugin tool, and SVG preview fixes.
Back to: Coding playbooks hub