Chart API
Chart API · Guide

Create a chart image in n8n

n8n has no built-in chart node. One HTTP Request node calling the Chart API turns the numbers from earlier nodes into a chart image link you can use in any later node.

Leads by sourceBar chart titled "Leads by source". Oct: Ads: 34, SEO: 51, Referral: 18, Events: 9. Nov: Ads: 41, SEO: 63, Referral: 22, Events: 14.Leads by sourceOctNov020406080AdsSEOReferralEvents

1. Add a credential

In n8n, create a Header Auth credential: name Authorization, value Bearer YOUR_KEY. Get a free key (50 charts, no sign-up).

2. Add an HTTP Request node

  • Method: POST · URL: https://kitforge-chart-api.kitforgelabs.workers.dev/v1/chart?response=json
  • Authentication: Generic Credential Type → Header Auth → the credential above
  • Send Body: on · Body Content Type: JSON · Specify Body: Using JSON
JSON body (n8n expressions)
{
  "type": "bar",
  "title": "Leads by source",
  "labels": {{ JSON.stringify($json.sources) }},
  "series": [
    { "name": "Oct", "data": {{ JSON.stringify($json.october) }} },
    { "name": "Nov", "data": {{ JSON.stringify($json.november) }} }
  ]
}

The node outputs url (a public image link that needs no key), svg and your remaining credits.

3. Use the chart

Send Email / Gmail node · HTML
<p>This month's leads:</p>
<img src="{{ $json.url }}" width="600" height="360" alt="Leads by source, October vs November">

The same works in Make, Zapier (Webhooks by Zapier → POST) and Pipedream: any step that can send an HTTP request with a header.

Good to know

  • A scheduled workflow with unchanged numbers re-renders the same chart for free; only new charts use a credit.
  • Bad input (empty data, too many points) returns a 400 with a plain-English message and is not charged. Turn on "Never Error" in the node's options if you want to handle it in the workflow.
  • Charts are SVG. Email apps, Notion and web pages show them; Slack and Discord image previews need PNG, which isn't available yet.
Try it free. Draw any chart in the playground (runs in your browser, no key), then get a free key for 50 charts. One Kitforge key also works for the Tech Stack API. Packs from $5 for 2,000 charts, pricing.

More guides: Charts in email · Charts in a README · Charts from AI assistants (MCP)