Generate UTM-tagged Bitly links from Slack with GPT-4o-mini and Google Sheets logging
π Slack + Bitly UTM Generator β Powered by OpenAI
Description:
This no-code n8n workflow transforms how marketing teams generate Bitly links with UTM parameters β directly from Slack. Powered by AI and fully automated, this system extracts relevant campaign data from a Slack message, creates a clean Bitly shortlink with UTM tags, and logs everything to a Google Sheet for tracking and reporting.
Perfect for growth marketers, content teams, and anyone tired of manually building UTM-tagged links.
If you like to follow step-by-step build of workflows like these, check out: https://www.youtube.com/@Automatewithmarc
βοΈ How It Works π’ Slack Trigger The workflow starts when a user mentions the bot in a Slack channel (e.g., @BitlyBot link this for IG campaign).
π§ AI Agent (LangChain)
Uses GPT-4o-mini to infer UTM values (e.g., utm_source, utm_medium, utm_campaign)
Normalizes short forms like "IG" to "instagram"
Follows UTM naming conventions (e.g., lowercase, underscore-separated)
π Information Extractor Pulls cleanly structured UTM data from the AI response to prep for Bitly.
π Bitly Tool Node Generates a short link using the inferred target URL + UTM values.
π Google Sheets Logger Automatically appends the full details (Bitly link, UTM parameters, campaign owner) to a Google Sheet for easy access.
π’ Slack Response Replies in-thread with the new Bitly link and campaign details, formatted clearly for the user.
π Error Handling If Bitly link generation fails, the workflow gracefully stops with an error message.
π§ Tools & Services Used Slack (Trigger + Response)
LangChain AI Agent (with GPT-4o-mini)
Bitly (via Bitly Tool Node)
Google Sheets (auto-log generated links)
OpenAI GPT-4o-mini (Language model for prompt understanding)
π‘ Use Cases π Instantly create UTM-tagged links for campaigns
π Maintain a central Bitly + UTM link database in Google Sheets
π§ Use AI to reduce manual tagging and formatting errors
π€ Empower your team to request links via Slack, no forms needed
β Setup Instructions Slack: Set up a Slack bot and connect it using Slack Trigger and Slack response nodes. Bitly API: Generate a Bitly access token and set up credentials in the Bitly node. OpenAI / LangChain: Connect your GPT-4o or GPT-4 API key to the OpenAI Chat Model nodes. Google Sheets: Use OAuth2 credentials to connect to your Google Sheet. Make sure the sheet has matching columns for UTM parameters (sample headers included in the node schema).
Generate UTM-Tagged Bitly Links from Slack with GPT-4o Mini and Google Sheets Logging
This n8n workflow automates the creation of UTM-tagged Bitly links directly from Slack messages, leveraging the power of GPT-4o Mini for intelligent parameter generation and Google Sheets for logging. It streamlines the process of generating trackable links for marketing campaigns, making it easy to create and manage them without leaving Slack.
What it does
- Listens for Specific Slack Messages: The workflow is triggered when a Slack message containing the phrase "generate utm" is posted in a configured channel.
- Extracts Information with AI: It uses an AI Agent (powered by GPT-4o Mini) to extract key information from the Slack message, such as the base URL, campaign source, medium, and content.
- Constructs UTM Parameters: Based on the extracted information, it intelligently constructs the full UTM parameters.
- Generates Bitly Short Link: It then takes the base URL and the generated UTM parameters to create a shortened Bitly link.
- Logs to Google Sheets: The original URL, UTM parameters, and the generated Bitly link are logged into a specified Google Sheet for record-keeping and analysis.
- Posts Result to Slack: Finally, the workflow posts the newly generated Bitly link back to the Slack channel where the request originated, confirming the action and providing the usable link.
- Handles Errors: If the AI fails to extract the necessary information or any other error occurs, it posts an error message back to Slack.
Prerequisites/Requirements
- n8n Instance: A running n8n instance.
- Slack Account: A Slack workspace and an app with the necessary permissions to listen to messages and post messages.
- OpenAI API Key: An OpenAI API key to utilize the GPT-4o Mini model for AI Agent functionality.
- Google Account: A Google account with access to Google Sheets.
- Bitly Account: A Bitly account and API key for generating short links. (Note: Bitly node is not explicitly in the JSON but is implied by the workflow title and typical UTM link generation. You might need to add a Bitly node or a custom HTTP request for Bitly API.)
Setup/Usage
- Import the workflow: Download the JSON provided and import it into your n8n instance.
- Configure Credentials:
- Slack Trigger: Set up a Slack API credential for the "Slack Trigger" node. Configure it to listen for messages in your desired channel.
- OpenAI Chat Model: Set up an OpenAI API key credential for the "OpenAI Chat Model" node.
- Google Sheets: Set up a Google Sheets API credential for the "Google Sheets" node.
- Slack (Post Message): Set up a Slack API credential for the "Slack" node to allow it to post messages.
- Configure Nodes:
- Slack Trigger: Ensure the "Events to Listen For" include
message.channelsandmessage.groups. - AI Agent (Information Extractor): Review and adjust the prompt for the "Information Extractor" node to accurately parse your desired input format from Slack messages.
- Google Sheets: Specify the Google Sheet ID and sheet name where you want to log the data. Ensure the column headers match the data being sent (e.g.,
Original URL,UTM Source,UTM Medium,UTM Campaign,UTM Content,Bitly Link). - Slack (Post Message): Configure the channel where the generated link should be posted.
- Slack Trigger: Ensure the "Events to Listen For" include
- Activate the Workflow: Once all credentials and configurations are set, activate the workflow.
Now, whenever you post a message in the configured Slack channel containing "generate utm" and the necessary URL and campaign details, the workflow will automatically process it and return a UTM-tagged Bitly link.
Example Slack Message:
generate utm for https://example.com/product with source=slack, medium=social, campaign=summer_sale, content=button_ad
Related Templates
Track SDK documentation drift with GitHub, Notion, Google Sheets, and Slack
π Description Automatically track SDK releases from GitHub, compare documentation freshness in Notion, and send Slack alerts when docs lag behind. This workflow ensures documentation stays in sync with releases, improves visibility, and reduces version drift across teams. πππ¬ What This Template Does Step 1: Listens to GitHub repository events to detect new SDK releases. π§© Step 2: Fetches release metadata including version, tag, and publish date. π¦ Step 3: Logs release data into Google Sheets for record-keeping and analysis. π Step 4: Retrieves FAQ or documentation data from Notion. π Step 5: Merges GitHub and Notion data to calculate documentation drift. π Step 6: Flags SDKs whose documentation is over 30 days out of date. β οΈ Step 7: Sends detailed Slack alerts to notify responsible teams. π Key Benefits β Keeps SDK documentation aligned with product releases β Prevents outdated information from reaching users β Provides centralized release tracking in Google Sheets β Sends real-time Slack alerts for overdue updates β Strengthens DevRel and developer experience operations Features GitHub release trigger for real-time monitoring Google Sheets logging for tracking and auditing Notion database integration for documentation comparison Automated drift calculation (days since last update) Slack notifications for overdue documentation Requirements GitHub OAuth2 credentials Notion API credentials Google Sheets OAuth2 credentials Slack Bot token with chat:write permissions Target Audience Developer Relations (DevRel) and SDK engineering teams Product documentation and technical writing teams Project managers tracking SDK and doc release parity Step-by-Step Setup Instructions Connect your GitHub account and select your SDK repository. Replace YOURGOOGLESHEETID and YOURSHEET_GID with your tracking spreadsheet. Add your Notion FAQ database ID. Configure your Slack channel ID for alerts. Run once manually to validate setup, then enable automation.
Automate Gmail responses with GPT and human-in-the-loop verification
Try It Out! This n8n template uses AI to automatically respond to your Gmail inbox by drafting response for your approval via email. How it works Gmail Trigger monitors your inbox for new emails AI Analysis determines if a response is needed based on your criteria Draft Generation creates contextually appropriate replies using your business information Human Approval sends you the draft for review before sending Auto-Send replies automatically once approved Setup Connect your Gmail account to the Gmail Trigger node Update the "Your Information" node with: Entity name and description Approval email address Resource guide (FAQs, policies, key info) Response guidelines (tone, style, formatting preferences) Configure your LLM provider (OpenAI, Claude, Gemini, etc.) with API credentials Test with a sample email Requirements n8n instance (self-hosted or cloud) Gmail account with API access LLM provider API key Need Help? Email Nick @ nick@tropicflare.com
Track meal nutrition from meal photos with LINE, Google Gemini and Google Sheets
AI Meal Nutrition Tracker with LINE and Google Sheets Who's it for This workflow is designed for health-conscious individuals, fitness enthusiasts, and anyone who wants to track their daily food intake without manual calorie counting. It is best suited for users who want a simple, AI-powered meal logging system that analyzes food photos one at a time and provides instant nutritional feedback via LINE. What it does This workflow processes a single meal photo sent via LINE, analyzes it using Google Gemini AI to identify foods and estimate nutritional content, and stores the data in Google Sheets for tracking. The workflow focuses on simplicity and encouragement: it receives a meal image, performs AI-based food recognition, estimates calories and macronutrients, calculates a health score, provides personalized advice, and replies with a detailed nutritional breakdown on LINE. How it works A single meal photo is sent to the LINE bot. The workflow is triggered via a LINE webhook. The image file is downloaded and sent to Google Gemini AI for food analysis. The AI identifies foods and estimates nutritional values (calories, protein, carbs, fat, fiber). A health score (1-10) is calculated with personalized improvement tips. The data is appended to Google Sheets for meal history tracking. The image is uploaded to Google Drive for reference. A formatted nutritional report with advice is sent back as a LINE reply. This workflow is intentionally designed to handle one image per execution. Requirements To use this workflow, you will need: A LINE Messaging API account A Google Gemini API key A Google account with access to Google Sheets and Google Drive A Google Sheets document with the following column names: Date Time Meal Type Food Items Calories Protein (g) Carbs (g) Fat (g) Fiber (g) Health Score Advice Image URL Important limitations This workflow does not support multiple images sent in a single message. Sending images in quick succession may trigger multiple executions and lead to unexpected results. Only the first image in an event payload is processed. Nutritional values are AI estimates based on visual analysis and typical serving sizes. Accuracy depends on image quality, lighting, and food visibility. This tool should not replace professional dietary advice. These limitations are intentional to keep the workflow simple and easy to understand. How to set up Create a LINE Messaging API channel and obtain a Channel Access Token. Generate a Google Gemini API key. Update the Config node with your LINE token, Google Sheets ID, Google Drive folder ID, and daily calorie goal. Configure credentials for LINE, Google Gemini, Google Sheets, and Google Drive. Register the n8n webhook URL in your LINE channel settings. Activate the workflow in n8n and test it with a single meal photo. How to customize Modify the AI prompt in the "Analyze Meal with AI" node to support different languages or dietary frameworks (keto, vegan, etc.). Adjust the daily calorie goal in the Config node to match individual needs. Add additional nutritional fields such as sodium, sugar, or vitamins. Replace Google Sheets with a fitness app API or database. Integrate with other services to send daily/weekly nutrition summaries. --- Note: This workflow was tested using real meal photos sent individually via the LINE Messaging API. Nutritional estimates are approximations and may vary from actual values. For accurate dietary tracking, consult a registered dietitian.