Skip to main content


Power Platform Community / Forums / General / How to read and update...

How to read and update copilot global variables in a custom webpage

Posted on by 9

In custom website channel approach, based on message response can we programmatically read and update copilot global variables from webpage (javascript).

  • remidyon Profile Picture
    remidyon on at
    Re: How to read and update copilot global variables in a custom webpage

    Hello @Mithoon 

    Yes you can send data from Javascript to global variable in Copilot Studio, set your variable to "External source can set value" then use that code snippet example


    payload: {
     activity: {
     channelData: {
     postBack: true,
     //Web Chat will trigger "conversation start" System Topic message automatically
     name: 'startConversation',
     type: "event",
     value: {
     text: "trigger phrase",
     pageAccess: pageLocation,
     userLatitude: latitude,
     userLongitude: longitude,


    See documentation: Use variables to carry content across topics - Microsoft Copilot Studio | Microsoft Learn

Helpful resources

Quick Links

Exciting News for Copilot Studio Communi…

Get ready to experience a whole new level of engagement with the Copilot Studio…

Celebrating the May Super User of the…

LaurensM is an exceptional contributor to the Power Platform Community…

Check out the Copilot Studio Cookbook…

We are excited to announce our new Copilot Cookbook Gallery in the Community…


renatoromao Profile Picture

renatoromao 6,459

Pstork1 Profile Picture

Pstork1 1,968

Expiscornovus Profile Picture

Expiscornovus 1,671