Wróć do szablonów
SZABLON WORKFLOW
Slack+Bitly URL Generator | Operasyon için n8n Otomasyon İş Akışı Şablonu (Google Sheets, Slack)
n8n için hazır otomasyon şablonu: Slack+Bitly URL Generator. 12 düğüm. Entegrasyonlar: Google Sheets, Slack. JSON'u kopyalayıp n8n'e içe aktarın.
12 węzłySlack_Bitly_URL_Generator-workflow.json
{"id": "lA4rExuNmuRPablT","meta": {"instanceId": "16d5a69b6a4f4733c8f669903729902650204c895b060993271b9227d7b0b3e8","templateCredsSetupCompleted": true},"name": "Slack+Bitly URL Generator","tags": [],"nodes": [{"id": "b2e9fe85-89de-4a63-8d2e-e9fda55abd84","name": "Slack Trigger","type": "n8n-nodes-base.slackTrigger","position": [-500,-20],"parameters": {"options": {"resolveIds": true},"trigger": ["app_mention"],"channelId": {"__rl": true,"mode": "id","value": "[REDACTED]"}},"typeVersion": 1},{"id": "ecf35ac1-0495-48fe-b1b6-17b3b4750ab6","name": "AI Agent","type": "@n8n/n8n-nodes-langchain.agent","position": [-160,-20],"parameters": {"text": "={{ $json.text }}","options": {"systemMessage": "You are a bitly URL creator agent. Your job is to:\n1. Extract, infer and categorize *accurately*:\na. Target URL (The URL that the user wants to be shortened with Bitly)\nb. utm_source\nc. utm_medium\nd. utm_campaign\ne. utm_term (only when applicable)\nf. utm_content (only when applicable)\n\n2. After inferring the relevant information, you will need to standardize it such that it follows the utm naming best practices, namely:\n- The utm naming should all be in lower case and connected with underscore _ if it's more than one word, e.g: christmas_day\n- You might get user input in short form, example \"IG\" or \"LI\" or \"fb\" and these should all be converted to \"instagram\", \"linkedin\", \"facebook\", instead of \"facebook.com\"\n- for utm_medium, choose from the following list: social, community, labs, video, cpc, email, referral, organic, banner, affiliate, tools\n\n3. When you have all the information, create a Bitly Shortened Link using the Bitly Tool\n\nAsk questions where necessary to obtain the full information. Do not make up facts/hallucinate, prioritize accuracy in your inference.\n\nOn successful Bitly Link creation, an ideal response format would be:\n\"Here is your shortened Bitly link for the URL:\n[Insert Generated Bitly URL Link]\nThis link includes the following UTM parameters:\n- Target URL: (Insert the original Target URL)\n- utm_source: (Insert utm_source)\n- utm_medium: (Insert utm_medium)\n- utm_campaign: (Insert utm_campaign)\n- utm_term: (Insert utm_term if applicable, if not insert \"empty\")\n- utm_content: (Insert utm_content if applicable, if not insert \"empty\")"},"promptType": "define"},"typeVersion": 2},{"id": "75abb766-85fb-440b-87d5-102af89b626a","name": "OpenAI Chat Model","type": "@n8n/n8n-nodes-langchain.lmChatOpenAi","position": [-220,200],"parameters": {"model": {"__rl": true,"mode": "list","value": "gpt-4o-mini"},"options": {}},"typeVersion": 1.2},{"id": "6c85565a-30d6-4259-9976-ac7b42bf327d","name": "Simple Memory","type": "@n8n/n8n-nodes-langchain.memoryBufferWindow","position": [-60,200],"parameters": {"sessionKey": "={{ $('Slack Trigger').item.json.channel }}","sessionIdType": "customKey","contextWindowLength": 10},"typeVersion": 1.3},{"id": "e7f9c4d6-dcee-49ea-b36e-bf66ecf387f2","name": "Bitly","type": "n8n-nodes-base.bitlyTool","position": [60,200],"parameters": {"longUrl": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Long_URL', ``, 'string') }}","additionalFields": {"domain": "[REDACTED]"}},"typeVersion": 1},{"id": "5c28ce3e-740d-496c-a8bd-0d31c43d03a5","name": "Google Sheets","type": "n8n-nodes-base.googleSheets","position": [1280,-20],"parameters": {"columns": {"value": {"URL": "={{ $json.output['Target URL'] }}","Date": "={{ $today }}","Notes": "Executed by n8n workflow","Owner": "={{ $json.output.User }}","Status": "Done","UTM ID": "={{ $json.output.utm_campaign }}","UTM Term": "={{ $json.output.utm_term }}","Bitly URL": "={{ $json.output['Bitly URL Link'] }}","UTM Medium": "={{ $json.output.utm_medium }}","UTM Source": "={{ $json.output.utm_source }}","UTM Content": "={{ $json.output.utm_content }}","UTM Campaign": "={{ $json.output.utm_campaign }}","Title on Bitly (Campaign)": "={{ $json.output.utm_campaign }}"},"schema": [{"id": "URL","type": "string","display": true,"required": false,"displayName": "URL","defaultMatch": false,"canBeUsedToMatch": true},{"id": "Title on Bitly (Campaign)","type": "string","display": true,"required": false,"displayName": "Title on Bitly (Campaign)","defaultMatch": false,"canBeUsedToMatch": true},{"id": "UTM Source","type": "string","display": true,"required": false,"displayName": "UTM Source","defaultMatch": false,"canBeUsedToMatch": true},{"id": "UTM Medium","type": "string","display": true,"required": false,"displayName": "UTM Medium","defaultMatch": false,"canBeUsedToMatch": true},{"id": "UTM Campaign","type": "string","display": true,"required": false,"displayName": "UTM Campaign","defaultMatch": false,"canBeUsedToMatch": true},{"id": "UTM Term","type": "string","display": true,"required": false,"displayName": "UTM Term","defaultMatch": false,"canBeUsedToMatch": true},{"id": "UTM Content","type": "string","display": true,"required": false,"displayName": "UTM Content","defaultMatch": false,"canBeUsedToMatch": true},{"id": "Owner","type": "string","display": true,"required": false,"displayName": "Owner","defaultMatch": false,"canBeUsedToMatch": true},{"id": "Status","type": "string","display": true,"required": false,"displayName": "Status","defaultMatch": false,"canBeUsedToMatch": true},{"id": "Bitly URL","type": "string","display": true,"required": false,"displayName": "Bitly URL","defaultMatch": false,"canBeUsedToMatch": true},{"id": "Date","type": "string","display": true,"required": false,"displayName": "Date","defaultMatch": false,"canBeUsedToMatch": true},{"id": "Notes","type": "string","display": true,"required": false,"displayName": "Notes","defaultMatch": false,"canBeUsedToMatch": true},{"id": "UTM ID","type": "string","display": true,"required": false,"displayName": "UTM ID","defaultMatch": false,"canBeUsedToMatch": true}],"mappingMode": "defineBelow","matchingColumns": [],"attemptToConvertTypes": false,"convertFieldsToString": false},"options": {},"operation": "append","sheetName": {"__rl": true,"mode": "list","value": "gid=0","cachedResultUrl": "[REDACTED]/edit#gid=0","cachedResultName": "Sheet1"},"documentId": {"__rl": true,"mode": "id","value": "[REDACTED]"}},"typeVersion": 4.6},{"id": "a08c2e8b-f14d-435e-9c32-94c116ec0859","name": "Information Extractor","type": "@n8n/n8n-nodes-langchain.informationExtractor","position": [640,-20],"parameters": {"text": "={{ $('Slack Response').item.json.message.text }}","options": {},"attributes": {"attributes": [{"name": "Bitly URL Link","description": "Bitly URL Link Generated, usually right after \"Here is your shortened Bitly link for the URL:\""},{"name": "utm_campaign","required": true,"description": "utm_campaign name"},{"name": "utm_source","required": true,"description": "utm_source name"},{"name": "utm_medium","required": true,"description": "utm_medium name"},{"name": "utm_term","required": true,"description": "utm_term name"},{"name": "utm_content","required": true,"description": "utm_content name"},{"name": "Target URL","required": true,"description": "Original Target URL Link"},{"name": "User","required": true,"description": "={{ $json.real_name }}"}]}},"typeVersion": 1.1},{"id": "65622ec6-62ee-4b78-9aba-adf822d21053","name": "OpenAI Chat Model1","type": "@n8n/n8n-nodes-langchain.lmChatOpenAi","position": [680,220],"parameters": {"model": {"__rl": true,"mode": "list","value": "gpt-4o-mini"},"options": {}},"typeVersion": 1.2},{"id": "2eba9bbb-6f16-4599-8123-4e4ae8e822de","name": "Slack - Get User Name","type": "n8n-nodes-base.slack","position": [460,-20],"parameters": {"user": {"__rl": true,"mode": "id","value": "={{ $('Slack Trigger').item.json.user }}"},"resource": "user","operation": "getProfile"},"typeVersion": 2.3},{"id": "637b896a-7343-44cd-842b-868938d2ea6c","name": "Slack Response","type": "n8n-nodes-base.slack","position": [280,-20],"parameters": {"text": "={{ $json.output }}","select": "channel","channelId": {"__rl": true,"mode": "id","value": "[REDACTED]"},"otherOptions": {"thread_ts": {"replyValues": {"thread_ts": "={{ $('Slack Trigger').item.json.ts }}"}},"includeLinkToWorkflow": false}},"typeVersion": 2.3},{"id": "000f70ec-b076-4cd9-9ce1-9e0bebe5ebe4","name": "If","type": "n8n-nodes-base.if","position": [1000,-20],"parameters": {"options": {},"conditions": {"options": {"version": 2,"leftValue": "","caseSensitive": true,"typeValidation": "strict"},"combinator": "and","conditions": [{"id": "fa53297e-b196-4e52-a4dd-8843d2e7dd55","operator": {"type": "string","operation": "notEmpty","singleValue": true},"leftValue": "={{ $json.output['Bitly URL Link'] }}","rightValue": ""}]}},"typeVersion": 2.2},{"id": "802cc2e4-0cce-49e4-b0f8-dd8bd9a145de","name": "Stop and Error","type": "n8n-nodes-base.stopAndError","position": [1280,160],"parameters": {"errorMessage": "Workflow has stopped intentionally because Bitly URL Link does not exist or not generated"},"typeVersion": 1},{"id": "1a960b7a-9919-40f1-b3dc-9856a71d8f9a","name": "Sticky Note","type": "n8n-nodes-base.stickyNote","position": [1180,-220],"parameters": {"width": 340,"height": 760,"content": "Update Log"},"typeVersion": 1},{"id": "80e31a88-409e-4b31-a9b4-931f0abc1f67","name": "Sticky Note1","type": "n8n-nodes-base.stickyNote","position": [940,-220],"parameters": {"width": 220,"height": 760,"content": "If Node"},"typeVersion": 1},{"id": "67d49e4c-ca9d-4d3e-8a63-7e2800fe0ede","name": "Sticky Note2","type": "n8n-nodes-base.stickyNote","position": [620,-220],"parameters": {"width": 300,"height": 760,"content": "Information Extractor"},"typeVersion": 1},{"id": "06e5401c-1f90-47a6-ab53-96419dc90ecf","name": "Sticky Note3","type": "n8n-nodes-base.stickyNote","position": [240,-220],"parameters": {"width": 360,"height": 760,"content": "Slack Response & Fetch User Name"},"typeVersion": 1},{"id": "9b178240-66da-4896-aa40-ae76dc9c4ffa","name": "Sticky Note4","type": "n8n-nodes-base.stickyNote","position": [-580,-220],"parameters": {"width": 280,"height": 760,"content": "Slack Trigger"},"typeVersion": 1},{"id": "78381b0c-2fab-4912-9995-f54a93b60e86","name": "Sticky Note5","type": "n8n-nodes-base.stickyNote","position": [-280,-220],"parameters": {"width": 500,"height": 760,"content": "Bitly AI Agent"},"typeVersion": 1},{"id": "2dd5433a-8a46-4e6c-80c2-cc3823972d91","name": "Sticky Note6","type": "n8n-nodes-base.stickyNote","position": [-1440,-220],"parameters": {"width": 820,"height": 1320,"content": "🔗 Slack + Bitly UTM Generator — Powered by OpenAI\nDescription:\n\nThis 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.\n\nPerfect for growth marketers, content teams, and anyone tired of manually building UTM-tagged links.\n\nIf you like to follow step-by-step build of workflows like these, check out:\nhttps://www.youtube.com/@Automatewithmarc\n\n⚙️ How It Works\n🟢 Slack Trigger\nThe workflow starts when a user mentions the bot in a Slack channel (e.g., @BitlyBot link this for IG campaign).\n\n🧠 AI Agent (LangChain)\n\nUses GPT-4o-mini to infer UTM values (e.g., utm_source, utm_medium, utm_campaign)\n\nNormalizes short forms like \"IG\" to \"instagram\"\n\nFollows UTM naming conventions (e.g., lowercase, underscore-separated)\n\n🔍 Information Extractor\nPulls cleanly structured UTM data from the AI response to prep for Bitly.\n\n🔗 Bitly Tool Node\nGenerates a short link using the inferred target URL + UTM values.\n\n📋 Google Sheets Logger\nAutomatically appends the full details (Bitly link, UTM parameters, campaign owner) to a Google Sheet for easy access.\n\n📢 Slack Response\nReplies in-thread with the new Bitly link and campaign details, formatted clearly for the user.\n\n🛑 Error Handling\nIf Bitly link generation fails, the workflow gracefully stops with an error message.\n\n🔧 Tools & Services Used\nSlack (Trigger + Response)\n\nLangChain AI Agent (with GPT-4o-mini)\n\nBitly (via Bitly Tool Node)\n\nGoogle Sheets (auto-log generated links)\n\nOpenAI GPT-4o-mini (Language model for prompt understanding)\n\n💡 Use Cases\n🔗 Instantly create UTM-tagged links for campaigns\n\n📊 Maintain a central Bitly + UTM link database in Google Sheets\n\n🧠 Use AI to reduce manual tagging and formatting errors\n\n🤝 Empower your team to request links via Slack, no forms needed\n\n✅ Setup Instructions\nSlack:\nSet up a Slack bot and connect it using Slack Trigger and Slack response nodes.\nBitly API:\nGenerate a Bitly access token and set up credentials in the Bitly node.\nOpenAI / LangChain:\nConnect your GPT-4o or GPT-4 API key to the OpenAI Chat Model nodes.\nGoogle Sheets:\nUse OAuth2 credentials to connect to your Google Sheet.\nMake sure the sheet has matching columns for UTM parameters (sample headers included in the node schema).\n\n\n"},"typeVersion": 1}],"active": false,"pinData": {},"settings": {"executionOrder": "v1"},"versionId": "723ac1de-6498-4074-98a5-d9e325835454","connections": {"If": {"main": [[{"node": "Google Sheets","type": "main","index": 0}],[{"node": "Stop and Error","type": "main","index": 0}]]},"Bitly": {"ai_tool": [[{"node": "AI Agent","type": "ai_tool","index": 0}]]},"AI Agent": {"main": [[{"node": "Slack Response","type": "main","index": 0}]]},"Simple Memory": {"ai_memory": [[{"node": "AI Agent","type": "ai_memory","index": 0}]]},"Slack Trigger": {"main": [[{"node": "AI Agent","type": "main","index": 0}]]},"Slack Response": {"main": [[{"node": "Slack - Get User Name","type": "main","index": 0}]]},"OpenAI Chat Model": {"ai_languageModel": [[{"node": "AI Agent","type": "ai_languageModel","index": 0}]]},"OpenAI Chat Model1": {"ai_languageModel": [[{"node": "Information Extractor","type": "ai_languageModel","index": 0}]]},"Information Extractor": {"main": [[{"node": "If","type": "main","index": 0}]]},"Slack - Get User Name": {"main": [[{"node": "Information Extractor","type": "main","index": 0}]]}}}
W edytorze n8n: wklej za pomocą Ctrl+V→Workflow zostanie utworzony