How to Make a Sankey Diagram in Google Sheets with AI
A Sankey diagram is the perfect way to visualize the flow of data, whether it's showing how users navigate your website or how your marketing budget is allocated across different channels. This tutorial will walk you through how to create a Sankey diagram using Google Sheets, starting with the classic manual methods and ending with the modern, AI-powered approach.
What Exactly is a Sankey Diagram?
Unlike a simple bar or pie chart, a Sankey diagram excels at showing movement and flow from one point to another. It uses nodes (rectangular boxes) connected by links or flows (wide bands) to illustrate the distribution of a quantity. The width of each flow is proportional to the amount it represents, giving you an at-a-glance understanding of where the biggest contributions come from.
For marketers and business owners, this is incredibly useful for storytelling. You can instantly see:
Website Traffic Flow: Where do users come from (e.g., Google Search, Social Media)? Which pages do they visit? Which paths lead to a conversion? A Sankey diagram can map this entire customer journey visually.
Budget Allocation: How does your total marketing budget break down by channel (e.g., Google Ads, Facebook Ads), and what outcome does each channel drive (e.g., Leads, Signups, Sales)? You can spot which channels provide the most efficient path to your goals.
Sales Funnel Analysis: Visualize your funnel from the initial lead source to a qualified lead to a closed-won deal, seeing exactly where drop-offs occur and which sources generate the most valuable customers.
In essence, if you need to show how something moves through a system in multiple stages, a Sankey diagram is one of the most effective charts you can use.
Why Google Sheets Lacks a Built-in Sankey Chart
If they're so handy, why can’t you just click Insert > Chart > Sankey Diagram in Google Sheets? The primary reason is that Google Sheets focuses on the most common, universally used chart types like bar graphs, line charts, and pie charts. Specialized, multi-stage visualizations like Sankey or waterfall charts require more complex data structures and configuration, so they aren't included as a default option.
But don't worry. This limitation doesn't mean you can't create one. It just means we have to get a little creative with external tools, add-ons, or a new generation of AI platforms.
Method 1: Using an Online Generator (The Classic Way)
The most popular manual method involves formatting your data in Google Sheets and then pasting it into a free, web-based tool like SankeyMATIC. It's a reliable approach, but it requires several steps and results in a static image, not a live, updating chart.
Step 1: Get Your Data Ready
Sankey diagrams need data structured in a very specific, three-column format: [Source] [Amount] [Destination]. Each row in your spreadsheet represents a single flow from a source node to a destination node.
Let’s use a website traffic example. We want to see how visitors move from their traffic source to their first-page view. In your Google Sheet, your data should look like this:
Source | Amount (Sessions) | Destination |
Google Organic | 15500 | Homepage |
Google Organic | 8200 | Blog Post Topic A |
Facebook Ads | 7500 | Pricing Page |
Email Newsletter | 3100 | Homepage |
Direct Traffic | 4400 | Homepage |
You can even add more stages. For instance, to see how users moved from the Homepage, you could add more rows:
Homepage [9000] Pricing PageHomepage [10000] Features PageHomepage [3600] Blog Home
This structure builds a multi-level flow in your final diagram. Ensure your spelling and capitalization are consistent (e.g., "Homepage" should always be "Homepage").
Step 2: Copy Your Data and Open SankeyMATIC
Highlight just the data in your three columns - don’t include the headers - and copy it (Ctrl+C or Cmd+C). Then, open your browser and navigate to SankeyMATIC.com. You’ll see a simple interface with an input box on the left and a preview on the right.
Step 3: Paste and Preview
Delete the sample data in the input box on the left and paste your own data (Ctrl+V or Cmd+V). The diagram on the right should instantly update to reflect your data, showing the flows between your sources and destinations.
Step 4: Customize and Export
SankeyMATIC offers a surprising number of customization options. You can:
Adjust the colors of a specific node and its associated links.
Drag nodes up and down to change the visual layout.
Tweak link opacity, node width, and spacing.
Once you are happy with the design, you can export it as a PNG or SVG file. This image can then be inserted into your Google Sheets document ("Insert > Image"), a Google Slides presentation, or an email report. The critical thing to remember is that this image is a static snapshot. If your source data in Google Sheets changes, you must repeat this entire process again.
Method 2: Using a Google Sheets Add-on
If you prefer to keep everything inside Google Sheets, you can use an add-on. Add-ons are third-party apps that extend the functionality of Sheets. Several add-ons are available that can build Sankey diagrams directly from your data.
Step 1: Find and Install an Add-on
In your Google Sheet, navigate to Extensions > Add-ons > Get add-ons. This opens the Google Workspace Marketplace. Use the search bar to look for "Sankey diagram." You'll find several options. For this example, let's pretend we're using an add-on called "Sankey Chart Generator." Click on it and follow the prompts to install it, granting it the necessary permissions to access your data.
Step 2: Format Your Data
Just like with the manual method, add-ons require your data to be in a specific format. Most use the same [Source] [Amount] [Destination] structure, so the sheet you prepared for Method 1 will likely work perfectly here as well.
Step 3: Generate the Chart
After installing, a new menu option for the add-on should appear under the Extensions menu. Click on it and select "Create Chart" or "Open." This will typically open a sidebar.
In the sidebar, you'll be prompted to select your data range. Click the grid icon and highlight your three columns of data (including headers this time, as most add-ons use them to label the dropdowns). Once selected, the add-on will automatically identify your "From," "To," and "Weight" columns. Click the "Create Chart" button to generate it.
Step 4: Customize the Diagram
The diagram will appear either as a floating chart in your sheet or within the add-on's sidebar. You’ll have options to adjust colors, labels, and title settings. The main advantages over SankeyMATIC are that everything happens inside Sheets, and some add-ons can update the chart if the source data changes — though you may need to manually click a "refresh" button. However, the downside is that many add-ons put a watermark on their free versions or limit functionality to push you toward a paid subscription.
The AI-Powered Way: Ditch the Manual Work
The previous methods work, but they share a common bottleneck: you have to do all the heavy lifting. You're responsible for exporting raw data from systems like Google Analytics, cleaning it, structuring it perfectly in three columns, and managing a separate tool or add-on. If the data changes, the manual updates begin again. This is where AI analytics tools offer a fundamentally better approach.
Instead of wrestling with data formatting, you connect your data source directly and tell the AI what you want in plain English. This eliminates nearly all the manual steps.
From Clicks and Columns to Simple Conversations
With an AI-powered tool, the workflow is completely different. Your only task is to describe the chart you want.
For example, you could connect your Google Analytics account and simply ask:
"Create a Sankey diagram showing user flow from traffic source to landing page to conversion for the last 30 days."
The AI handles the rest:
It Understands a Complex Request: It knows what "traffic source," "landing page," and "conversion" mean within the context of your data, without you needing to specify datasets or columns.
It Queries and Structures the Data: It performs the data extraction and formatting in the background. No more CSV downloads or manual cleanup.
It Generates a Live, Interactive Chart: The output isn’t a flat image. It’s a live dashboard component. You can hover over a flow to see exact numbers, filter the results, and best of all, the diagram updates automatically as new data comes in.
You can even follow up with more requests, like, "Now filter that for mobile users only," or "What was the flow for campaigns containing 'Brand'?" Each question refines the chart, allowing for a level of data exploration that’s simply not possible with static charts.
Final Thoughts
Sankey diagrams offer a powerful way to tell stories with your data, but making them in Google Sheets has traditionally required manual data gymnastics. While external tools like SankeyMATIC and various add-ons provide a path, they still leave the user with the time-consuming tasks of data preparation and formatting.
Here at Graphed, we’ve designed our entire platform around eliminating that manual friction. We built our AI analyst so you can connect data sources like Google Sheets or Google Analytics and simply ask for what you need. Creating a live, multi-platform Sankey diagram showing your end-to-end customer journey from ad click to purchase is as simple as typing a single sentence, turning a repetitive, 30-minute chore into a 30-second conversation with your data.