See llms.txt for all machine-readable content.

Back to Templates

Create and track short links from Google Sheets with LinkBit

Quick overview

This workflow uses Google Sheets and the LinkBit API to create tagged short links from new spreadsheet rows every 15 minutes, then pulls 7-day click stats every Monday to update the sheet and generate a weekly top-links summary.

How it works

  1. Runs every 15 minutes on a schedule trigger.
  2. Reads rows from a Google Sheets “Links” tab and keeps only entries with a destination URL and an empty short_url.
  3. Creates a LinkBit short link (including optional slug, note, and UTM fields) via an HTTP request and skips failed rows so they can be retried later.
  4. Writes the returned LinkBit shortUrl and link ID back into the originating Google Sheets row.
  5. Runs every Monday at 09:00 on a schedule trigger and reads all tracked rows from the same Google Sheets tab.
  6. Fetches the last 7 days of click stats for each LinkBit link ID, updates clicks_7d and checked_at in Google Sheets, and compiles a weekly summary of total clicks and the top 5 links.
  7. Outputs the weekly summary for you to send via a downstream channel (for example Slack, email, or Telegram).

Setup

  1. Create a LinkBit API key and add an n8n HTTP Header Auth credential with header name x-api-key and your slk_… key, then select it in both LinkBit HTTP Request steps.
  2. Connect a Google Sheets OAuth2 credential and set the target spreadsheet and “Links” sheet in all Google Sheets steps.
  3. Ensure your sheet includes columns for destination, optional slug/note/utm_source/utm_medium/utm_campaign, and output columns short_url, link_id, clicks_7d, checked_at (plus row_number for updates).
  4. Replace the final no-op step with your preferred notification node and send the generated summary text.