Overview
The Yuque Plugin provides seamless integration with Yuque (语雀), a powerful knowledge management and collaboration platform. This plugin includes a comprehensive set of tools to manage documents, books, and repositories programmatically within workflows.
Tools Included:
- Create Document: Create a new document in a specified book.
- Delete Document: Delete an existing document by its ID.
- Get Repo Index Page: Retrieve the index page of a repository.
- Get Book's Table of Contents: Fetch the table of contents for a specific book.
- Fetch Document Content: Retrieve the content of a specific document.
- Get Doc Detail: Fetch detailed metadata about a document.
- Update Book's Table of Contents: Modify the table of contents for a book.
- Update Document: Update the content or metadata of an existing document.
Configure
-
Install the plugin.
-
Go to the Dify Marketplace.
-
Search for the Yuque Plugin.
-
Click "Install" to add the plugin to your workspace.
-
Obtain Yuque Team Token
-
Log in to your Yuque account at Yuque.
-
Navigate to your account settings and go to the Tokens Page.
-
Generate a new team token and copy it for use in Dify.
-
Authorize the Plugin
-
Add any of the Yuque tools (e.g., "Create Document" or "Fetch Document Content") to your workflow in Dify.
-
Click on the "To authorize" button in the tool configuration panel.
-
Enter your Yuque Team Token in the provided field.
-
Save your credentials to complete the authorization process.
-
Input Variables
Each tool requires specific input variables:
Create Document
- Repo ID (String, Required): The ID of the repository where you want to create the document.
- Title (String, Required): The title of the new document.
- Content (String, Required): The content of the document.
Delete Document
- Doc ID (String, Required): The ID of the document you want to delete.
Get Repo Index Page
- Repo ID (String, Required): The ID of the repository whose index page you want to retrieve.
Get Book's Table of Contents
- Book ID (String, Required): The ID of the book whose table of contents you want to fetch.
Fetch Document Content
- Doc ID (String, Required): The ID of the document whose content you want to retrieve.
Get Doc Detail
- Doc ID (String, Required): The ID of the document whose details you want to fetch.
Update Book's Table of Contents
- Book ID (String, Required): The ID of the book whose table of contents you want to update.
- TOC Data (JSON String, Required): The updated table of contents in JSON format.
Update Document
- Doc ID (String, Required): The ID of the document you want to update.
- Title (String, Optional): The new title for the document.
- Content (String, Optional): The updated content for the document.
Example Workflow
- Add the "Create Document" tool to your workflow in Dify.
- Input:
-
Run the tool to create a new document in your specified repository.
-
Use "Fetch Document Content" or "Update Document" tools as needed for further operations on this document.