cancel
Showing results for 
Search instead for 
Did you mean: 

Updating a chart in Google Slides from Google Sheets

jarh15
Deputy Chef I
Deputy Chef I

Hi,

I have a Google slide presentation that I'm updating with variables from a Google Sheet. Everything is working properly except there is a chart in a Google slide that is sourced from a Google Sheet, but I am having trouble updating the chart in Google slides. Has anyone done this successfully before?

1 ACCEPTED SOLUTION

juliana-recio
Workato employee
Workato employee

Hi, @jarh15!

To update the chart in Google Slides (linked from Google Sheets), you must first update the source data in Google Sheets

Refreshing Chart in Slide
refresh.jpg

 Once done, refresh the chart in Google Slides using the Google Slides API. But you first need to get the slide object ID. Here’s how you can do that:

  • Use presentations.get to retrieve the presentation data. This will include the slides and their contents. Check the output to see the correct object ID needed for the slide with the chart. 
  • Once you already have the object ID, you can follow this sample setup to refresh the chart in your slide : 

 

{
   "requests":[
      {
         "refreshSheetsChart":{
            "objectId":"g2eee57255fc_0_5"
         }
      }
   ]
}

 

refreshchart.jpg

We also have Google Slides Community Connector. You can install it here. Otherwise, use the HTTP connector.

Please check out these helpful resources for your reference :
https://developers.google.com/sheets/api/samples/charts
https://developers.google.com/slides/api/reference/rest/v1/presentations/request#RefreshSheetsChartR...

View solution in original post

1 REPLY 1

juliana-recio
Workato employee
Workato employee

Hi, @jarh15!

To update the chart in Google Slides (linked from Google Sheets), you must first update the source data in Google Sheets

Refreshing Chart in Slide
refresh.jpg

 Once done, refresh the chart in Google Slides using the Google Slides API. But you first need to get the slide object ID. Here’s how you can do that:

  • Use presentations.get to retrieve the presentation data. This will include the slides and their contents. Check the output to see the correct object ID needed for the slide with the chart. 
  • Once you already have the object ID, you can follow this sample setup to refresh the chart in your slide : 

 

{
   "requests":[
      {
         "refreshSheetsChart":{
            "objectId":"g2eee57255fc_0_5"
         }
      }
   ]
}

 

refreshchart.jpg

We also have Google Slides Community Connector. You can install it here. Otherwise, use the HTTP connector.

Please check out these helpful resources for your reference :
https://developers.google.com/sheets/api/samples/charts
https://developers.google.com/slides/api/reference/rest/v1/presentations/request#RefreshSheetsChartR...