Discourse 워크플로

:discourse2: Summary Discourse Workflows lets admins create advanced automations through a visual builder to automate almost anything in your community.
:open_book: Install Guide This plugin is bundled with Discourse core. There is no need to install the plugin separately.

Workflows is a visual automation builder that lets admins create advanced, multi-step automations using a drag-and-drop canvas — connecting triggers, conditions, actions, and flow-control nodes to automate almost anything on your Discourse site.

:discourse: Discourse Workflows is available on the Business or Enterprise plans.

Key concepts

If you’re familiar with other automation tooling, you will likely recognize most of the vocabulary used in Workflows:

  • Workflow: A saved automation made up of connected nodes.
  • Node: A single step in a workflow: triggers, conditions, actions, and flow-control / utilities.
  • Trigger: The starting point of a workflow. A trigger can be manual or initiated by a specific event — topic being created, a schedule firing, or an incoming webhook.
  • Condition: A routing node that evaluates a rule and splits the flow into branches. For example, an If node routes the flow based on a true or false evaluation.
  • Action: A node that does something specific — creating a post, granting a badge, calling an external API, etc.
  • Item: The data that flows between nodes. Items are JSON objects that you can inspect in execution logs and reference using expressions.
  • Expression: A dynamic value written as {{ ... }} that resolves at runtime and is used to reference data from earlier nodes, workflow variables, or site settings.

Creating a workflow

To build a workflow:

  1. Go to Admin > Plugins > Workflows and click New workflow.

  1. Name your workflow.
  2. Click Add first step and choose your trigger.

  1. Use the + button to add additional nodes.

  1. Double-click on a node to configure it. In the configuration panel, details about inputs for the node will be shown on the left side and details about the outputs of the node will be shown on the right side of the screen. You may need to run the workflow once before seeing all the various details.

  1. When you’re ready to go live, click Publish.

:light_bulb: Tips:

  • Use sticky notes, located in the three-dot menu in the top right of the builder, to document what your workflow does. Stickies don’t have any effect on the workflow but make templates and shared workflows easier to understand.
  • Use the log node during development to send debug values into the execution log without impacting the workflow’s behavior.
  • You can export and import workflows as JSON to share them with teammates or recreate workflows from other sites.

Expressions and dynamic data

Fields that accept expressions show a {/} button in the editor. Click it to browse available data from the trigger and earlier nodes and insert a reference.

Common expressions

Expression What it returns
{{ $json.topic.title }} The title of the topic from the current item
{{ $json.post.url }} The URL of the post from the current item
{{ $json.user.username }} The username of the user associated with the current item
{{ $vars.my_variable }} The value of a workflow variable named my_variable
{{ $site_settings.title }} Your site’s title
{{ $execution.id }} The unique ID of the current execution
{{ $('Node Name').item.json.property }} Output from a specific upstream node, referenced by its canvas name

Static and dynamic values

Fields that start with = are treated as expressions. Fields without a leading = are treated as plain text. The expression picker handles this for you automatically.

Managing workflows

There are a number of features that help you manage your existing workflows.

Executions

Every time a workflow runs, Discourse records an execution. Go to Workflows → Executions to see the history.

Each execution shows the date and time when it was completed and its status:

  • Completed: Ran to completion without error.
  • Error: Failed at a specific node; click into the execution to see the error and the data that caused it.
  • Running: Currently processing.
  • Waiting: Paused due to a Wait node; waiting for a response in a form, modal, chat approval; or a Call Workflow node waiting for a sub-workflow to complete.
  • Rate limited: The workflow was skipped due to rate limiting.
  • Skipped: The trigger fired but the workflow was unpublished.

You can click the Show button for a more in depth look at the workflow’s execution. This shows each step of the workflow, which you can expand to view the exact details, and the duration of that step.

At the bottom of the page, you can see the overall duration of the workflow. You can also Export the log if needed for sharing or troubleshooting purposes.

Settings

On the Workflows → Settings tab, you can:

  • Configure an error workflow that should trigger if there are any failures when this workflow runs. If the workflow has an error trigger, it will handle errors as defined by that trigger.
  • Set the timezone for schedule triggers. The workflow will default to using the site timezone if this is unset.
  • Delete the workflow. :warning: This is permanent so you should consider exporting your workflow (accessible in the three-dot menu on the top right corner of the workflow builder) before proceeding.

Versions

Every time you make an update to the workflow, we’ll save the previous version(s). This makes it easy to Revert changes that didn’t work as you expected.

Variables

Variables are key-value pairs scoped to a single workflow. Define them in the workflow’s Variables panel and reference them anywhere with {{ $vars.key_name }}. Use variables to store configuration values (like a category ID or a recipient username) that you want to be able to change without editing the workflow graph.

Credentials

Some nodes — like HTTP request or AI Agent — need to authenticate with external services. Store API keys and secrets in Workflows → Credentials rather than pasting them directly into node fields. Credentials are encrypted at rest and can be reused across workflows.

Supported credential types:

  • Basic Auth (username + password)
  • Bearer token
  • Header auth (custom header name and value)

Data tables

Data tables are persistent, structured tables internal to the Workflows plugin. Use the Data table node to read from or write to them. They support string, number, boolean, and date column types.

Data tables are useful for:

  • Deduplication — record which users or topics a workflow has already processed
  • State — track whether a topic is in a particular stage of a process
  • Lookups — store mappings (like topic ID → assigned staff member) that your workflows can query

Executions

You can view all the executions of all workflows from the Executions tab. The format and function is very similar to the workflow-specific executions, but shows across all workflows for easier monitoring.

Templates

When you create a new workflow, you can start from a template instead of a blank canvas. Templates are pre-built workflows for common use cases — they’re annotated with sticky notes explaining how they work and are a good way to learn the system.

:megaphone: Interested in seeing more templates? We will work to expand the library of available templates over time, but please let us know if there’s a template that you’d like to see here to make your use of Workflows easier.

You can also export any workflow as a JSON file to share it with others or use it as your own starting point.

22개의 좋아요

Hi, when trying to activate this plugin I have the following error message: You do not have permission to change the hidden settings : discourse_workflows_enabled

2개의 좋아요

At the moment it must be enabled from /admin/config/upcoming-changes, not admin/plugins

3개의 좋아요

Hi, if I understand the purpose of these Workflows correctly, one template example I wish is to add an admin button to topics that would immediately bump the topic. Feasible ? :grinning_face:

1개의 좋아요

안녕하세요!

"Build with AI"에서 특정 LLM을 사용하도록 어떻게 보장할 수 있을까요?
시스템에서 기본 LLM로 Google Gemini를 사용할 때 다음과 같은 오류가 발생합니다: Invalid JSON payload received. Unknown name “additionalProperties” at ‘tools[0].function_declarations[5].parameters’: Cannot find field

감사합니다!

1개의 좋아요

어떤 Gemini 모델을 사용 중인가요? 변경하려면 워크플로 에이전트를 선택하고那里的 기본 LLM을 교체하면 됩니다.

1개의 좋아요

샘! Gemini 3 Flash입니다.

워크플로 설정을 찾아봤는데, 역시 Gemini Flash 3로 설정되어 있더라고요. GPT Nano 5로 변경해 봤는데도 같은 오류가 발생합니다.

모든 사용자의 기본값을 GPT Nano 5로 변경하고 개별 워크플로 설정도 확인해 봤습니다. 거기서도 GPT Nano 5로 덮어쓰도록 설정해 봤는데도,

여전히 해결되지 않습니다. :frowning:

1개의 좋아요

Luna나 Terra, 또는 3.5 flash나 sonnet에 접근할 수 있을까요?

워크플로 AI 에이전트는 도구가 꽤 많아서 최신 LLM이 필요할 가능성이 큽니다.

1개의 좋아요

Flash Lite가 작동하는 줄 알았는데, 실제로는 작동하지 않았습니다. GPT Nano 5는 확실히 작동했습니다. 이는 WordPress에서도 알려진 문제인 것 같습니다. 참고 링크를 아래에 공유합니다. 우리가 해야 할 일은 Gemini 제공자를 사용할 때마다 JSON 응답 스키마에서 additionalProperties 항목을 제거하는 것입니다: Remove `additionalProperties` from the JSON response schema - Pull Request #18 - WordPress/ai-provider-for-google - GitHub

야, interactions API로 마이그레이션을 진행 중인데, 이렇게 하면 Gemini 모델로 훨씬 안정적인 브리지를 제공할 수 있을 것 같아. 다음 주에 가능할 거야.

2개의 좋아요

대단하고 빠른 답변 감사합니다! 더 많은 내용을 찾았지만, 이미 의도를 파악하셨을 거라고 생각합니다. :wink:

이것은 Google의 Gemini가 직접 작성한 설명입니다. 이해가 되시나요? 저도 전부 이해는 못하지만, 그 프로퍼티 때문에 막힌다는 것만은 압니다. ㅋㅋ

요약: Google이 스키마 처리를 위해 완전히 다른 두 가지 엔진을 사용하기 때문에 오류가 지속됩니다. Gemini는 구조화된 출력(Structured Outputs)(response_json_schema)의 경우 표준 JSON 스키마를 지원하지만, 함수 호출/도구 실행(Function Calling / Tool Execution) 엔진은 여전히 Google의 엄격한 OpenAPI 3.0 Protobuf 파서를 사용하며, 이는 additionalProperties를 거부하거나 처리하지 못합니다.

1. 도구 호출 vs. 구조화된 출력 (엔진 분기)

Google의 Gemini API는 두 가지 별도의 위치에서 스키마를 검증합니다:

  • 구조화된 출력(response_json_schema): 모델의 최종 응답 형식을 지정하는 용도로 설계되었습니다. 표준 JSON 스키마 파싱을 사용하며 additionalProperties를 깔끔하게 처리합니다.

  • 도구/함수 호출(tools[0].function_declarations): 사이트 도구(Discourse AI 검색, 페르소나 액션, 웹 브라우징 등)를 모델에 전달하는 용도로 설계되었습니다. 이 엔드포인트는 스키마를 Google의 내부 google.ai.generativelanguage.v1beta.Schema Protobuf 객체로 파싱합니다.

도구 엔드포인트가 매개변수를 레거시 OpenAPI 3.0 하위 집합으로 매핑하기 때문에, 함수 선언에 additionalProperties를 보내면 API 파서가 400 Bad Request 또는 MALFORMED_FUNCTION_CALL을 반환합니다.

GitHub

2. 왜 Discourse와 같은 프레임워크가 이를 주입하는가

오케스트레이션 프레임워크(Discourse AI, Model Context Protocol/MCP, LangChain, Pydantic, Zod)는 사용자 정의 도구를 위해 JSON 스키마를 자동으로 생성합니다:

  1. 엄격한 강제 기본값: 생성기는 엄격한 매개변수 타입을 강제하기 위해 자동으로 "additionalProperties": false를 추가합니다.

  2. 동적 맵/딕셔너리: 도구 매개변수가 키-값 해시/딕셔너리(예: dict[str, Any] 또는 Ruby Hash)를 사용하는 경우, 스키마 생성기는 "additionalProperties": { "type": "string" }를 출력합니다.

  3. 비정제된 페이로드: Discourse가 이러한 자동 생성된 도구 스키마를 Google의 함수 선언 엔드포인트로 전송할 때, Gemini의 Protobuf 파서는 additionalProperties를 무효하거나 알려지지 않은 필드로 표시합니다.

3. Discourse에서 해결하는 방법

Discourse AI 도구 호출에서 이 오류를 보고 계신다면:

  • 동적 해시/딕트 매개변수 피하기: 열려 있는 객체를 사용하는 대신, 사용자 정의 도구 매개변수가 properties 아래에 예상되는 모든 키를 명시적으로 정의하도록 하세요.

  • 동적 데이터를 문자열로 직렬화: 도구가 임의의 키-값 쌍을 받아야 하는 경우, 매개변수를 STRING으로 정의하고 도구가 직렬화된 JSON 문자열을 받도록 지시하세요.

  • 사용자 정의 도구에서 additionalProperties 필터링: /admin/plugins/discourse-ai/ai-tools 아래에 사용자 정의 AI 도구를 정의한 경우, 매개변수 JSON 스키마를 편집하여 모든 "additionalProperties" 블록을 제거하세요.

방금 인터랙션 API 지원을 추가하는 PR을 만들었습니다. 테스트 환경이 있으시면 더 많은 테스트를 진행해 주시면 좋겠습니다.

워크플로우를 통해 외부 사용자 ID를 가져올 수 있도록 할 계획이 있나요? 현재 사용자가 계속 진행하기 전에 아이덴티티 제공자 시스템에서 해당 사용자의 일부 정보를 확인하는 양식을 만들고 싶은데, 제가 확인한 바로는 ‘Get User’ 노드에서 external_id 필드가 출력되지 않습니다.

피드백 감사합니다. 이제 해결될 것 같습니다: FIX: supports optional data for workflow user node (#42400) · discourse/discourse@4d0c688 · GitHub

3개의 좋아요

user_id를 username으로 변환하는 방법이 있을까요? 특정 토픽의 생성자에게 개인 메시지를 보내는 사용 사례를 조사하고 있습니다. 하지만 topic 객체에서는 user_id만 가져올 수 있고, 개인 메시지 전송 동작에는 username이 필요합니다.

혹시 topic_id를 사용해 첫 번째 게시물을 가져오는 방법이 있다면 그것도 작동할 것 같습니다. 게시물에는 username 필드가 있으니까요.

1개의 좋아요

@thgl 네, data-explorer 노드가 있으므로 모든 종류의 정보를 가져오기 위한 다양한 쿼리가 가능합니다(이 경우 user_id를 하드코딩했지만, 개념을 이해하셨을 것입니다):

workflow-nodes-2026-08-18.json (2.1 KB)

2개의 좋아요

@patrickemin 이미 보셨을 수도 있지만, 이 사용 사례에 필요한 모든 빌딩 블록을 추가해 두었습니다. 도움이 필요하시면 말씀해 주세요.

1개의 좋아요

아, 정말 유용하네요. 감사합니다!

글쎄요, 해당 사용 사례에 대해 관리자 주제 버튼에 할당할 작업을 찾지 못했습니다: