View as Markdown
Dify icon

Dify ACTION

List Workflow Logs

List past runs of a Dify Workflow app, newest first, with each run's status, token usage, step count, and timing. Only Workflow apps record these logs: a Chatflow, Chatbot, Agent, or Text Generator app's key returns an empty page, not an error. For runs started through the API, created_by_end_user.session_id is the User value sent with that run, which is useful for tracing a run back to its caller and for filtering with User. Runs started by a team member inside Dify have created_by_end_user: null and an account under created_by_account instead. Each entry is a run-level summary; node-by-node execution logs for finished runs aren't available. Example: Status failed, Limit 5 → { data: [{ id, created_by_role: "end_user", created_by_end_user: { id, session_id: "user-123", type: "service-api" }, workflow_run: { id, status: "failed", error, total_tokens, elapsed_time } }], page: 1, limit: 5, total: 12, has_more: true }. If has_more is true, call again with Page incremented by one. See the documentation
  • Action
  • Read only
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Dify account once, then configure and run List Workflow Logs from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "dify-list-workflow-logs",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    dify: { authProvisionId: "apn_xxxxxxx" },
    keyword: "Keyword",
    status: "Status",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

List Workflow Logs inputs
Property Type Description
keyword Keyword string
Keyword to search for in the logs, e.g. invoice.
Optional
status Status string
Only return runs that ended with this status.
Optional
user User string
Only return runs started with this User value (Dify calls it the end user's session ID, shown as created_by_end_user.session_id), e.g. user_workflow_123. Omit to see runs from all end users.
Optional
createdByAccount Created By Account string
Only return runs started by the Dify team member with this account email, e.g. name@example.com. Returns an invalid_param error if no account matches.
Optional
createdAtAfter Created After string
Only return runs created after this ISO 8601 timestamp, e.g. 2026-01-01T00:00:00Z.
Optional
createdAtBefore Created Before string
Only return runs created before this ISO 8601 timestamp, e.g. 2026-02-01T00:00:00Z.
Optional
page Page integer
Page number, starting at 1. Keep incrementing while the response's has_more is true. Defaults to 1.
Optional
limit Limit integer
Number of results to return per page, between 1 and 100. Defaults to 20.
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
dify-list-workflow-logs
Version
0.0.1
App
Dify
Authentication
API key
Read-only
Yes
Destructive
No
Open world
Yes