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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Global variable partly...
Copilot Studio
Unanswered

Global variable partly set to null

(0) ShareShare
ReportReport
Posted on by 609
Hi,
I have an issue using global variables in Copilot Studio.
 
Background
I'm writing a copilot studio bot, which uses an HTTP action to send requests to an Azure OpenAI model. The connection works fine, but since I use HTTP every request is unique, meaning the previous context gets lost. I'm using a global variable to save previous requests and responses, and send them as context in the HTTP request.
 
Setup
1. I initialize the global variable Conversation in the "Conversation Start" topic. The global variable is just an empty table. It is supposed to save the queries and responses for the whole conversation.
 
2. At the beginning of my main topic, I set a global variable RequestBody. This is the variable defining the request sent with the HTTP request. It takes the current user query and adds the content of the Conversation variable. So the request includes the current query and the conversation which happended before.
3. I send the request via an HTTP action with the RequestBody variable providing the content.
 
4. After the request returned successfully, I add the user query and response to the Conversation variable.
 
 
Issue
The problem is that the Conversation variable gets correctly set on the first query and I get the correct response. But when I send a second query, I get an error, because the content of the Converation variable has partly been set to null.
 
After the first query, the RequestBody was correctly set, containing only the user query.
The Conversation variable is also correctly set: It contains the user query and the response.
 
If I write an additional query, the RequestBody variable is not set correctly. Instead of adding the content of the Conversation variable to the request, it adds the structure, but the content and role are null.
I find this strange behavour. I would expect to either return null for the whole Conversation variable or set it correctly. But it provides the structure correctly, only the values of the fields are set to null.
 
Does anybody have an idea what the issue may be?
 
Regards
 
Categories:
I have the same question (0)

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
Michael E. Gernaey Profile Picture

Michael E. Gernaey 251 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

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

#3
S-Venkadesh Profile Picture

S-Venkadesh 93 Moderator

Last 30 days Overall leaderboard