logo
search
Others

How to Use Power Automate and a Teams Chatbot to Search an Excel File

Aamir Naveed AkramAamir Naveed Akram Oct 22, 2026 868 views

Question details

The user wants to set up a Microsoft Teams chatbot that collects input, like an order number, and passes it to a Power Automate flow to search an Excel file and return a specific status.

How to Use Power Automate and a Teams Chatbot to Search an Excel File
Product
Microsoft Excel, Power Automate, Microsoft Teams
Device & OS
not provided
Scenario
Automating data retrieval from a cloud-stored Excel spreadsheet using a Teams chatbot and Power Automate flow.
Observed behavior
The user needs to successfully query an Excel table and return a matching status to the chatbot seamlessly and securely without making business data public.
Before you start

Ensure your Excel data is formatted as a formal Table with clear, unique column headers (e.g., 'Order Number'), and that the file is saved in a secure SharePoint or OneDrive for Business folder.

Solution 1Recommended

Build a Power Automate Flow with Power Virtual Agents and Excel Online

Configure a flow that is triggered by a chatbot, searches your Excel table for the requested variable, and returns the result back to the user.

To allow your Teams chatbot to read Excel data, the file must be stored in a supported cloud location like SharePoint or OneDrive for Business. You should never place sensitive business data on a publicly accessible, unsecured website just to bypass authentication.

1
Format and store your Excel data

Open your spreadsheet, format your data range as a Table (Insert > Table), ensure the order-number column has a unique header, and save the file to your organization's OneDrive for Business or SharePoint.

2
Create the chatbot trigger

Open Power Automate, create a new flow, and select Power Virtual Agents (or Copilot Studio) as the trigger. Add an input variable to capture the 'Order Number' from the user's chat message.

3
Add the Excel Online action

Click 'New Step', search for 'Excel Online (Business)', and select the 'List rows present in a table' action.

4
Configure the table query

Select the Location, Document Library, File, and Table from the dropdowns. In the 'Filter Query' field, enter an OData filter (e.g., OrderNumber eq 'Variable') using the dynamic content from your chatbot trigger.

5
Return the status to the chatbot

Add a final step 'Return value(s) to Power Virtual Agents'. Map the matching status retrieved from the Excel row to an output variable so the chatbot can display it to the user in Teams.

Build a Power Automate Flow with Power Virtual Agents and Excel Online
Security Best Practices: Always keep the file in a secured OneDrive for Business or SharePoint location with proper access permissions. Do not use public links for internal business data.
Free Microsoft Office alternative

Prepare Your Automation Datasets Easily with WPS Office

While integrating Power Automate and Teams relies on the Microsoft ecosystem, you can effortlessly manage, format, and prepare your Excel datasets for automation using WPS Office. It provides a lightweight, highly compatible, and free alternative to Microsoft Office for everyday spreadsheet tasks.

  1. 1. Download and Install: Get WPS Office for free from the official website and install it on your PC or Mac.
  2. 2. Open Your Spreadsheet: Launch WPS Spreadsheets and open your existing .xlsx order tracking file.
  3. 3. Format as Table: Select your data range, navigate to the Insert tab, and click 'Table' to structure your data for Power Automate compatibility, then save.
100% compatible with Microsoft Excel (.xlsx) formats required by Power Automate.Easily format your raw data into structured tables to prepare for cloud automation.Familiar, intuitive user interface for seamless migration without a learning curve.Free to use for viewing, editing, and managing all your office documents.
microsoft office alternative - wps office

Frequently Asked Questions

Why isn't Power Automate finding my Excel data?

Power Automate requires the data in your Excel file to be formally formatted as a Table. Simply having data in rows and columns is not enough. Select your data range in Excel, press Ctrl+T (or Insert > Table), and assign a name to the table before connecting it to your flow.

Can I use a personal OneDrive account for the Excel flow?

For Teams chatbot and business-level Power Automate integrations, it is highly recommended to use OneDrive for Business or SharePoint. Personal OneDrive accounts may cause authentication issues or lack the required organizational sharing permissions.

How do I filter for the exact order number in Power Automate?

In the 'List rows present in a table' action, utilize the 'Filter Query' field under advanced options. You must use OData syntax, such as `OrderNumberColumn eq 'YourChatbotVariable'`, to return only the specific row matching the user's input.