Build & sell

Dify Chatflow vs. Workflow: Key Differences and How to Build Each

・ Employee Store Operations

Summary

Dify Chatflow and Workflow are built on the same canvas with the same nodes, but they run differently. A Chatflow runs on every message in a conversation, while a Workflow finishes its job in a single run. This article explains the differences, how to choose, and how to build and publish each, based on the official documentation checked in October 2026.

The difference between Dify Chatflow and Workflow lies in how they interact with users. Both build a process by connecting nodes. The official documentation recommends choosing one of these two when you create a new app.

The content of this article was checked against the official Dify documentation and pricing page on October 2, 2026. Screen names are given as they appear in the English interface. Check the sources at the end for the latest details before you use it.

The differences at a glance

Chatflow vs. Workflow

Chatflow

  • The flow runs on every message
  • Starts from User Input
  • Replies through an Answer node (required)
  • Can hold per-conversation variables and memory

Workflow

  • Runs from start to finish in 1 pass
  • Starts from User Input or a trigger
  • Returns results through an Output node (optional)
  • Supports batch runs and use as a tool

Both sit on the same canvas and node system. Most of the work is placing nodes, connecting them and configuring them. You write code only when the process needs it.

Chatflow: apps that hold a conversation

A Dify Chatflow is a Workflow with a conversation layer added. Users send messages in a chat window. Each message runs the flow you built, and then a reply comes back.

It suits apps that talk with users while running a fixed process in the background. One example is a support desk that classifies a question, searches documents and then answers.

Features only Chatflow has

  • Conversation variables: keep values across turns within one conversation. Update them with the Variable Assigner node
  • Memory: let the LLM node remember earlier exchanges
  • Mid-process output: place several Answer nodes to return text, images or files step by step while the process runs
  • Conversation info: use the conversation ID (sys.conversation_id) and the turn count (sys.dialogue_count)

The Answer node streams its content in the order of the variables written in it, not in the order upstream nodes run. Later content does not appear until the variables written earlier are ready.

How to build a Chatflow

In Studio, choose Create from Blank, then Chatflow. The simple chatbot in the official tutorial looks like this.

The simple chatbot from the official tutorial
  1. 1User InputReceives the user's message
  2. 2LLMReads the question and drafts an answer in a set format
  3. 3CodeUses part of the answer to fetch extra information
  4. 4AnswerReturns the question, answer and extra information together

Turning on Structured Output in the LLM node returns the answer as a set of defined fields. Downstream nodes can use those fields as variables.

For a support desk that answers from documents, see the official tutorial Customer Service Bot With Knowledge Base. A Question Classifier sorts questions, and only questions about Dify trigger a knowledge search before the LLM writes the answer. Unrelated questions get a fixed reply from an Answer node.

Workflow: apps that finish in one run

A Dify Workflow takes an input, runs the flow once from start to finish and returns the result. It suits report generation, data processing and batch jobs. It holds no conversation state, and every call is independent.

Two ways to start

  • User Input: runs when a user or an API call starts it. Only this start type can be published as a web app, an MCP server, an API, or a tool for other apps
  • Trigger: runs automatically. There are three kinds: Schedule runs at set times, Integration runs on events in external services, and Webhook runs on HTTP requests

On the Sandbox plan, one Workflow can have at most 2 triggers. Trigger-started runs also have a monthly cap. The pricing page lists 3,000 runs for Sandbox and 20,000 runs per month for Professional.

How to build a Workflow

In Studio, choose Create from Blank, then Workflow, and pick the start node. To return results, add an Output node. The Output node is optional, but a flow without one returns nothing to the caller. The variable names you set in Output become the keys of the API response.

When you publish it as a web app, the input fields are generated from the User Input fields. On the Run Batch tab, you can download a CSV template, write one input per row and run them all at once. Results can be exported as CSV.

The official 30-Minute Quick Start is a good Workflow sample. It takes a draft and target platforms and writes a post for each social network. User Input collects the inputs, Parameter Extractor turns the platforms into a list, and IF/ELSE routes input errors before the text is generated.

Choose by what you want to build

Choose by what you want to build

How will users interact with it?

It answers in an ongoing conversation and should use earlier messagesChatflowUse conversation variables and memory
Users send 1 input and receive a resultWorkflowThe web app also supports batch runs
It should run automatically at set times or on external eventsWorkflowOnly Workflows have triggers
Other apps or agents should call it as a toolWorkflowA Chatflow cannot become a tool

If you are unsure, ask whether the user will send a second message. If not, a Workflow is easier to handle. For building apps that hand tasks to an agent, see How to build an agent in Dify.

Common node combinations

The nodes are almost the same in both app types. Here are combinations from the official tutorials and documentation.

  • Answer from documents: search with Knowledge Retrieval, pass the results to the LLM as context, and reply with Answer
  • Route by question: sort questions with Question Classifier and reply directly with Answer when no documents are needed
  • Extract values from text: use Parameter Extractor to turn unstructured text into structured data
  • Process a list item by item: use Iteration to run the same steps on each element of an array
  • Work with external systems: call APIs and services with HTTP Request or Tool
  • Format the output: use Template to shape the output with Jinja2 syntax

The Code node accepts Python or JavaScript. If-Else splits the flow by condition, and Variable Aggregator merges split branches back into one.

Publishing and calling through the API

For both app types, clicking Publish releases the latest configuration. The web app URL appears on the Access Point tab. Publishing replaces the running app with the current configuration.

Differences after publishing (checked October 2026)
PointChatflowWorkflow
Web appChat screen that keeps conversation historyInput and result screen. Supports batch runs via CSV
API mode nameadvanced-chatworkflow
Main APISend Chat MessageRun Workflow
StateEarlier turns stay as contextEach call is independent

You create API keys inside each app, and each key works only for that app. The base URL for the Dify Cloud API is https://api.dify.ai/v1. Always use the key on the server side. If you put it in front-end code, it can be extracted and misused.

Both APIs let you choose streaming, which returns results bit by bit, or a blocking call that returns everything at the end. For batch runs in a Workflow web app, save the CSV in UTF-8.

You can export an app as a YAML file called DSL and import it into another workspace. See How to export a Dify DSL for the steps.

List your app on Employee Store

Employee Store is a marketplace where companies adopt AI agents built by developers, through a one-time purchase or a monthly plan. Any format is accepted, including Dify Workflows. There is no listing fee and no upfront cost. The commission is 20% of the deal amount and applies only when a deal closes. See the seller guide for details.

FAQ

Can I use a Chatflow as a tool in a Workflow?
No. Only Workflows that start from User Input can become tools. Build any process you want other apps or agents to call as a Workflow.
Can a Chatflow use triggers?
No. A Chatflow always starts from a user message. To run something at set times or on external events, use a trigger in a Workflow.
Can the web app and the API continue the same conversation?
According to the official documentation, the API does not share conversations created in the web app. Even with the same user ID, the API and the web app keep separate conversation histories.

About the author

Employee Store OperationsThe operations team behind Employee Store, a marketplace for AI agents. We check tool features and pricing against official sources and list them at the end of each article. If you spot an error, please let us know via the contact form.

Sources

Ask AI

Ask AI if it fits your work.

Use your usual AI to explore what Employee Store offers and what to check before buying.

Opens an external AI service. Confirm pricing and deliverables on the listing page.