app icon
WeCom Spreadsheet
0.0.1

Manage WeCom online spreadsheet - create, add, get, update rows

vip2193/wecondifyplugin331 installs

WeCondifyPlugin

Author: neo
Version: 0.0.1
Type: tool

Description

WeChat Work Smart Sheet plugin for Dify, supporting create, add, and update operations.

Features

  • Create Sheet (create_sheet): Create new smart sheets and return docid
  • Query Sheets (get_sheets): Query all sub-sheet information in smart sheets
  • Add Records (add_rows): Add one or multiple records to smart sheets
  • Get Sheet Info (get_rows): Get sheet properties (worksheet name, row count, column count)
  • Update Records (update_rows): Update specified records in smart sheets
  • 🔒 Secure Credential Management: Corporate ID and Secret encrypted storage in Provider
  • 🔄 Automatic Token Management: Auto-acquire and refresh access_token

Quick Start

1. Configure in WeChat Work Admin Console

Create Custom Application:

  1. Login to WeChat Work Admin Console: https://work.weixin.qq.com/
  2. Go to "Application Management" → "Applications" → "Create Application"
  3. Record AgentId and Secret

Enable API Permissions:

  1. Enter application details page
  2. Configure "Trusted IP" if needed
  3. Go to "Collaboration" → "Documents" → "API"
  4. Enable "Documents/Smart Sheets" related interface permissions

Get Corporate ID:

  1. Go to "My Enterprise"
  2. Copy Corporate ID (CorpID)

2. Install Plugin in Dify

After installing the plugin, configure Provider credentials:

  • Corporate ID: Get from "My Enterprise"
  • Application Secret: Get from "Application Management"

3. Get Sheet ID and Sub-sheet ID

Open WeChat Work Smart Sheet:

  • docid: Get from URL
  • sheet_id: Sub-sheet ID, can be obtained via API or viewed in the sheet

Tool Documentation

0. Create Sheet (create_sheet)

Create a new smart sheet and return docid for subsequent operations.

Parameters:

  • : Sheet name
  • : Admin user IDs, comma-separated (optional)

Example:

1. Add Records (add_rows)

Add new records to smart sheets.

Parameters:

  • : Sheet document ID (docid)
  • : Sub-sheet ID
  • : JSON array format, using field names as keys

Example:

1.5. Query Sheets (get_sheets)

Query all sub-sheet information in smart sheets.

Parameters:

  • : Sheet document ID (docid)
  • : Specify sub-sheet ID (optional)
  • : Include dashboards and description pages (optional, default false)

Example:

Response:

2. Get Sheet Info (get_rows)

Get smart sheet property information.

Parameters:

  • : Sheet document ID (docid)

Example:

3. Update Records (update_rows)

Update specified records in smart sheets.

Parameters:

  • : Sheet document ID (docid)
  • : Sub-sheet ID
  • : Record ID to update
  • : JSON object format, using field names as keys

Example:

Security Features

✓ Sensitive credentials (Corporate ID, Secret) encrypted storage in Provider
✓ No sensitive information exposed in workflows
✓ Automatic access_token management, no manual refresh needed
✓ Complies with enterprise security best practices

Local Testing

Permission Configuration Checklist

  • Created WeChat Work custom application
  • Obtained Corporate ID and Application Secret
  • Enabled "Documents/Smart Sheets" API permissions in application
  • Configured trusted IP if needed
  • Configured Provider credentials in Dify

API Reference

CATEGORY
Tool
VERSION
0.0.1
vip2193·11/21/2025 02:08 PM
REQUIREMENTS
Tool invocation
Maximum memory
256MB