by CustomJS
This n8n template demonstrates how to download multiple PDF files from public URLs and merge them into a single PDF using the PDF Toolkit from www.customjs.space. @custom-js/n8n-nodes-pdf-toolkit What this workflow does Defines** an array of PDF URLs. Splits** the array to process each URL individually. Downloads** each PDF using an HTTP Request. Merges** all downloaded PDFs using the Merge PDF node from the @custom-js/n8n-nodes-pdf-toolkit. Writes** the final merged PDF to disk. Requirements A free CustomJS account. An API Key saved in n8n as credentials of type CustomJS account. Notice Community nodes can only be installed on self-hosted instances of n8n. Usage Get API key from customJS Sign up to customJS platform. Navigate to your profile page Press "Show" button to get API key Set Credentials for CustomJS API on n8n Copy and paster your API key generated from CustomJS here. Design workflow A Manual Trigger for starting workflow. A code node that returns URLs of PDF files as an array Split Out node for concurrent processing HTTP node for downloading PDF file locally Merge PDFs node for merging files Write to Disk node for saving merged PDF file. You can replace logic for triggering and returning results. For example, you can trigger this workflow by calling a webhook and get a result as a response from webhook. Simply replace Manual Trigger and Write to Disk nodes. Perfect for Bundling reports or invoices. Generating document sets from external sources. Automating PDF handling without writing custom code.
by Trung Tran
🤖 Smart Interview Assistant: Tailored Questions Based on CV, JD, and Round Watch the demo video below: 📌 Who’s it for This workflow is designed for: Recruiters* and *Talent Acquisition Specialists** who want to automate candidate interview prep. Hiring Managers** conducting multiple interviews and needing personalized question sets. Technical Interviewers** who want to save time and be well-prepared with relevant questions. ⚙️ How it works / What it does The Smart Interview Assistant automates the interview preparation process in a few clicks: Accepts: Multiple resumes (PDFs) Selected job role Chosen interview round Extracts structured data from: The candidate’s CV The corresponding Job Description (JD) Uses GPT-4 to analyze: Candidate profile Role requirements Interview round context Generates: Tailored interview questions Expected answers A summarized interview prep report Sends the report directly to the hiring team via email (SMTP) 📁 Google Drive Structure 📂 Root Folder ├── 📁 jd/ # Stores all job descriptions in PDF format │ ├── Backend_Engineer.pdf │ ├── Azure_DevOps_Lead.pdf │ └── ... └── 📄 Positions (Google Sheet) # Maps Job Role ↔ JD File Link 📝 Sample Mapping Sheet: Positions Sheet Columns: Job Role Job Description File URL (pointing to PDF in jd/ folder) 🛠️ How to Set Up Step 1: Configure API Integrations ✅ Connect your OpenAI GPT-4 API Key ✅ Enable Google Cloud APIs: Google Sheets API (to read job roles) Google Drive API (to access CV and JD files) ✅ Set up SMTP credentials (for email delivery) Step 2: Prepare Google Drive & Mapping Sheet Create a root folder on Google Drive Inside the root folder: Create a folder named /jd/ and upload all job descriptions (PDFs) Create a Google Sheet named Positions with the following format: | Job Role | Job Description File URL | |-----------------------------|--------------------------------------------| | Azure DevOps Engineer | https://drive.google.com/xxx/jd1.pdf | | Full-Stack Developer (.NET) | https://drive.google.com/xxx/jd2.pdf | Step 3: Build the Application Form Use any form tool (e.g., Typeform, Tally, or custom HTML) that collects: 📎 Resume file (PDF) 🧾 Job Role (dropdown) 🔄 Interview Round (dropdown) Step 4: Resume & JD Extraction 🔍 Use Extract from PDF to parse the resume content 📄 Retrieve the JD link from the Positions sheet based on the selected Job Role 🔗 Use Download file to pull the PDF for processing Step 5: Analyze with GPT-4 Run both Resume and JD through a Profile Analyzer Agent (GPT-4 with JSON output) Merge results Add manual input or mapping for the Interview Round metadata Step 6: Generate Interview Report Use a second GPT-4 agent (e.g., HR Expert Agent) to: Generate 6–8 tailored interview questions Include expected answers and rationale Step 7: Deliver Final Report Format the content as: 📄 PDF (optional) 📨 Email body Send the report to the recruiter, hiring manager, or interviewer via SMTP ✅ Requirements 🔑 OpenAI GPT-4 API Key 📁 Google Drive (for resume and JD storage) 📊 Google Sheet (job role mapping) 📬 SMTP credentials (host, username, password) 🧰 n8n self-hosted or cloud instance with: PDF Parser Google Sheets node HTTP Download node Email node ✏️ How to Customize the Workflow | Part | Customization Options | |----------------------------|-------------------------------------------------------------| | Form UI | Modify the design, dropdown options, or input validations | | Job Description Source | Replace Google Sheet with Notion, Airtable, or database | | Interview Metadata | Add job level, region, or language preference | | AI Prompt Tuning | Adjust prompt phrasing or temperature in GPT nodes | | Report Format | Generate PDF instead of email body using PDF node | | Delivery Method | Add internal HR portal webhook or generate downloadable link |
by darrell_tw
Workflow Description This workflow demonstrates how to use the LINE Messaging API to handle two scenarios: Replying to a user's message using a reply token. Sending a push message to a specific LINE user using their user ID. Key Features Webhook Integration: Receives and processes incoming messages from LINE using a webhook. Conditional Logic: Checks if the received event type is a message and handles it accordingly. Reply Message: Automatically responds to the user's message using the LINE reply token. Push Message: Sends a test message to a specific LINE user using their unique user ID. Pre-Configuration To simplify the setup process, create a Header Auth credential in n8n: Name**: Authorization Value**: Bearer {line token} This will authenticate all API requests to the LINE Messaging API. Node Configurations 1.1. Webhook from LINE Message Purpose**: Captures incoming events from the LINE Messaging API. Configuration**: HTTP Method: POST Path: {n8n-webhook-page} 1.2. If Condition Purpose**: Checks if the received event type is message. Configuration**: Condition: {{ $json.body.events[0].type }} equals "message" 1.3. Line: Reply with Token Purpose**: Replies to the user's message using the LINE reply token. Configuration**: Method: POST URL: https://api.line.me/v2/bot/message/reply JSON Body: { "replyToken": "{{ $('Webhook from Line Message').item.json.body.events[0].replyToken }}", "messages": [ { "type": "text", "text": "收到您的訊息 : {{ $('Webhook from Line Message').item.json.body.events[0].message.text }}" } ] } 2.1. Manual Trigger: Test Workflow Purpose**: Triggers the workflow for testing the push message functionality. Configuration**: No additional setup required. 2.2. Edit Fields Purpose**: Prepares the unique LINE user ID for the push message. Configuration**: Field: line_uid: Uxxxxxxxxxxxx 2.3. Line: Push Message Purpose**: Sends a test message to a specific LINE user. Configuration**: Method: POST URL: https://api.line.me/v2/bot/message/push JSON Body: { "to": "{{ $json.line_uid }}", "messages": [ { "type": "text", "text": "推播測試" } ] } 工作流程描述 此工作流程展示如何使用 LINE Messaging API 處理兩種情境: 使用 reply token 回應使用者的訊息。 使用使用者的 user ID 發送 推播訊息。 主要功能 Webhook 整合:透過 Webhook 接收並處理來自 LINE 的訊息。 條件邏輯:檢查接收到的事件類型是否為訊息並進行處理。 回應訊息:使用 LINE 的 reply token 自動回覆使用者的訊息。 推播訊息:使用 LINE User ID 向指定用戶發送測試訊息。 預先設定 為簡化設定流程,請在 n8n 中建立 Header Auth 憑證: 名稱**:Authorization 值**:Bearer {line token} 此設定將用於認證所有 LINE Messaging API 的請求。 節點設定 1.1. Webhook from LINE Message 用途**:接收來自 LINE Messaging API 的事件。 設定**: HTTP 方法:POST 路徑:{n8n-webhook-page} 1.2. If 條件判斷 用途**:檢查接收到的事件類型是否為 message。 設定**: 條件: {{ $json.body.events[0].type }} 等於 "message" 1.3. Line: Reply with Token 用途**:使用 LINE reply token 回應使用者訊息。 設定**: 方法:POST URL:https://api.line.me/v2/bot/message/reply JSON 主體: { "replyToken": "{{ $('Webhook from Line Message').item.json.body.events[0].replyToken }}", "messages": [ { "type": "text", "text": "收到您的訊息 : {{ $('Webhook from Line Message').item.json.body.events[0].message.text }}" } ] } 2.1. 手動觸發:測試工作流程 用途**:測試推播訊息功能。 設定**:無需額外設定。 2.2. Edit Fields 用途**:準備推播訊息所需的 LINE 使用者 ID。 設定**: 欄位: line_uid:Uxxxxxxxxxxxx 2.3. Line: 推播訊息 用途**:向特定 LINE 使用者發送測試訊息。 設定**: 方法:POST URL:https://api.line.me/v2/bot/message/push JSON 主體: { "to": "{{ $json.line_uid }}", "messages": [ { "type": "text", "text": "推播測試" } ] } 完成示意圖 (Storyboard Example):
by CustomJS
This n8n workflow shows how to convert PDF files into PNG format with the PDF Toolkit from www.customjs.space. @custom-js/n8n-nodes-pdf-toolkit Notice Community nodes can only be installed on self-hosted instances of n8n. What this workflow does Generate** PDF file from the requested HTML. Convert** the PDF to PNG images. Use** a Code node to handle URLs that point to PDF files. Convert** the PDF to PNG format. Requirements Self-hosted** n8n instance. CustomJS API key** for converting PDF to PNG. HTML** Data to convert PDF files. Code node** for handling URL that indicates PDF file. Workflow Steps: Manual Trigger: Runs with user interaction. HTML to PDF: Request HTML Data. Convert HTML to PDF. Request PDF from Code. Convert PDF to PNG: Convert the generated PNG from PDF Usage Get API key from customJS Sign up to customJS platform. Navigate to your profile page Press "Show" button to get API key Set Credentials for CustomJS API on n8n Copy and paste your API key generated from CustomJS here. Design workflow A Manual Trigger for starting workflow. HTTP Request Nodes for downloading PDF files. Code node for handling URL that indicates PDF file. Convert PDF to PNG. You can replace logic for triggering and returning results. For example, you can trigger this workflow by calling a webhook and get a result as a response from webhook. Simply replace Manual Trigger and Write to Disk nodes.
by Zacharia Kimotho
This is an example of how we can build a slack bot in a few easy steps Before you can start, you need to o a few things Create a copy of this workflow Create a slack bot Create a slash command on slack and paste the webhook url to the slack command Note Make sure to configure this webhook using a https:// wrapper and don't use the default http://localhost:5678 as that will not be recognized by your slack webhook. Once the data has been sent to your webhook, the next step will be passing it via an AI Agent to process data based on the queries we pass to our agent. To have some sort of a memory, be sure to set the slack token to the memory node. This way you can refer to other chats from the history. The final message is relayed back to slack as a new message. Since we can not wait longer than 3000 ms for slack response, we will create a new message with reference to the input we passed. We can advance this using the tools or data sources for it to be more custom tailored for your company. Usage To use the slackbot, go to slack and click on your set slash command eg /Bob and send your desired message. This will send the message to your endpoint and get return the processed results as the message. If you would like help setting this up, feel free to reach out to zacharia@effibotics.com
by joseph
🧵 Generate Conversational Twitter/X Threads with GPT-4o AI (n8n Workflow) This workflow uses OpenAI (GPT-4o) and Twitter/X to automatically generate and publish engaging, conversational threads in response to a trigger (e.g., from a chatbot or form). 🚀 What Does It Do? Listens for an incoming message (e.g., via webhook or another n8n input). Uses GPT-4o to craft a narrative-style Twitter thread in a personal, friendly tone. Publishes the first tweet, then automatically posts each following tweet as a reply—building a full thread. 🛠️ What Do You Need to Configure? Before using this template, make sure to set up the following credentials: OpenAI Add your OpenAI API key in the OpenAI Chat Model node. This is used to generate the thread content. Twitter/X Add your Twitter OAuth2 credentials to the First Tweet and Thread Reply nodes. This allows the workflow to publish tweets on your behalf. ✨ Who Is This For? This template is perfect for: Content creators who want to share ideas regularly Personal brands looking to grow their presence Social media managers automating thread creation 🔧 How to Customize It You can easily adjust the tone, structure, or length of the threads by modifying the system prompt in the OpenAI node. For example: To create threads with humor, change the prompt to “Write in a witty and humorous tone.” To tailor it for marketing, prompt it with “Write a persuasive product-focused Twitter thread.” You can also integrate this workflow with: Telegram bots Web forms (e.g., Typeform, Tally) CRM tools or newsletter platforms 📋 Sample Output Prompt sent to the workflow: “Tips for growing on Twitter in 2025” Generated thread: ++Tweet 1:++ Thinking of growing your presence on Twitter/X in 2024? Here's a thread with the most effective strategies that actually work 🧵 ++Reply 1:++ Engage, don’t broadcast Twitter is a conversation platform. Reply to others, quote-tweet, and start discussions instead of just posting links. ++Reply 2:++ Consistency beats virality Tweeting regularly builds trust and visibility. You don't need to go viral — just show up.
by Calistus Christian
Overview Receive a URL via Webhook, submit it to urlscan.io, wait ~30 seconds for artifacts (e.g., screenshot), then email a clean summary with links to the result page, screenshot, and API JSON. What this template does Ingests a URL from a POST request. Submits the URL to urlscan.io and captures the scan UUID. Waits 30s** to give urlscan time to generate the screenshot and result artifacts. Sends a formatted HTML email via Gmail with all relevant links. Nodes used Webhook** (POST /urlscan) urlscan.io → Perform a scan** Wait** (30 seconds; configurable) Gmail → Send a message** Input { "url": "https://example.com" }
by Dahiana
Monitor website performance with PageSpeed Insights and save to Google Sheets with alerts This n8n template automatically monitors website performance using Google's PageSpeed Insights API, compiles detailed reports, and tracks performance trends over time in Google Sheets. Use cases: Agency client monitoring, competitor analysis, performance regression detection, SEO reporting, site migration monitoring, A/B testing performance impact, and maintaining performance SLAs. Who's it for Digital agencies monitoring client websites SEO professionals tracking site performance DevOps teams maintaining performance SLAs Business owners wanting automated site monitoring How it works Automated Testing:** Scheduled audits of multiple websites using PageSpeed Insights API Core Web Vitals:** Tracks LCP, FID, CLS, and overall performance scores Historical Tracking:** Maintains performance history for trend analysis Alert System:** Sends notifications when performance drops below thresholds Detailed Reporting:** Captures specific recommendations and optimization opportunities Two Workflow Paths Scheduled Audit: Automatically tests all URLs from Google Sheet on schedule On-Demand Testing: Webhook endpoint for immediate single-URL testing How to set up Get a free PageSpeed Insights API key from Google Cloud Console Create Google Sheet with columns: URL, Site Name, Category, Alert Threshold, Last_Processed_Date and Device. Set up Google Sheets API credentials Configure notification preferences (Slack, email, etc.) Set audit schedule (daily, weekly, or custom) Define performance thresholds for alerts Requirements Google PageSpeed Insights API key (free) Google Sheets API access n8n instance (cloud or self-hosted) Optional: Slack/email for notifications Google Sheet Structure Input Sheet ("sites"): URL, Site_Name, Category, Alert_Threshold, Last_Processed_Date and Device. Results Sheet ("audit_results"): Date, URL, Site_Name, Device, Performance_Score, LCP, FID, CLS, Recommendations, Full_Report_URL API Usage (On-Demand) POST to webhook: { "url": "https://example.com", "site_name": "Example Site", "alert_threshold": 75 } How to customize Add custom performance thresholds per site Include additional metrics (accessibility, SEO, best practices) Connect to other dashboards (Data Studio, Grafana) Add competitor benchmarking Integrate with project management tools for issue tracking Set up different notification channels based on severity Sample Google Sheet Included
by ConnectSafely
Rewrite viral LinkedIn posts in your voice with AI and Telegram approval using Google Gemini Who's it for This workflow is designed for LinkedIn creators, personal brand builders, thought leaders, and content marketers who want to consistently create engaging content without starting from scratch. Perfect for professionals who admire viral posts from others but want to adapt those ideas to their own unique voice and style. If you're struggling to maintain a consistent posting schedule, looking for content inspiration, or want to repurpose trending ideas while keeping your authentic voice, this automation handles the creative heavy lifting while giving you full control over what gets published. How it works The workflow transforms viral LinkedIn posts into personalized content that matches your writing style, complete with AI-generated images, all controlled through Telegram. The process flow: Send any LinkedIn post URL to your Telegram bot Security check validates your Telegram user ID ConnectSafely.ai scrapes the original post content and engagement metrics Your custom persona profile is loaded (tone, phrases, formatting preferences) Google Gemini AI rewrites the post to match YOUR voice Gemini generates a professional, on-brand image for the post Preview is sent to Telegram for your review Approve or reject with a simple reply On approval, the post goes live on LinkedIn automatically Setup steps Step 1: Create a Telegram Bot Open Telegram and search for @BotFather Send /newbot and follow the prompts to create your bot Save the API token provided by BotFather Get your Telegram User ID by messaging @userinfobot Step 2: Configure Telegram Credentials in n8n Go to Credentials → Add Credential → Telegram API Paste your bot token from BotFather Save the credential Update all Telegram nodes to use this credential Step 3: Set Up Security Check Open the 🔒 Security Check node Replace YOUR_TELEGRAM_USER_ID with your actual Telegram user ID This ensures only YOU can trigger the workflow Step 4: Configure ConnectSafely.ai API Sign up at ConnectSafely.ai Navigate to Settings → API Keys in your dashboard Generate a new API key In n8n, go to Credentials → Add Credential → ConnectSafely API Paste your API key and save Connect this credential to the 🔍 Scrape LinkedIn Post node Step 5: Configure Google Gemini API Go to Google AI Studio Create or select a project Generate an API key In n8n, go to Credentials → Add Credential → Google Gemini (PaLM) API Paste your API key and save Connect this credential to both: Google Gemini Chat Model node Generate an image node Step 6: Connect Your LinkedIn Account In n8n, go to Credentials → Add Credential → LinkedIn OAuth2 API Follow the OAuth flow to connect your LinkedIn account Connect this credential to the Create LinkedIn Post node Update the person parameter with your LinkedIn Person ID (URN) Step 7: Customize Your Persona Open the 👤 Load Your Persona node Edit the PERSONA object to match YOUR writing style: Update name with your name Modify expertiseAreas with your topics Adjust commonPhrases with phrases you actually use Set preferredEmojis to your favorites Customize styleNotes to capture your unique voice Step 8: Activate the Workflow Save your workflow Toggle the workflow to Active Your Telegram bot is now ready to receive LinkedIn URLs Customization Persona Customization The 👤 Load Your Persona node is where you define your unique voice. Key areas to customize: | Field | Description | Example | |-------|-------------|---------| | tone | Overall communication style | "Professional yet approachable, data-driven" | | voice | Perspective and personality | "First-person, authentic, vulnerable" | | formatting | Structure preferences | "Short paragraphs, emoji bullets, line breaks" | | hooks | Opening style | "Start with contrarian takes or personal stories" | | expertiseAreas | Your niche topics | ["SaaS growth", "Leadership", "Remote work"] | | commonPhrases | Signature expressions | ["Here's the truth:", "I learned this the hard way:"] | Image Generation The 📝 Create Image Prompt node generates the image prompt. Modify the style parameters to match your brand: Current style**: Modern, clean, corporate, vector art Customize**: Change to photography, illustrations, or abstract visuals Post Length In the persona configuration, adjust postLength: "short" - Quick insights (under 500 characters) "medium" - Standard posts (500-1500 characters) "long" - Deep dives (1500-3000 characters) AI Model Selection The workflow uses gemini-2.5-pro for text. You can switch to other models in the Google Gemini Chat Model node based on your needs. Requirements | Requirement | Details | |-------------|---------| | n8n Version | 1.0+ recommended | | Telegram Bot | Created via @BotFather | | ConnectSafely.ai Account | API key required | | Google AI Studio Account | Gemini API key required | | LinkedIn Account | OAuth2 connected in n8n | | Community Node | n8n-nodes-connectsafely-ai (self-hosted only) | ⚠️ Note: This workflow uses the ConnectSafely community node, which requires a self-hosted n8n instance. Use cases Content Repurposing**: Transform competitor or industry leader posts into your own perspective Consistent Posting**: Maintain a regular posting schedule without content creation burnout Style Consistency**: Ensure every post matches your established personal brand Trend Riding**: Quickly create content around viral topics while they're still relevant A/B Testing**: Test different approaches by approving or rejecting variations Troubleshooting Common Issues & Solutions Issue: Bot not responding to messages Solution**: Verify the Telegram webhook is active; check the Telegram Trigger node is properly configured Issue: "Profile not found" from ConnectSafely.ai Solution**: Ensure the LinkedIn URL is complete and public. Some posts on private profiles can't be scraped Issue: Image generation fails Solution**: Verify your Gemini API key has access to image generation models. Check quota limits in Google AI Studio Issue: LinkedIn post fails to publish Solution**: Confirm your LinkedIn OAuth2 credentials are valid and haven't expired. Re-authorize if needed Issue: AI generates posts that don't match your style Solution**: Be more specific in your persona configuration. Add more example phrases and detailed style notes Issue: Security check blocks your messages Solution**: Double-check your Telegram User ID is correctly entered (must be a number, not username) Documentation & Resources Official Documentation ConnectSafely.ai Docs**: https://connectsafely.ai/docs Google Gemini API**: https://ai.google.dev/docs Telegram Bot API**: https://core.telegram.org/bots/api LinkedIn API**: https://docs.microsoft.com/linkedin/ Support ConnectSafely Support**: support@connectsafely.ai n8n Community**: https://community.n8n.io Connect With Us Stay updated with the latest automation tips, LinkedIn strategies, and platform updates: LinkedIn**: linkedin.com/company/connectsafelyai YouTube**: youtube.com/@ConnectSafelyAI-v2x Instagram**: instagram.com/connectsafely.ai Facebook**: facebook.com/connectsafelyai X (Twitter)**: x.com/AiConnectsafely Bluesky**: connectsafelyai.bsky.social Mastodon**: mastodon.social/@connectsafely Need Custom Workflows? Looking to build sophisticated LinkedIn automation workflows tailored to your business needs? Contact our team for custom automation development, strategy consulting, and enterprise solutions. We specialize in: Multi-channel engagement workflows AI-powered personalization at scale Lead scoring and qualification automation CRM integration and data synchronization Custom reporting and analytics pipelines
by Custom Workflows AI
Introduction This workflow offers a streamlined solution for uploading multiple files to a GitHub repository simultaneously using GitHub's REST API. It addresses a significant limitation of n8n's native GitHub node, which only supports single-file uploads at a time. By leveraging GitHub's Git Data API, this workflow creates a new Git tree containing multiple files, commits this tree, and updates the target branch—all in a single automated process. The workflow is particularly valuable for automation scenarios that require batch file operations, such as deploying website updates, publishing documentation, or maintaining configuration files across repositories. It eliminates the need for multiple separate API calls when working with multiple files, making your automation more efficient and less prone to partial update issues. By abstracting the complexities of GitHub's Git Data API into a reusable workflow, it provides a practical solution for developers, content managers, and DevOps professionals who need to programmatically manage repository content at scale. Who is this for? This workflow is designed for: Developers and DevOps engineers who need to automate file updates in GitHub repositories Content managers who regularly publish multiple files to GitHub-hosted websites or documentation Automation specialists looking to integrate GitHub operations into larger workflows Teams using n8n for CI/CD processes who need to push code or configuration changes Users should have basic familiarity with GitHub concepts (repositories, branches, commits) and should be comfortable obtaining and using GitHub Personal Access Tokens. While the workflow handles the API complexity, users should understand the fundamentals of version control to effectively utilize and customize it. What problem is this workflow solving? This workflow addresses several key challenges: Limited batch operations: n8n's native GitHub node only supports uploading one file at a time, making multi-file operations cumbersome and inefficient. API complexity: GitHub's Git Data API requires multiple sequential calls with interdependent data to create commits with multiple files, which is complex to implement manually. Automation bottlenecks: Without this workflow, automating multi-file updates would require either multiple separate API calls (risking partial updates) or custom scripting outside of n8n. Consistency issues: When files need to be updated together (e.g., code and corresponding documentation), this workflow ensures they're committed in a single atomic operation. By solving these issues, the workflow enables reliable, atomic updates of multiple files, maintaining repository consistency and simplifying automation processes. What this workflow does Overview This workflow uses GitHub's REST API to push multiple files to a repository in a single operation. It follows Git's internal model by: Retrieving the current state of the repository Creating a new tree with the files to be added or updated Creating a new commit with this tree Updating the branch reference to point to the new commit Process Initialization: The workflow starts with a manual trigger and sets up GitHub credentials and repository information. File Content Definition: Two "Set" nodes define the content for the files to be uploaded. Repository State Retrieval: The workflow fetches the latest commit SHA for the specified branch It then retrieves the base tree SHA from this commit Tree Creation: A new Git tree is created that includes both files (file1.txt and file2.txt), specifying their paths and content. Commit Creation: A new commit is created with the specified commit message, referencing the new tree and the parent commit. Branch Update: Finally, the branch reference is updated to point to the new commit, making the changes visible in the repository. Setup To use this workflow: Import the workflow: Download the workflow JSON and import it into your n8n instance. Create a GitHub Personal Access Token: Go to GitHub Settings → Developer Settings → Personal Access Tokens → Fine-grained tokens Create a new token with "Contents" permission (Read and write) for your target repository Configure the workflow: Update the "Set Github Info" node with: Your GitHub Personal Access Token Your GitHub username Your repository name The target branch (default is "main") A commit message Define file content: Modify the "File 1" and "File 2" nodes with the content you want to upload Adjust file paths if needed: In the "Create new tree" node, update the file paths if you want to change where the files are stored in the repository Save and run the workflow: Click "Test workflow" to execute the process. How to customize this workflow to your needs This workflow can be adapted in several ways: Add more files: Create additional "Set" nodes for more file content In the "Create new tree" node, add more tree entries following the same pattern (path, mode, type, content) Change file locations: Modify the "path" parameters in the "Create new tree" node to place files in different directories Dynamic file content: Replace the static content in the "File" nodes with data from other sources Use previous nodes or HTTP requests to generate file content dynamically Conditional file updates: Add IF nodes to determine which files should be updated based on certain conditions Create separate branches in your workflow for different update scenarios Scheduled updates: Replace the manual trigger with a Schedule node to run the workflow at specific intervals Combine with other triggers like Webhook or database events to push files when certain events occur Error handling: Add Error Trigger nodes to handle potential API failures Implement notification nodes to alert you of successful pushes or failures
by ist00dent
This n8n template allows you to instantly generate QR codes from any text or URL by simply sending a webhook request. It's a versatile tool for creating dynamic QR codes for various purposes, from marketing campaigns to event registrations, directly integrated into your automated workflows. 🔧 How it works Receive Data Webhook: This node acts as the entry point for the workflow. It listens for incoming POST requests and expects a JSON body with a data property containing the text or URL you want to encode into the QR code. Generate QR Code: This node makes an HTTP GET request to the QR Server API (api.qrserver.com) to generate the QR code image. The content from your webhook is passed as the data parameter to the API. Respond with QR Code: This node sends the response from the QR Server API back to the service that initiated the webhook. The QR Server API directly returns the image data, so your webhook response will be the QR code image itself. 👤 Who is it for? This workflow is ideal for: Marketers: Generate QR codes for product links, event registrations, or promotional materials on the fly. Developers: Integrate QR code generation into applications, websites, or internal tools. Event Organizers: Create dynamic QR codes for ticketing, information access, or check-ins. Businesses: Streamline processes requiring physical-to-digital transitions, like menu access or contact sharing. Automation Enthusiasts: Add QR code generation capabilities to any workflow. 📑 Data Structure When you trigger the webhook, send a POST request with a JSON body structured as follows: { "data": "https://www.yourwebsite.com/your-specific-page-or-text-to-encode" } The workflow will return the QR code image directly in the response. ⚙️ Setup Instructions Import Workflow: In your n8n editor, click "Import from JSON" and paste the provided workflow JSON. Configure Webhook Path: Double-click the Receive Data Webhook node. In the 'Path' field, set a unique and descriptive path (e.g., /generate-qr). Customize QR Code (Optional): Double-click the Generate QR Code node. You can adjust the size parameter in the URL (e.g., size=200x200 for a larger QR code) or add other parameters supported by the QR Server API (e.g., bgcolor, color, qzone). Activate Workflow: Save and activate the workflow. 📝 Tips Handling the Image Output: Since the QR Server API directly returns the image, the webhook response will be the image data. Depending on your use case, you might want to: Save to File/Cloud: Insert a node (e.g., Write Binary File, Amazon S3, Google Drive) after Generate QR Code to save the image to a file system or cloud storage. Embed in HTML/Email: If you're building an HTML response or sending an email, you might need to convert the image data to a Base64 string or provide a URL to a saved image. Error Handling: Enhance workflow robustness by adding an Error Trigger node. This allows you to catch any issues during QR code generation and set up notifications or logging. Dynamic Size/Color: You can extend the Receive Data Webhook to accept parameters for size, color, or bgcolor in the incoming JSON. Then, dynamically pass these to the url of the Generate QR Code node to create highly customizable QR codes. Input Validation: For more advanced use cases, you could add a Function node after the webhook to validate the incoming data to ensure it's in a valid format (e.g., a URL).
by David Olusola
n8n Set Node Tutorial - Complete Guide 🎯 How It Works This tutorial workflow teaches you everything about n8n's Set node through hands-on examples. The Set node is one of the most powerful tools in n8n - it allows you to create, modify, and transform data as it flows through your workflow. What makes this tutorial special: Progressive Learning**: Starts simple, builds to complex concepts Interactive Examples**: Real working nodes you can modify and test Visual Guidance**: Sticky notes explain every concept Branching Logic**: Shows how Set nodes work in different workflow paths Real Data**: Uses practical examples you'll encounter in automation The workflow demonstrates 6 core concepts: Basic data types (strings, numbers, booleans) Expression syntax with {{ }} and $json references Complex data structures (objects and arrays) "Keep Only Set" option for clean outputs Conditional data setting with branching logic Data transformation and aggregation techniques 📋 Setup Steps Step 1: Import the Workflow Copy the JSON from the code artifact above Open your n8n instance in your browser Navigate to Workflows section Click "Import from JSON" or the import button (usually a "+" or import icon) Paste the JSON into the import dialog Click "Import" to load the workflow Save the workflow (Ctrl+S or click Save button) Step 2: Choose Your Starting Point Option A: Default Tutorial Mode (Recommended for beginners) The workflow is ready to run as-is Uses simple "Welcome" message as starting data Click "Execute Workflow"** to begin Option B: Rich Test Data Mode (Recommended for experimentation) Locate the nodes: Find "Start (Manual Trigger)" and "0. Test Data Input" Disconnect default: Click the connection line between "Start (Manual Trigger)" → "1. Set Basic Values" and delete it Connect test data: Drag from "0. Test Data Input" output to "1. Set Basic Values" input Execute: Click "Execute Workflow" to run with rich test data Step 3: Execute and Learn Run the workflow: Click the "Execute Workflow" button Check outputs: Click on each node to see its output data Read the notes: Each sticky note explains what's happening Follow the flow: Data flows from left to right, top to bottom Step 4: Experiment and Modify Try These Experiments: 🔧 Change Basic Values: Click on "1. Set Basic Values" Modify user_age (try 20 vs 35) Change user_name to see how it propagates Execute and see the changes flow through 📊 Test Conditional Logic: Set user_age to 20 → triggers "Student Discount" path Set user_age to 30 → triggers "Premium Access" path Watch how the workflow branches differently 🎨 Modify Expressions: In "2. Set with Expressions", try changing: ={{ $json.score * 2 }} to ={{ $json.score * 3 }} ={{ $json.user_name }} Smith to ={{ $json.user_name }} Johnson 🏗️ Complex Data Structures: In "3. Set Complex Data", modify the JSON structure Add new properties to the user_profile object Try nested expressions 🎓 Learning Path Beginner Level (Nodes 1-2) Focus**: Understanding basic Set operations Learn**: Data types, static values, simple expressions Time**: 10-15 minutes Intermediate Level (Nodes 3-4) Focus**: Complex data and output control Learn**: Objects, arrays, "Keep Only Set" option Time**: 15-20 minutes Advanced Level (Nodes 5-6) Focus**: Conditional logic and data aggregation Learn**: Branching workflows, merging data, complex expressions Time**: 20-25 minutes 🔍 What Each Node Teaches | Node | Concept | Key Learning | |------|---------|-------------| | 1. Set Basic Values | Data Types | String, number, boolean basics | | 2. Set with Expressions | Dynamic Data | {{ }} syntax, $json references, $now functions | | 3. Set Complex Data | Advanced Structures | Objects, arrays, nested properties | | 4. Set Clean Output | Data Management | "Keep Only Set" for clean final outputs | | 5a/5b. Conditional Sets | Branching Logic | Different data based on conditions | | 6. Tutorial Summary | Data Aggregation | Combining and summarizing workflow data | 💡 Pro Tips 🚀 Quick Wins: Always check node outputs after execution Use sticky notes as your learning guide Experiment with small changes first Copy nodes to try variations 🛠️ Advanced Techniques: Use Keep Only Set for API responses Combine static and dynamic data in complex objects Leverage conditional paths for different user types Reference nested object properties with dot notation 🐛 Troubleshooting: If expressions don't work, check the {{ }} syntax Ensure field names match exactly (case-sensitive) Use the expression editor for complex logic Check data types match your expectations 🎯 Next Steps After Tutorial Create your own Set nodes in a new workflow Practice with real data from APIs or databases Build data transformation workflows for your specific use cases Combine Set nodes with other n8n nodes like HTTP, Webhook, etc. Explore advanced expressions using JavaScript functions Congratulations! You now have the foundation to use Set nodes effectively in any n8n workflow. The Set node is truly the "Swiss Army knife" of n8n automation! 🛠️