ServiceNow UI Action – How to auto-send prompt to Microsoft Teams Copilot agent instead of manual pa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday - last edited yesterday
ServiceNow UI Action – How to auto-send prompt to Microsoft Teams Copilot agent instead of manual paste
Hi Experts,
We have implemented a UI Action on the Change Request form in ServiceNow to launch a Microsoft Teams Copilot agent (Change Quality Advisor).
Current behavior:
• When the UI Action button is clicked, the Teams Copilot agent opens successfully using the Teams app URL.
• The script generates a prompt using the Change Request number and copies it to the clipboard.
• The user currently needs to paste the prompt manually (Ctrl + V) into the Copilot chat.
Sample script used:
function openCopilotAgent() {
var agentUrl = "https://teams.microsoft.com/l/app/f6405520-7907-4464-8f6e-9889e2fb7d8f?templateInstanc";
var number = g_form.getValue("number");
var prompt =
"You are Change Quality Advisor.\n" +
"Assess this ServiceNow Change Request and return:\n" +
"1) Quality score\n" +
"2) Missing information\n" +
"3) Risk rating\n" +
"4) Suggested improvements\n\n" +
"Change Number: " + number;
navigator.clipboard.writeText(prompt);
g_navigation.openPopup(agentUrl);
}
Requirement:
The client would like the prompt to automatically appear in the Copilot chat input field when the Teams agent opens, instead of the user manually pasting it.
Questions:
Is it possible for a ServiceNow UI Action to automatically pass text into the Microsoft Teams Copilot chat input field?
Does the Teams Copilot agent support any URL parameters or deep-linking to pass a prompt?
Are there recommended integration approaches between ServiceNow and Copilot agents for this scenario?
Any guidance or examples would be appreciated.
Thanks.
@Tanushree Maiti please help me here
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
@Ankur Bawiskar need your support - could you please help me here

