Skip to main content

Install and Configure the Plugin

1

Install the plugin

Log in to your Dify platform, navigate to ToolsPlugin Marketplace, search for Somark, and add the plugin.
2

Configure plugin settings

After installation, open the plugin configuration page:
  • API Base URL: Defaults to https://somark.tech/api/v1. No changes needed in most cases.
  • API Key: Enter your SoMark API Key.
3

Save

Click Save — the plugin is now ready to use in workflows.

Using SoMark in a Workflow

1

Configure the Start node

In the workflow Start node, add an input variable with type File. This variable will receive the user-uploaded document and be passed to the SoMark tool node downstream.
2

Add the SoMark tool node

In the Dify workflow editor, click + to add a new node, choose Tool, then find and add the Somark > Somark Document Parsing node.Add SoMark tool node in Dify
3

Configure input variables

Click the variable icon {x} in the input field and select the file variable defined in your Start node (e.g. sys.files). The API Key is handled automatically by the plugin configuration — no need to enter it in the node.Configure input variable in Dify
4

Reference outputs in downstream nodes

Once the node executes, its output variables are available to all downstream nodes (LLM, text splitter, code node, etc.). Click {x} in any downstream node’s input field to select the SoMark node’s output variables.

Parameters and Outputs

Input Parameters

ParameterTypeRequiredDescription
filefileFile to parse. Supports PDF, PNG, JPG, JPEG, BMP, TIFF, JP2, GIF, HEIC, HEIF, WEBP, DOC, DOCX, PPT, PPTX, and more. Max 200MB per file, max 300 pages.

Output Variables

VariableDescription
markdownParsed document content in Markdown format, preserving the original layout including headings, tables, lists, equations, and images
jsonFull raw JSON response from the SoMark API, containing detailed structured data for each document element (type, content, bounding box, page number, etc.). Ideal for advanced processing in a code node