Generate Dynamic Line Charts with n8n and Google Drive

This workflow creates dynamic line charts from JSON sales data and automatically uploads the chart image to Google Drive. It solves the pain of manual chart creation and file uploading, saving time and improving data visualization efficiency.
manualTrigger
quickChart
googleDrive
+2
Workflow Identifier: 1578
NODES in Use: manualTrigger, set, quickChart, googleDrive, stickyNote
Automate charts with n8n and Google Drive

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

What This Automation Does ⚙️

This workflow takes sales data in JSON form and makes a line chart picture automatically using n8n.
It stops you from manually making charts and saves time uploading the picture to Google Drive.
The end result is a ready-made chart image stored in a chosen Drive folder, cutting chances for mistakes.

The workflow inputs quarterly sales numbers and labels from JSON. It processes the data with the QuickChart node to create the line chart image. Then it uploads that image file to Google Drive using Google Drive node.
You get a visual graph ready to share without opening any software or copying files yourself.


Tools and Services Used


Inputs, Processing Steps, and Output

Inputs

  • Quarterly sales numbers as a JSON array.
  • Labels for the X-axis periods in JSON array.
  • Report title as a JSON string (optional for naming or title purposes).

Processing Steps

  • JSON data is set in the Set node containing sales figures and labels.
  • The QuickChart node reads this data via expressions to build a line chart.
  • The line chart image is created dynamically and output as binary data.
  • The Google Drive node receives the image file and uploads it into the specified Drive folder.

Output

An image file of the quarterly sales line chart appears in the indicated Google Drive folder.


Who Should Use This Workflow

Anyone who wants to automate making line charts from sales or other data that comes in JSON format.
It is useful if you want fast, error-free, repeatable chart generation and direct storage without manually handling files.

This is helpful for non-technical users if they follow simple setup steps or for tech users who want to add data sources later.


Beginner Step-by-Step: How to Use This Workflow in n8n

Import the Workflow

  1. Download this workflow file by pressing the Download button on this page.
  2. Open n8n editor and select “Import from File”.
  3. Choose the downloaded workflow file to add it to your n8n workspace.

Configure the Workflow

  1. Add your Google Drive OAuth2 credentials inside n8n if not already configured.
  2. Set the Google Drive Folder ID where the chart images should be saved. Change it from default if needed.
  3. Check the Set node JSON data if you want to update test sales numbers or labels.

Test and Activate

  1. Run the workflow manually using the Manual Trigger node to confirm it creates and uploads the chart.
  2. Look in your Google Drive folder for the new chart image file.
  3. If test is successful, toggle the workflow status to “active” to run automatically or connect to other triggers.

This method works once you are inside n8n editor. You do not build the workflow manually here. Import and configure only.

For self hosting n8n, visit self-host n8n for details.


Key Expressions Used in the Workflow

The workflow uses expressions to pick data dynamically from JSON, for example:

{{ $json.jsonData.salesData }}

This is the path to the sales numbers array.

{{ $json.jsonData.labels }}

This gets the X-axis labels array.

Names the uploaded file using:

=chart.{{ $binary.data.fileExtension }}

This adds the right image extension automatically.


Common Problems and Fixes ????

Empty or broken chart image

This happens when label array and sales data array lengths do not match.

Check your JSON carefully. Both arrays must be same length exactly.

Google Drive upload permission error

Make sure Google Drive OAuth2 credentials are authorized and working.

Verify folder permissions allow file uploads.


Customization Ideas ✏️

  • Change chart type to bar, pie, or others inside QuickChart node.
  • Replace the static Set node with live data from HTTP Request or database nodes.
  • Add chart options JSON inside QuickChart node to style the chart with titles, colors, and scales.
  • Switch uploading destination, use local file saving or messaging platforms instead of Google Drive.

Pre-Production Checklist ✅

  • Confirm JSON data structure matches what QuickChart expects.
  • Validate Google Drive OAuth2 credentials have correct permissions.
  • Test the workflow manually before scheduling or production.
  • Check uploaded chart image for correctness in Google Drive.

Deployment Guide

Turn on the workflow in n8n after testing is successful.

Use Manual Trigger for one time runs or add a schedule trigger for automated runs (like quarterly).

Check workflow runs and error logs in n8n dashboard.

Set up notification nodes to get alerts on failures if necessary.


Summary

✓ Saves time by automating chart creation and upload tasks.
✓ Removes errors from manual chart making and file management.
✓ Provides a clear line chart image of quarterly sales data.
✓ Is easy to configure and run using n8n.
✓ Can be adapted for different data or chart types.

Automate charts with n8n and Google Drive

Visit through Desktop to Interact with the Workflow.

Author
Written By
Vikash Kumar
Building AI agents, n8n workflows and end-to-end automation for 30+ Brands across India, the US, Europe, Dubai & Australia. 7+ years of Experience saving founders real hours every week - no code required.
Author
Written By
Vikash Kumar
Building AI agents, n8n workflows and end-to-end automation for 30+ Brands across India, the US, Europe, Dubai & Australia. 7+ years of Experience saving founders real hours every week - no code required.

Frequently Asked Questions

Yes, change the chart type inside the QuickChart node to bar, pie, doughnut, or other supported types.
Failures usually happen due to unauthorized OAuth2 credentials or lack of upload permission on the selected Drive folder.
Ensure the sales data and labels JSON arrays have equal lengths and use correct expressions in the QuickChart node.
Yes, replace the Set node with HTTP Request or database query nodes to feed live data before chart generation.

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.