USE CASE
AUTOMATION

Post KPI Snapshots to Slack Automatically

Pull your metrics, mint an image, post it to Slack. Set up a cron job and it runs itself every Monday morning.

OUTPUT PREVIEW
SCALE 1:1
Live Dashboard
Weekly KPI Report
Acme CorpFeb 10 – Feb 16, 2026
MRR
$48.2K+12.4%
Active Users
3,847+8.2%
Churn Rate
1.8%-0.3%
NPS Score
72+5
Auto-generated report
Template + variables = image. That's the whole flow.RENDERED
SECTION 01

Nobody Opens the Dashboard

You built a dashboard. It has every metric your team needs. But nobody logs in. People check Slack, not your analytics URL.

Manual screenshots look bad and someone has to remember to take them. So the numbers that should drive decisions sit in a tool nobody visits.

SECTION 02

Bring the Dashboard to Slack

Use a KPI template with variables for your key metrics and their deltas. Pull the numbers from your database, mint a URL, post it to Slack via webhook.

Set it up as a cron job. Every Monday at 9am, your team gets a clean dashboard image in their Slack channel. No login required, no context switching.

SECTION 03

Example

FIG. 02
weekly-kpi-slack.ts
weekly-kpi-slack.ts
Shell
1// Monday morning cron job: generate KPI snapshot → post to Slack2const imageRes = await fetch("https://api.htmlpix.com/v1/url", {3  method: "POST",4  headers: {5    Authorization: `Bearer ${process.env.HTMLPIX_KEY}`,6    "Content-Type": "application/json",7  },8  body: JSON.stringify({9    templateId: WEEKLY_KPI_TEMPLATE_ID,10    variables: {11      title: "Weekly KPI Report",12      period: "Feb 10 – Feb 16, 2026",13      metric1Label: "MRR", metric1Value: "$48.2K", metric1Delta: "+12.4%",14      metric2Label: "Active Users", metric2Value: "3,847", metric2Delta: "+8.2%",15      metric3Label: "Churn Rate", metric3Value: "1.8%", metric3Delta: "-0.3%",16      metric4Label: "NPS Score", metric4Value: "72", metric4Delta: "+5",17      companyName: "Acme Corp",18    },19    width: 800,20    height: 500,21  }),22});23const { url: imageUrl } = await imageRes.json();2425// Post to Slack26await fetch(process.env.SLACK_WEBHOOK_URL, {27  method: "POST",28  body: JSON.stringify({29    blocks: [{30      type: "image",31      image_url: imageUrl,32      alt_text: "Weekly KPI Report",33    }],34  }),35});
Copy, paste, run. That's it.READY TO RUN
SECTION 04

Integration Snippets

app/api/cron/weekly-kpi/route.ts
TypeScript
export async function GET() {
  // Pull metrics from your database
  const metrics = await getWeeklyMetrics();

  // Mint the KPI image URL
  const res = await fetch("https://api.htmlpix.com/v1/url", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.HTMLPIX_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      templateId: process.env.KPI_TEMPLATE_ID,
      variables: {
        title: "Weekly KPI Report",
        period: metrics.period,
        metric1Label: "MRR", metric1Value: metrics.mrr, metric1Delta: metrics.mrrDelta,
        metric2Label: "Active Users", metric2Value: metrics.dau, metric2Delta: metrics.dauDelta,
        metric3Label: "Churn Rate", metric3Value: metrics.churn, metric3Delta: metrics.churnDelta,
        metric4Label: "NPS", metric4Value: metrics.nps, metric4Delta: metrics.npsDelta,
        companyName: "Acme Corp",
      },
      width: 800,
      height: 500,
    }),
  });
  const { url: imageUrl } = await res.json();

  // Post to Slack
  await fetch(process.env.SLACK_WEBHOOK_URL!, {
    method: "POST",
    body: JSON.stringify({
      blocks: [{ type: "image", image_url: imageUrl, alt_text: "Weekly KPI" }],
    }),
  });

  return Response.json({ ok: true });
}
SECTION 05

Time & Cost Savings

Without HTMLPix

Someone takes a screenshot of the dashboard every Monday. Crops it, posts it to Slack. Forgets half the time.

With HTMLPix

A cron job does it automatically. Pull metrics, mint URL, post to Slack. Never misses a week.

Estimated Savings
Never forgotten, never late
SECTION 06

Why HTMLPix

01

Goes Where People Already Are

Slack, email, Discord, Notion. Post the image URL anywhere. People see the numbers without opening a separate tool.

02

Runs Itself

Set up a cron job once: pull metrics, mint URL, post to Slack. After that, it's hands-off.

03

Color-Coded Deltas

Green for up, red for down. The template inverts the logic for metrics like churn where a decrease is good.

04

Non-Technical Friendly

Execs don't need to learn your analytics tool. A clean image in Slack tells the story.

SECTION 07

Frequently Asked Questions

Try It

500 images per month on Starter. Automate your Monday morning report.

Get Your API Key