by Lucas Peyrin
How it works This workflow is a hands-on tutorial for the Code node in n8n, covering both basic and advanced concepts through a simple data processing task. Provides Sample Data: The workflow begins with a sample list of users. Processes Each Item (Run Once for Each Item): The first Code node iterates through each user to calculate their fullName and age. This demonstrates basic item-by-item data manipulation using $input.item.json. Fetches External Data (Advanced): The second Code node showcases a more advanced feature. For each user, it uses the built-in this.helpers.httpRequest function to call an external API (genderize.io) to enrich the data with a predicted gender. Processes All Items at Once (Run Once for All Items): The third Code node receives the fully enriched list of users and runs only once. It uses $items() to access the entire list and calculate the averageAge, returning a single summary item. Create a Binary File: The final Code node gets the fully enriched list of users once again and creates a binary CSV file to show how to use binary data Buffer in JavaScript. Set up steps Setup time: < 1 minute This workflow is a self-contained tutorial and requires no setup. Explore the Nodes: Click on each of the Code nodes to read the code and the comments explaining each step, from basic to advanced. Run the Workflow: Click "Execute Workflow" to see it in action. Check the Output: Click on each node after the execution to see how the data is transformed at each stage. Notice how the data is progressively enriched. Experiment! Try changing the data in the 1. Sample Data node, or modify the code in the Code nodes to see what happens.
by Rodrigue Gbadou
What this workflow does This n8n workflow collects client feedback through a form (Tally, Typeform, or Google Forms) and uses AI to analyze it. It automatically generates a summary of the positive points, highlights areas for improvement, and drafts a short social media post based on the feedback. Ideal for: Freelancers Customer support teams Online service providers Coaches and educators Setup steps Connect your form tool to the Webhook node (POST method) and make sure it sends a feedback field. Add your DeepSeek (or other GPT-compatible) API key to the AI request node. Configure the email node with your SMTP credentials and desired recipient address. Replace the Telegram node with Slack, Buffer, or another integration if you prefer. (Optional) Customize the prompt in the function node for different tone/language. ๐ Estimated setup time: ~15 minutes ๐ฌ Sticky notes are included and clearly positioned to guide you. Technologies used n8n Webhook node n8n Function node DeepSeek Chat or compatible AI API Email node (SMTP) Telegram node (or other integration) Sticky Notes for setup guidance Use cases Analyze feedback from onboarding or satisfaction surveys Create ready-to-publish social media content from real customer praise Help support or marketing teams act on feedback immediately
by Jihene
AI-Agent Code Review for GitHub Pull Requests Description: This n8n workflow automates the process of reviewing code changes in GitHub pull requests using an OpenAI-powered agent. It connects your GitHub repo, extracts modified files, analyzes diffs, and uses an AI agent to generate a code review based on your internal code best practices (fed from a Google Sheet). It ends by posting the review as a comment on the PR and tagging it with a visual label like โ Reviewed by AI. ๐ง What It Does Triggered on PR creation Extracts code diffs from the PR Formats and feeds them into an OpenAI prompt Enriches the prompt using a Google Sheet of Swift best practices Posts an AI-generated review as a comment on the PR Applies a PR label to visually mark reviewed PRs โ Prerequisites Before deploying this workflow, ensure you have the following: n8n Instance (Self-hosted or Cloud) GitHub Repository with PR activity OpenAI API Key** for GPT-4o, GPT-4-turbo, or GPT-3.5 GitHub OAuth App** (or PAT) connected to n8n to post comments and access PR diffs (Optional) Google Sheets API credentials if using the code best practices lookup node. โ๏ธ Setup Instructions 1. Import the Workflow in n8n, click on Workflows โ Import from file or JSON Paste or upload the JSON code of this template 2. Configure Triggers and Connections ๐ GitHub Trigger Node**: PR Trigger Repository**: Select the GitHub repo(s) to monitor Events**: Set to pull_request Auth**: Use GitHub OAuth2 credentials ๐ฅ HTTP Request Node: Get file's Diffs from PR No authentication needed; it uses dynamic path from trigger ๐ง OpenAI Model Node**: OpenAI Chat Model Model**: Select gpt-4o, gpt-4-turbo, or gpt-3.5-turbo Credential**: Provide your OpenAI API Key ๐งโ๐ป Code Review Agent Node : Code Review Agent Connected to OpenAI and optionally to tools like Google Sheets ๐ฌ GitHub Comment Poster Uses GitHub API to post review comments back on PR Node: GitHub Robot Credential: Use the agent Github account (OAuth or PAT) Repo : Pick your owen Github Repository ๐ท๏ธ PR Labeler (optional) Adds label ReviewedByAI after successful comment Node: Add Label to PR Label : you ca customize the label text of your owen tag. ๐ Google Sheet Best Practices config (optional) Connects to a Google Sheet for coding guideline lookups, we can replace Google sheet by another tool or data base First prepare your best practices list with the clear description and the code bad/good examples Add al the best practices in your Google Sheet Configure* the Code *Best Practices node** in the template : Credential : Use your Google Sheet account by OAuth2 URL : Add your Google Sheet document URL Sheet : Add the name of the best practices sheet
by Easy8.ai
This workflow sends an automatic daily summary of your Microsoft Outlook calendar events into a Microsoft Teams channel. Perfect for team visibility or personal reminders. This automation is ideal for team leads, project managers, and remote workers who need to keep stakeholders informed of scheduled events without manual effort. It saves time, ensures consistent communication, and reduces the chance of missing important meetings. How it works Scheduled Trigger The workflow runs automatically every midnight (00:00 UTC). Create filter for "TODAY" value (Code Node) The code node generates the date value for "today" Calculates UTC start and end of the current day Builds a Microsoft Graph-compatible filter string Microsoft Outlook Node: Get Todayโs Events Resource : Event Operation : Get Many Uses {{ $json.filter }}, which is generated from today's date, to retrieve only relevant entries Format Events as HTML (Code Node) Code node transforms each event into a formatted HTML message Meeting Time: 2025-07-08T10:00:00Z Subject: Weekly Sync Summary: Discuss project milestones and blockers. Microsoft Teams Node: Send Summary Message Chat Message | Create | Selected Channel | HTML content Uses the htmlMessage field from the previous node as the message body How to Use Import the Workflow Load the .json file into your n8n instance via โImport from Fileโ or directly via the workflow UI. Set Up Credentials Go to Credentials in n8n. Add or configure your Microsoft Outlook OAuth2 API credential. Add or configure your Microsoft Teams OAuth2 API credential. Assign these credentials to the corresponding nodes in the workflow. Adjust Timezone and Schedule Edit the Schedule Trigger node to reflect your local timezone or preferred time. Configure the Microsoft Outlook Node Ensure the correct Outlook calendar is targeted. Confirm the Get Many node includes this expression in the filter field: {{ $json.filter }} Customize the HTML Output (Optional) Open the โFormat Eventsโ Code node to: Add new fields like Location, Organizer, or Attendees. Adjust date formatting to local time if needed. Target the Correct Teams Channel Open the Microsoft Teams node, select the team and channel where messages should be posted. Message type must be set to HTML if sending formatted content. Test the Workflow Run it manually to verify: Events are fetched correctly. The message is well-formatted and appears in the correct Teams channel. If you see no events, double-check the date filter logic or ensure events exist for today. Example Use Cases Team Syncs**: Automatically notify your project channel every morning with today's meetings. Remote Work**: Help remote teams stay aligned on shared calendars. Personal Assistant**: Keep track of your own dayโs agenda with an automatic Teams message. Requirements Microsoft Outlook** Account must have permission to access calendar events via Graph API. OAuth2 credential must be configured in n8n Credential Manager. Microsoft Teams** Requires permission to post messages to specific channels. OAuth2 credential must be configured and authorized.
by Yaron Been
Automated system for monitoring and analyzing competitor activities, funding rounds, and market movements using CrunchBase data. ๐ What It Does Tracks competitor funding rounds Monitors leadership changes Analyzes investment patterns Identifies new market entries Tracks product launches ๐ฏ Perfect For Startup founders Business strategists Market analysts Investment professionals Corporate development โ๏ธ Key Benefits โ Competitive intelligence โ Early warning system โ Market trend analysis โ Strategic insights โ Time-saving automation ๐ง What You Need CrunchBase API access n8n instance Google Sheets (for data storage) Notification preferences ๐ Tracking Metrics Funding amounts and rounds Investor networks Hiring trends Market expansion Product updates ๐ ๏ธ Setup & Support Quick Setup Start tracking in 20 minutes with our step-by-step guide ๐บ Watch Tutorial ๐ผ Get Expert Support ๐ง Direct Help Gain a competitive edge with automated tracking and analysis of your competitors' activities and strategies.
by Airtop
Extracting Comments from an X Post Use Case Engaging with conversations on X (formerly Twitter) is critical for brands and individuals monitoring sentiment, leads, or emerging trends. Manually collecting comments is time-consumingโthis automation enables scalable extraction of comment data to inform your outreach or analysis. What This Automation Does This automation extracts comments from a specified X post, with the following input parameters: airtop_profile**: The name of your Airtop Profile connected to X. x_post_url**: The URL of the X post to extract comments from. max_number_of_comments**: The maximum number of comments to retrieve. How It Works Takes input via a form or another workflow. Normalizes the input values. Creates a new browser session using Airtop. Navigates to the provided X post. Uses a prompt to extract up to the specified number of comments, returning: Author name Author profile URL Comment text Setup Requirements Airtop API Key โ free to generate. An Airtop Profile connected to X (requires one-time login). Next Steps Pair with X Monitoring**: Use this with the X monitoring automation to detect relevant posts and extract discussion context automatically. Feed into Analytics**: Combine with summarization or sentiment analysis tools to understand audience response at scale. Export for CRM/BI**: Pipe the structured comment data into your CRM or business intelligence stack for lead tracking or reporting. Read more about Extracting Comments from X Posts
by TechDennis
Edit an existing image with OpenAI ImageGen1 via API Request Transform your creative pipeline by letting n8n call OpenAI ImageGen1โs edit image endpoint, automatically replacing or augmenting parts of any image you supply and returning a brand-new version in seconds. Designers, marketers, and product teams can eliminate repetitive manual edits and test more variations, faster. Who is this for? Content creators who need quick, on-brand image tweaks Marketers running A/B visual tests at scale Developers exploring the new ImageGen1 API inside low-code automations Use case / problem solved Opening design software to mask, fill, or swap objects is slow and error-prone. This workflow feeds an input image plus a prompt to OpenAI ImageGen1, receives the edited output, and passes it on to any service you likeโperfect for bulk-editing product shots, social visuals, or UI mocks. What this workflow does Read or receive the source image (Webhook โ Binary Data). Call OpenAI ImageGen1 with an HTTP Request node, sending the image and edit prompt. Parse the JSON response to capture the returned image URL. Download & hand off the edited file (e.g., upload to S3, post to Slack, or store in Drive). Setup Add your OpenAI API key in the API KEY node. Follow the notes on the workflow for more information. (Optional) Point the final node to your preferred storage or chat tool. > ๐ A sticky note in the workflow summarizes these steps and links to the OpenAI documentation. How to customize this workflow Trigger alternatives**: Replace the Chat with Google Drive, Airtable, etc. Chained edits**: Loop the output back for successive prompts. Conditional flows**: Add an If node to branch actions by image size or category. With renamed nodes, color-coded sticky notes, and a concise setup guide, youโll be editing images via OpenAI ImageGen1 in under five minutesโno code, maximum creativity.
by The O Suite
This n8n workflow automates website security audits. It combines direct website scanning, threat intelligence from AlienVault OTX, and advanced analysis from an OpenAI large language model (LLM) to generate and email a comprehensive security report. How it Works (Workflow Flow): Input: A user provides a website URL via a simple web form. Data Collection: An HTTP Request node visits the provided URL to gather initial data (status code, headers). An AlienVault HTTP Request node queries AlienVault OTX for known threats associated with the website's hostname. Data Preparation (Prepare Data for AI): A custom code node consolidates the collected website data and AlienVault intelligence, performing initial checks for common issues (e.g., error codes, missing security headers, AlienVault warnings). AI Analysis (Security Configuration Audit): The prepared data is sent to an OpenAI Chat Model, which acts as a cybersecurity expert. The AI analyzes the data to identify vulnerabilities, explain their impact, suggest exploitation methods, and outline mitigation steps. Report Formatting (Format Report for Email): Another custom code node takes the AI's plain-text report and converts it into a structured HTML format suitable for email. Delivery (Send Security Report): The final HTML report is sent via Gmail to a specified email address. Setup Steps: To use this workflow, you'll need an n8n instance and the following credentials: n8n Instance: Ensure your n8n environment is running. OpenAI API Key: Generate a key from OpenAI. Add an "OpenAI API" credential in n8n (e.g., "OpenAI account"). AlienVault OTX API Key: Obtain a key from your AlienVault OTX profile. Add an "AlienVault OTX API" credential in n8n (e.g., "AlienVault account"). Gmail Account: Set up a "Gmail OAuth2" credential in n8n for sending emails (recommended for security; involves Google Cloud setup). Import Workflow: Copy the workflow's JSON code. In n8n, import the workflow via "Workflows" > "New" > "Import from JSON". Configure Recipient: In the "Send Security Report" node, specify the email address where reports should be sent. Activate: Enable the workflow to start processing submissions. Once activated, access the "On form submission" webhook URL to input a URL and trigger an audit.
by Airtop
Define Your ICP from Customer LinkedIn Profiles Use Case This automation helps marketing and sales teams define their Ideal Customer Profile (ICP) using real LinkedIn profiles of current high-fit customers. By enriching and analyzing profile data, it generates a clear ICP definition and scoring methodology for future targeting. What This Automation Does This automation analyzes LinkedIn profiles of your existing customers and produces: A structured ICP definition A scoring model to evaluate future prospects A Google Boolean search string to find similar prospects Input: LinkedIn profile URLs of existing high-fit customers (e.g., https://www.linkedin.com/in/amirashkenazi/) Output: A Google Doc containing the ICP analysis and scoring methodology How It Works Trigger: Waits for a chat message containing one or more LinkedIn profile URLs. AI Agent: Parses and processes the URLs. Airtop Data Enrichment: Uses Airtop to extract structured information from each LinkedIn profile (e.g., job title, company, experience, skills). Memory: Maintains state between inputs for consistent analysis. LLM Analysis: Uses Claude 3.7 Sonnet to synthesize enriched data into a meaningful ICP. Google Docs: Automatically creates a new doc with a timestamped title and appends the ICP definition. Setup Requirements Airtop Profile connected to LinkedIn, Insert the profile name in the Airtop Tool Airtop API credentials. Get it free here If you choose to activate saving the profiles in Google Docs you will need OAuth2 credentials (or just copy the ICP definition from the chat) Next Steps Use the ICP for Scoring**: Feed new LinkedIn profiles through the same Airtop enrichment and use the scoring function to evaluate fit. Automate Target Discovery**: Plug the Boolean search output into LinkedIn, Google, or People Data Labs for ICP-matching lead generation. Refine Continuously**: Repeat the workflow as your customer base grows or segments evolve. Read more about how to Define ICP from Customer Examples
by shepard
Overview This workflow leverages the LangChain code node to implement a fully customizable conversational agent. Ideal for users who need granular control over their agent's prompts while reducing unnecessary token consumption from reserved tool-calling functionality (compared to n8n's built-in Conversation Agent). Setup Instructions Configure Gemini Credentials: Set up your Google Gemini API key (Get API key here if needed). Alternatively, you may use other AI provider nodes. Interaction Methods: Test directly in the workflow editor using the "Chat" button Activate the workflow and access the chat interface via the URL provided by the When Chat Message Received node Customization Options Interface Settings: Configure chat UI elements (e.g., title) in the When Chat Message Received node Prompt Engineering: Define agent personality and conversation structure in the Construct & Execute LLM Prompt node's template variable โ ๏ธ Template must preserve {chat_history} and {input} placeholders for proper LangChain operation Model Selection: Swap language models through the language model input field in Construct & Execute LLM Prompt Memory Control: Adjust conversation history length in the Store Conversation History node Requirements: โ ๏ธ This workflow uses the LangChain Code node, which only works on self-hosted n8n. (Refer to LangChain Code node docs)
by Aurรฉlien P.
๐ Daily Crypto Market Summary Bot (Binance to Telegram) This workflow fetches 24h price change data from Binance for selected crypto pairs (BTC/USDC, ETH/USDC, SOL/USDC) every hour using a cron schedule. It performs in-depth analysisโincluding volatility, volume, bid-ask spread, momentum, and market comparisonโthen formats a detailed market summary. The final report is sent to a Telegram chat using HTML formatting, highlighting top gainers, losers, and key metrics in a clean, readable layout. ๐ Key Features โฑ Runs every hour (cron: 5 * * * *) ๐ Filters and analyzes major coins: BTC, ETH, SOL ๐ Calculates market metrics: Volatility Bid-ask spread Momentum Estimated market cap Market average comparison ๐ Highlights gainers, losers, and top coins by volume โ๏ธ Splits messages to fit Telegramโs 4096 character limit ๐ฌ Sends output in rich HTML format to a Telegram group or chat ๐ฏ Use Cases โ Crypto traders wanting hourly performance insights โ Telegram groups needing automated market updates โ Analysts monitoring key coin metrics in real-time โ Bot developers creating crypto dashboards or alerts ๐ Technical Details Data Source:** Binance 24hr ticker API (/api/v3/ticker/24hr) Coins Monitored:** BTCUSDC, ETHUSDC, SOLUSDC (can be expanded) Metrics Calculated:** Price change percentage Volatility (high vs low price) Bid-ask spread % Momentum (vs weighted average) Estimated market cap Number of trades Market average movement Message Format:** HTML with emojis, bold styling, and section headings Auto-split messages when exceeding Telegram's 4096-char limit Error Handling:** Retry on HTTP failure (up to 5 times with 5s delay) Message length checked and split for Telegram compatibility โ๏ธ Setup Requirements Telegram Bot Token โ Create a bot via @BotFather on Telegram Chat ID โ Use a personal ID or group chat ID (add the bot to the group) n8n Instance โ Either cloud or self-hosted (Optional) Modify relevantSymbols in the Function node to track different coins ๐ง Notes This workflow is highly customizableโfeel free to modify the analytics, tracked pairs, or formatting. Great base for alerting systems or crypto dashboards. ๐ท Example Output (Telegram) ๐ Crypto Market Summary โ 2025-04-20 14:05:05 UTC ๐ Market Overview (BTC, ETH, SOL) Average Change: -1.54% 24h Volume: $850,358,765.46 Most Volatile: SOLUSDC (4.53%) Most Liquid: BTCUSDC (0.0000% spread) ๐น Top by Volume ETHUSDC: $403,860,356.75 | -1.640% SOLUSDC: $279,241,338.60 | -1.706% BTCUSDC: $167,257,070.12 | -1.261% ๐ Losers SOLUSDC ๐ป Change: -1.71% (24h) ๐ฐ Current: $137.10 ๐ Range: $135.82 - $141.97 ๐ Volatility: 4.53% ๐ Volume: 2.01M | $279,241,338.60 โ๏ธ Bid-Ask Spread: 0.0073% โฌ๏ธ vs Market Avg: -0.17% ๐ฝ Momentum: -1.42% ๐ข Trades: 366,119 ETHUSDC ๐ป Change: -1.64% (24h) ๐ฐ Current: $1,577.42 ๐ Range: $1,565.60 - $1,631.98 ๐ Volatility: 4.24% ๐ Volume: 252.11K | $403,860,356.75 โ๏ธ Bid-Ask Spread: 0.0044% โฌ๏ธ vs Market Avg: -0.10% ๐ฝ Momentum: -1.53% ๐ข Trades: 596,801 BTCUSDC ๐ป Change: -1.26% (24h) ๐ฐ Current: $84,336.65 ๐ Range: $83,963.35 - $85,634.50 ๐ Volatility: 1.99% ๐ Volume: 1.97K | $167,257,070.12 โ๏ธ Bid-Ask Spread: 0.0000% โญ vs Market Avg: 0.27% ๐ฝ Momentum: -0.68% ๐ข Trades: 124,202
by Manu
How it works Weekly triggered Fetches all previous executions of a given workflow Filter for failures and aggregate them into a single report Sends them to a given Telegram chat. Set up steps Create a new N8N api token in the settings panel. Add new N8N credentials in the credentials panel. Add new Telegram credentials in the credentials panel. Select N8N credentials and select the workflow ID in the "Get all previous executions" node. Select Telegram credentials and enter the chat-id in the "Telegram" node.