Skip to main content

How to Use the AskTable Plugin

One, Using the Plugin in an Agent

1. Create a New Agent

Enter the Coze platform, click Create Agent, and fill in the basic information.

2. Add the Plugin to the Agent

On the Edit page of the agent, find the Plugin option, click the + button.

Add Plugin

3. Choose the Suitable Plugin

In the Add Plugin interface, search for "AskTable", find Query Excel or Database with One Sentence, and click Add.

Add Plugin

4. Add Variables (Used to Identify Excel Files or Databases in AskTable)

Go to the Variables option,

Add Variable

Create two variables:

  • at_auth: Used to store the authentication token (API-Key) for AskTable.
    • Click here to learn how to get the API-Key
    • The value of at_auth must start with Bearer, and the full format is: Bearer ASKER_XXXXXXXX
    • For security reasons, it is recommended to use a low-permission asker API-Key (starting with ASKER_) instead of an admin permission admin API-Key (starting with ADMIN_)
  • at_ds_id: Stores the ID of the Excel file or database (starting with ds_). How to Get datasource_id
Add Variable

5. Reference Variables in the Plugin

Go to the plugin's Parameter Configuration page,

Add Variable

Set Authorization to Reference at_auth, and set datasource_id to Reference at_ds_id.

Add Variable

6. Preview and Debug

On the Preview and Debug page, enter a query question, such as "How many points did Zhang San score," to verify whether the plugin returns the correct result.

Debug

Two, Using the Plugin in a Workflow or Dialogue Flow

Similar to using a plugin in an agent, just search for "AskTable" in Plugins, then select Query Excel or Database with One Sentence, and you can start using it.

Add Plugin

It should be noted that when configuring the plugin's Authorization, you need to use Bearer at the beginning, such as: Bearer ASKER_XXXXXXXX.

Configure Plugin