Update Your Google Slides Charts With A Single Click: A Free Tool for Your Business
At Grassr Solutions, we believe that small improvements to your daily operations can add up to significant time and cost savings. Today, we’d like to share a simple but useful automation we created for one of our clients that you can implement in your own business.
If you use Google Slides for presentations that include charts from Google Sheets, you've probably experienced this: your data changes, but your presentation doesn't automatically update to reflect those changes. You have to manually refresh each chart, which isn't difficult but becomes tedious when done repeatedly.
It's one of those small tasks that doesn't take much time individually but interrupts your workflow and adds up over weeks and months.
We created a straightforward solution for our clients that adds a custom menu to Google Slides. This menu gives users the ability to update all embedded charts with a single click. This is nothing revolutionary, but it's a nice quality-of-life improvement that removes a small friction point in their workflow.
The Code: Yours to Use for Free
We're happy to share this solution with you. Here's the complete code that you can add to your own Google Slides presentations:
/** * @OnlyCurrentDoc // Limits the script's access to only the current presentation. * Best practice for security and clarity. */ /** * Adds a custom menu to the Google Slides UI when the presentation is opened. */ function onOpen() { SlidesApp.getUi() .createMenu('🌲 Grassr Solutions') .addItem('📊 Update All Charts', 'updateAllChartsInSlides') .addToUi(); } /** * Iterates through all slides in the active presentation and refreshes * any embedded Google Sheets charts found. */ function updateAllChartsInSlides() { const presentation = SlidesApp.getActivePresentation(); const slides = presentation.getSlides(); let chartsRefreshedCount = 0; let chartsFoundCount = 0; const startTime = new Date(); // Record start time for duration calculation Logger.log(`Starting chart update for presentation: ${presentation.getName()} (ID: ${presentation.getId()})`); Logger.log(`Found ${slides.length} slides.`); // Get the UI object for displaying messages const ui = SlidesApp.getUi(); try { slides.forEach((slide, slideIndex) => { const slideNumber = slideIndex + 1; Logger.log(`Processing Slide ${slideNumber} (ID: ${slide.getObjectId()})`); const pageElements = slide.getPageElements(); pageElements.forEach((element, elementIndex) => { // Check if the element is a Sheets Chart if (element.getPageElementType() === SlidesApp.PageElementType.SHEETS_CHART) { chartsFoundCount++; const chart = element.asSheetsChart(); // Cast the element to a SheetsChart object const chartObjectId = chart.getObjectId(); const linkedSheetId = chart.getSpreadsheetId(); const linkedChartId = chart.getChartId(); Logger.log(` Found chart ${chartsFoundCount} (ID: ${chartObjectId}) on slide ${slideNumber}. Linked Sheet ID: ${linkedSheetId}, Linked Chart ID: ${linkedChartId}. Attempting refresh...`); try { chart.refresh(); chartsRefreshedCount++; Logger.log(` Successfully refreshed chart ${chartObjectId}.`); // Optional: Add a small delay if needed, e.g., if refreshes seem too fast or cause issues Utilities.sleep(200); // Sleep for 200 milliseconds } catch (error) { Logger.log(` ERROR refreshing chart ${chartObjectId} on slide ${slideNumber}: ${error.message}`); // Optionally, inform the user immediately about specific errors ui.alert(`Error refreshing a chart on slide ${slideNumber}: ${error.message}. Check Logs for details.`); } } }); // End loop through elements on a slide }); // End loop through slides const endTime = new Date(); const duration = (endTime.getTime() - startTime.getTime()) / 1000; // Duration in seconds const message = `Chart update complete (${duration.toFixed(1)}s). Found ${chartsFoundCount} charts. Successfully refreshed ${chartsRefreshedCount} charts. Check logs for details (View -> Logs).`; Logger.log(message); // Display a summary confirmation to the user ui.alert(message); } catch (e) { // Catch any unexpected errors during the overall process Logger.log(`An unexpected error occurred during the update process: ${e.message} \n${e.stack}`); ui.alert(`An unexpected error occurred: ${e.message}. Please check the logs (View -> Logs).`); } }
How to Add This to Your Presentation
Open your Google Slides presentation that contains embedded Google Sheets charts
Click on Extensions > Apps Script in the top menu
Delete any code in the editor and paste the code above
Save the project (Ctrl+S or ⌘+S) and give it a name (e.g., "Chart Updater")
Return to your presentation and refresh the page
You'll now see a custom menu labelled "🌲 Grassr Solutions" (feel free to change this to your company name)
To update all charts, simply click on 🌲 Grassr Solutions > 📊 Update All Charts
That's it! Now you can update all your charts with a single click.
The Real Value of Small Improvements
This small automation doesn't revolutionise the business, but it:
Eliminates a minor frustration during presentations
Ensures everyone is looking at the current data
Reduces the chance of overlooking a chart that needs updating
Creates a slightly more professional experience when presenting to clients
It's a small thing, but incremental improvements add up. This is exactly the kind of approach we take with our clients—finding those little friction points in your workflows and smoothing them out one by one.
This chart update tool is just one small example of how we approach business solutions. We believe that:
Small improvements matter — you don't always need massive system overhauls
Automation should be practical — solutions should address real, everyday pain points
Technology should work for you — not the other way around
Whether it's inventory management, human resources, real estate systems, or educational tools, we look for ways to make your daily operations just a bit smoother and more efficient.
If you found this tool helpful, we'd love to hear what other small friction points exist in your business operations.
Sometimes the most valuable improvements aren't the flashy ones—they're the subtle changes that make your day-to-day work just a little bit easier.