Skip to main content

Use the SoMark Document Parser tool in a workflow

1

Add the SoMark Document Parser node

In the FastGPT application workflow, add the SoMark Document Parser node.Add the SoMark plugin in FastGPT
2

Activate the SoMark Document Parser tool

Click Activate and fill in the secret configuration:
  • Base URL: For SoMark API, use https://somark.ai/api/v1; for self-hosted deployment, enter the Base URL of your local deployment.
  • API Key: Required for SoMark API; not required for self-hosted deployment.
For SoMark Self-host, the plugin automatically appends the corresponding service path to Base URL. Enter the API prefix that reaches your self-hosted service, and do not append a specific service path yourself.
Activate the SoMark plugin in FastGPT
3

Build a minimal demo

Connect a file input node to the File parameter of SoMark Document Parser, then pass the parsed results to a downstream node. The plugin can parse multiple files at a time and works for uploaded PDFs, images, Word, PPT, or Excel files.Build a FastGPT workflow with SoMarkUpload files in debug or preview mode and run the workflow. The node returns one result for each input file in input order. Each item includes markdown, json, and error fields, and downstream nodes can reference them as needed.Run a FastGPT preview with SoMark

Parameters and outputs

Input parameters

Output variables

Result fields

Notes

  • FastGPT passes selected files as download URLs. The plugin downloads the file first, then sends it to the SoMark parsing service.
  • If the file URL contains a filename query parameter, the plugin uses it first to avoid losing suffixes such as .pdf and .docx from temporary download URLs.