Building and customizing solutions using Microsoft 365 Copilot APIs and tools
Generative Answers actions and topics in Copilot Studio only accept specific input types (such as text/string) and expose specific output types. When an action returns a record/table and the next action expects a string, the record can't be passed directly; a string value must be extracted or defined as an output.
Use the following approach:
- Define topic outputs as strings
- When designing topics that will feed other actions, define explicit output variables of type text/string that contain exactly what the next action needs.
- For example, if a Generative Answers action returns a record with multiple fields, add a topic output like
SummaryTextand map it to the specific field or composed text that should be passed on. - In generative orchestration, the orchestrator then uses these outputs as structured data to build the next step or the final answer, instead of passing the entire record.
- Avoid passing citations/records as tool inputs
- Citations and other structured outputs from knowledge sources are exposed as tables/records (for example,
Answer.Speech.Citationsin voice scenarios) and are meant for display or branching, not as inputs to other tools. - Current limits explicitly state that citations returned from a knowledge source can't be used as inputs to other tools or actions. Instead, extract or summarize the needed information into a text output variable and pass that.
- Citations and other structured outputs from knowledge sources are exposed as tables/records (for example,
- Use topic input/output parameters for orchestration
- Configure topic inputs as text parameters with clear names (for example,
questionText,contextSummary) so the orchestrator can auto-fill them from conversation context or ask the user if missing. - Configure topic outputs as text parameters that represent the final data points needed by downstream topics or actions (for example,
NearestStoreLocation,AnswerSummary). - The orchestrator then passes these string outputs between topics and tools in the generated plan; records remain internal to the topic/tool and are not passed directly.
- Configure topic inputs as text parameters with clear names (for example,
- Pattern to handle record → string
In practice, this means:- Use the Generative Answers action to query knowledge sources and get a record/table internally.
- Within the same topic, compose the desired text (for example, a summary, a specific field, or a formatted string) and assign it to a text output variable.
- Configure the next Generative Answers action (or topic) to take that text output variable as its string input.
This pattern aligns with how topic inputs/outputs and generative orchestration are designed: structured outputs (records/tables) stay inside the topic/tool, while explicitly defined text outputs are used to connect steps.
References: