web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Generate KQL from natu...
Copilot Studio
Unanswered

Generate KQL from natural language and run it in a Topic via Kusto action

(2) ShareShare
ReportReport
Posted on by

Summary

 

I provide instructions to my Copilot Studio agent that produce a final output (a KQL string). Separately, I have a Topic that successfully runs a fixed KQL query. The problem is when I try to pass the dynamically generated KQL (from the instructions) into the Topic so the action can execute it—the variable created by the instructions isn’t available in the Topic. Topic‑scoped variables only exist within the Topic unless I explicitly pass or promote them; I need a supported way to surface the generated string for use in the Topic’s action.

 

Steps to Reproduce

 

  1. Create an agent; author instructions to generate a KQL query from a user’s request (e.g., “Build a KQL to show failed requests by operation name in the last 24h”).

  2. Create a Topic that runs a KQL query (via a connector/custom connector/Power Automate flow). With a hard‑coded query, the action works.

  3. Attempt to bind the query input in the Topic’s action to the variable produced by the agent’s instructions.

  4. Observe that the variable is not present/visible in the Topic, and you can’t pass it into the action.


  5.  
 

Expected

 

A supported pattern to capture the instruction‑generated text as a variable and pass it into the Topic (or directly into an action/flow) so the KQL can be executed. Copilot Studio supports variable passing across topics via Topic inputs/outputs and also supports calling flows with input/output parameters; I expected at least one of these to let me bridge instruction‑generated content into the Topic scope

 

Actual

 

The dynamic variable produced by instructions is not available within the Topic authoring canvas. Unless I manually recreate the text within the Topic itself, I can’t bind it to the action’s parameter. Topic variables remain local unless explicitly passed or made global.

I have the same question (1)
  • Michael E. Gernaey Profile Picture
    52,965 Super User 2025 Season 2 on at
    Generate KQL from natural language and run it in a Topic via Kusto action
     
    This is definitely a known limitation. 
     
    Is there any reason you cannot create a Topic that your Instructions call, so you can chain the Topics together to pass the value?
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Copilot Studio

#1
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 274 Super User 2025 Season 2

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 257 Super User 2025 Season 2

#3
Sam_Fawzi Profile Picture

Sam_Fawzi 82 Super User 2025 Season 2

Last 30 days Overall leaderboard