记忆未来 × AskTable
Free Trial

Query Your Database or Excel from Coze

AskTable Team
AskTable Team 2025-04-16

How to query your own database or Excel inside Coze (扣子)

What is Coze

Coze is a platform for building LLM-powered apps quickly—even without programming—and publishing them to channels or integrating via API/SDK.

https://www.coze.cn/open/docs/guides

“We have a MySQL database—how do I query it from Coze?”

“I want a plugin to query Excel—is there a guide?”

Here it is.

We walk through the AskTable plugin in bots, chat flows, and workflows so AI can query tables and files.


1. Use the AskTable plugin in a bot

Create a bot

Open Coze (coze.cn), create a bot, and fill in basic info.

Add a plugin

In the bot editor, open Plugins, then add a plugin.

Add plugin entry

Find AskTable

Search for AskTable and add:

One-sentence Excel or database query

Search AskTable plugin

Configure variables (required)

Under Variables, add:

  1. •

    at_auth – API key

    • •Format: Bearer ASKER_XXXXXX
    • •Prefer a least-privilege ASKER key.
  2. •

    at_ds_id – datasource ID (e.g. ds_XXXX).

Variables at_auth and at_ds_id

Map variables to plugin parameters

In the plugin’s Parameter:

  1. •Authorization → reference at_auth
  2. •datasource_id → reference at_ds_id

Plugin parameters

Preview and debug

Try:

“Who had the highest sales?”

If you get a sensible answer, the plugin is wired correctly.

Preview result


2. Chat flows and workflows

Add the same plugin and set:

  1. •Authorization → Bearer ASKER_XXXXXX
  2. •datasource_id → your datasource ID

Workflow plugin

Workflow parameters


Tips

  • •Supports Excel and databases in one sentence.
  • •No SQL required.
  • •Row-level security and role-aware access are supported.

Try the AskTable plugin and give your Coze bot serious data access.

Need help? Scan to join the community:

Community QR

Ready to make data analysis simpler?

No coding required. Ask questions in natural language and AI generates SQL queries and visualizations automatically.Start your free trial now and experience AI-powered data analysis with AskTable.

No credit card required
Get started in 2 minutes
Supports 33 databases