Automate Dashboard Metrics with n8n HTTP & Function Nodes

Struggling to manually update your project’s Docker, GitHub, npm, and Product Hunt stats? This n8n workflow automates retrieving and posting these key metrics to your dashboard, saving hours and minimizing errors automatically.
cron
httpRequest
function
+2
Workflow Identifier: 2159
NODES in Use: Cron, Set, HTTP Request, Function, GitHub

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

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What This Automation Does

This workflow collects important project data from DockerHub, GitHub, npm, and Product Hunt automatically. It solves the problem of spending hours every week gathering this data manually and making errors. The result is up-to-date project metrics posted to a dashboard fast and error-free.

It fetches stars, pulls, forks, watchers, scores, and reviews, then formats numbers nice and posts them safely with tokens.


Tools and Services Used

  • DockerHub API: Gets stars and pulls for repositories.
  • GitHub API: Fetches stars, forks, watchers, and open issues for repos.
  • npm API: Provides package quality and popularity scores.
  • Product Hunt GraphQL API: Retrieves votes, comments, reviews, and ratings.
  • Dashboard REST API: Receives and displays posted metrics securely.
  • n8n Workflow Automation: Runs all API calls, formatting, and posting regularly.

Inputs, Processing, and Outputs

Inputs

  • Dashboard configuration data with API URLs and tokens.
  • Repository and package names or IDs for DockerHub, GitHub, npm, and Product Hunt.

Processing Steps

  • Trigger workflow every minute by cron node.
  • Fetch DockerStar and Pull counts via HTTP requests.
  • Format numbers from Docker data to readable strings.
  • Post Docker metrics securely to dashboard API.
  • Fetch npm package scores using HTTP requests.
  • Round npm scores to two decimals for display.
  • Post all npm scores securely to dashboard endpoints.
  • Use GitHub node to get repo stats.
  • Format GitHub stats with commas.
  • Post them to dashboard API to update respective widgets.
  • Call Product Hunt GraphQL API for post data.
  • Format Product Hunt numbers.
  • Post Product Hunt data to dashboard using HTTP requests.

Outputs

  • Dashboard updates with latest stars, pulls, forks, watches, npm scores, and Product Hunt feedback.
  • Readably formatted numeric data shown in dashboard widgets.
  • Reduced manual work and errors, fresh data every minute.

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

1. Download and Import

  1. Download the workflow file using the Download button on this page.
  2. Open n8n editor, click Import from File.
  3. Select the downloaded workflow JSON to import.

2. Configure API Credentials

  1. Go to the Dashboard Configuration Set node.
  2. Update dashboard API URL and auth token.
  3. Enter exact DockerHub repo names, GitHub owner and repo, npm package name, and Product Hunt post ID values.
  4. Go to GitHub node, add or link API credentials with repo read access.
  5. Configure Product Hunt HTTP Request node with the correct API key in headers.

3. Test the Workflow Once

  1. Run the workflow manually using the Cron node trigger.
  2. Check execution to confirm data fetching and posting works without errors.
  3. Look at outputs in your dashboard to verify updated metrics format properly.

4. Activate for Production Use

  1. Turn the workflow to Active in n8n.
  2. Workflow runs every minute capturing fresh data continuously.
  3. Monitor API limits to avoid overuse; adjust Cron frequency if needed.
  4. Consider self-host n8n for better control and security when running this workflow on a server or VPS.

Common Edge Cases and Failures

Problem: Receiving HTTP 401 when posting to the dashboard.

Cause: The authentication token is wrong or missing.

Fix: Confirm the token in the Dashboard Configuration node exactly matches what the dashboard expects. No extra spaces allowed.

Problem: HTTP 404 errors when calling DockerHub or GitHub APIs.

Cause: Incorrect repository or package names in config.

Fix: Double-check the exact spellings for Docker repository, GitHub owner and repo, npm package, and Product Hunt post ID.


Customization Ideas

  1. Change Frequency
    Adjust the Cron node to run hourly or daily if per-minute updates aren’t needed.
  2. Add More Metrics
    Duplicate HTTP Request nodes to pull extra data like GitHub releases, npm downloads, or other social signals.
  3. Modify Dashboard API Calls
    Update URLs and payloads in HTTP Request nodes if the dashboard expects different data formats.
  4. Improve Formatting
    Edit Function nodes to add other formatting styles or calculate new stats before posting.

Summary and Outcome

✓ Save hours weekly by automating data fetching and posting.

✓ Avoid errors by removing manual copying and pasting.

✓ Get fresh, formatted project stats from multiple services every minute.

➔ Real-time, trustworthy dashboard insights improve project decisions.

➔ A solid, easy-to-use workflow fits most project setups with room to expand.


Frequently Asked Questions

The workflow uses the GitHub node by default. To use GitLab, replace GitHub calls with HTTP Request nodes targeting GitLab API endpoints. Adjust the requests and data accordingly.
401 errors happen when the authentication token is missing, expired, or incorrect in HTTP Request headers. Verify the API Key or auth token used for the dashboard and other services is valid and correctly set.
Lower the trigger frequency in the Cron node from every minute to hourly or daily. This reduces the number of API calls while still updating data regularly.
Yes. All HTTP POST calls include authentication tokens. Use HTTPS endpoints for the dashboard API to secure data in transit and protect tokens from being intercepted.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free