├── Automated-Linkedin-Post-FromX ├── News Posts.xlsx └── README.md ├── Real-Life-Login-System ├── Login Sample Sheet.xlsx ├── README.md └── Real_Life_Login_System.json ├── Deep Research └── Deep Research - Sheet1.csv ├── README.md ├── LICENSE ├── Gmail-Label-Optimiser ├── README.md └── Gmail_Optimiser.json ├── Competitor-Analysis-Linkedin-Post ├── README.md └── competitor-analysis-linkedin-post.json ├── Personal-Assistant-Video ├── Youtube Agent (architjn.com).json ├── Architjn.com Agent.json └── Youtube Knowledge (architjn).json ├── Cold-Mailing-v0.1 ├── README.md └── Cold_Mailing.json ├── ElevenLabs-Chatbot └── Website_Chatbot_Elevenlabs.json ├── Lead-Gen-Copy └── Get Leads for Free.json └── HackerNews Trending Product └── HN_Top_Product.json /Automated-Linkedin-Post-FromX/News Posts.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/architjn/n8n-workflows/HEAD/Automated-Linkedin-Post-FromX/News Posts.xlsx -------------------------------------------------------------------------------- /Real-Life-Login-System/Login Sample Sheet.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/architjn/n8n-workflows/HEAD/Real-Life-Login-System/Login Sample Sheet.xlsx -------------------------------------------------------------------------------- /Deep Research/Deep Research - Sheet1.csv: -------------------------------------------------------------------------------- 1 | Search Topic,Title,Introduction,Chapter 1,Chapter 2,Chapter 3,Chapter 4,Chapter 5,Topic 1 Sources,Topic 1 Sections,Topic 1 Content,Topic 2 Sources,Topic 2 Sections,Topic 2 Content,Topic 3 Sources,Topic 3 Sections,Topic 3 Content,Topic 4 Sources,Topic 4 Sections,Topic 4 Content,Topic 5 Sources,Topic 5 Sections,Topic 5 Content,Sources,ToC,Final -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # n8n Workflows Collection 2 | 3 | This repository contains various workflow automations built using n8n. 4 | 5 | ## Workflows 6 | 7 | * **[Cold Mailing v0.1](./Cold-Mailing-v0.1/README.md):** An automated workflow for generating and sending personalized cold emails using AI and Airtable. 8 | 9 | Feel free to explore the individual workflow directories for their specific README files and `.json` configurations. 10 | 11 | ## License 12 | 13 | This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. 14 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Gmail-Label-Optimiser/README.md: -------------------------------------------------------------------------------- 1 | # Gmail Label Optimiser n8n Workflow 2 | 3 | This workflow automates the process of classifying and organizing your Gmail inbox by intelligently labeling emails using AI, making it easier to manage and prioritize your messages. 4 | 5 | ## Overview 6 | 7 | The workflow operates in several key steps: 8 | 1. **Email Trigger:** Automatically triggers on new emails received in your Gmail inbox. 9 | 2. **AI Classification:** Uses an AI text classifier to analyze the content and subject of each email, categorizing it into predefined types (e.g., Marketing, Stock Updates, Newsletter, Security Alert, etc.). 10 | 3. **Label Management:** Checks if the appropriate label exists in Gmail; if not, it creates the label. 11 | 4. **Label Application:** Applies the correct label to the email thread, organizing your inbox in real time. 12 | 13 | ## Features 14 | 15 | * Automatically classifies incoming emails into categories such as Marketing, Stock Updates, Newsletter, Security Alert, Payment Receipt, and more. 16 | * Uses AI (OpenRouter GPT-4.1-nano or compatible) for accurate email content classification. 17 | * Creates new Gmail labels on the fly if they do not already exist. 18 | * Applies the correct label to each email thread for streamlined inbox management. 19 | * Fully automated and runs continuously in the background. 20 | 21 | ## Prerequisites 22 | 23 | 1. **Gmail Account:** 24 | * Gmail account with OAuth2 credentials configured in n8n. 25 | 2. **n8n Instance:** 26 | * Self-hosted or n8n Cloud account. 27 | 3. **AI Provider:** 28 | * OpenRouter (or compatible) API credentials for the AI classification node. 29 | 30 | ## Setup 31 | 32 | 1. **Import Workflow:** Import the `Gmail_Optimiser.json` file into your n8n instance. 33 | 2. **Configure Credentials:** 34 | * Add Gmail OAuth2 credentials in n8n and select them in all Gmail nodes. 35 | * Add your OpenRouter (or compatible) API credentials for the AI classification node. 36 | 3. **Review Node Settings:** 37 | * Double-check all node settings, especially credentials and field mappings, to match your Gmail and AI provider setup. 38 | 4. **Activate Workflow:** 39 | * Save and activate the workflow in n8n. It will run automatically on new incoming emails. 40 | 41 | ## Usage 42 | 43 | 1. **Enable Workflow:** Ensure the workflow is active in n8n. 44 | 2. **Automatic Operation:** 45 | * The workflow will trigger on every new email received. 46 | * Each email is analyzed and classified by the AI model. 47 | * The appropriate label is created (if needed) and applied to the email thread. 48 | 3. **Inbox Management:** 49 | * Check your Gmail inbox for automatically organized and labeled emails. 50 | 51 | ## Workflow Structure 52 | 53 | * **Trigger Path:** `Gmail Trigger` -> `Text Classifier (AI)` -> `Set Category Nodes` -> `Merge` -> `Gmail (Get/Create Label)` -> `Filter` -> `Switch` -> `Create Label (if needed)` -> `Apply Label` 54 | * **AI Model:** OpenRouter GPT-4.1-nano (or compatible) is used for email classification. 55 | * **Label Management:** Labels are created and applied dynamically based on classification results. 56 | 57 | ## Cost Considerations (Potentially Free) 58 | 59 | This workflow can be run essentially for free, depending on the usage volume and chosen services: 60 | 61 | * **n8n:** Can be self-hosted or used via n8n Cloud (free tier available). If you're new to n8n, you can check it out here: [n8n (affiliate)](https://architjn.com/r/n8n) 62 | * **Gmail:** Free for personal use within Google account limits. 63 | * **OpenRouter/AI Provider:** May incur costs depending on API/model usage; check your provider's pricing. 64 | 65 | **Note:** Costs may be incurred if you exceed free tier limits of any service or use paid AI models. 66 | 67 | ## Customization 68 | 69 | * **Changing Categories:** 70 | * Edit the categories in the AI classification node to match your personal or business needs. 71 | * **Changing AI Models:** 72 | * Swap out the OpenRouter node for your preferred AI provider and adjust prompts as needed. 73 | * **Adjusting Label Logic:** 74 | * Modify the workflow to add, remove, or change label application logic as required for your workflow. 75 | 76 | ## License 77 | 78 | This project is licensed under the MIT License - see the [LICENSE](../LICENSE) file for details. 79 | -------------------------------------------------------------------------------- /Competitor-Analysis-Linkedin-Post/README.md: -------------------------------------------------------------------------------- 1 | # Competitor Analysis LinkedIn Post n8n Workflow 2 | 3 | This workflow automates the process of analyzing competitor LinkedIn posts and generating high-performing, founder-style posts for your own DTC clothing brand, using AI and Google Sheets for data management. 4 | 5 | ## Overview 6 | 7 | The workflow operates in three main parts: 8 | 1. **Competitor Data Collection:** Triggered manually, it fetches a list of competitor LinkedIn URLs from Google Sheets, scrapes their recent posts using Apify, and stores the results in another Google Sheet. 9 | 2. **Post Format Analysis:** Uses AI (Anthropic Claude) to analyze competitor posts, extracting popular hook types and post formats. 10 | 3. **Post Generation:** AI generates new, high-performing LinkedIn posts for your brand, mimicking successful formats but tailored to a founder-led, authentic voice. The generated posts are appended to a Google Sheet for review and use. 11 | 12 | ## Features 13 | 14 | * Fetches competitor LinkedIn URLs from Google Sheets. 15 | * Scrapes competitor posts using Apify's LinkedIn Profile Posts API. 16 | * Analyzes post formats and hooks using Anthropic Claude via n8n's LangChain integration. 17 | * Generates 5 high-performing, founder-style LinkedIn posts for your brand, based on competitor insights. 18 | * Stores both the original competitor post and the generated post in Google Sheets for easy review and tracking. 19 | 20 | ## Prerequisites 21 | 22 | 1. **Google Sheets:** 23 | * A Google Sheet containing competitor LinkedIn URLs. 24 | * A Google Sheet to store scraped posts and generated content. 25 | * Google Sheets API credentials configured in n8n. 26 | 2. **Apify:** 27 | * An Apify account and API token for the LinkedIn Profile Posts actor. 28 | 3. **Anthropic Claude (via LangChain):** 29 | * Access to the Claude 3.7 Sonnet model (or similar) via n8n's LangChain nodes. 30 | * API credentials configured in n8n. 31 | 32 | ## Setup 33 | 34 | 1. **Import Workflow:** Import the `competitor-analysis-linkedin-post.json` file into your n8n instance. 35 | 2. **Configure Credentials:** 36 | * Add Google Sheets credentials in n8n and select them in all Google Sheets nodes. 37 | * Add your Apify API token in the HTTP Request node for scraping LinkedIn posts. 38 | * Add Anthropic Claude (or compatible) credentials for the LangChain nodes. 39 | 3. **Prepare Google Sheets:** 40 | * Ensure your input sheet contains a column for LinkedIn URLs. 41 | * Set up output sheets for scraped posts and generated content as referenced in the workflow. 42 | 4. **Review Node Settings:** 43 | * Double-check all node settings, especially document IDs, sheet names, and field mappings, to match your Google Sheets setup. 44 | 5. **Activate Workflow:** 45 | * Save and activate the workflow in n8n. Trigger manually as needed to process new competitors or generate new posts. 46 | 47 | ## Usage 48 | 49 | 1. **Populate Competitor List:** Add competitor LinkedIn URLs to your input Google Sheet. 50 | 2. **Run Workflow:** Manually trigger the workflow in n8n. It will: 51 | * Fetch competitor URLs from Google Sheets. 52 | * Scrape recent posts using Apify. 53 | * Store posts in Google Sheets. 54 | * Analyze post formats and hooks using AI. 55 | * Generate new, founder-style posts for your brand. 56 | * Append both the original and generated posts to your output Google Sheet. 57 | 3. **Review Output:** Check your output Google Sheet for both competitor post examples and your new, AI-generated posts. 58 | 59 | ## Workflow Structure 60 | 61 | * **Manual Trigger Path:** `Manual Trigger` -> `Google Sheets2 (Get Competitor List)` -> `Limit` -> `HTTP Request1 (Apify Scraper)` -> `Limit1` -> `Google Sheets3 (Store Posts)` -> `Analyze Posts - Anthropic` -> `Basic LLM Chain (Generate Posts)` -> `Google Sheets (Store Generated Posts)` 62 | * **AI Models:** Anthropic Claude 3.7 Sonnet (via LangChain) is used for both post analysis and generation. 63 | * **Data Storage:** All input and output is managed via Google Sheets for easy access and review. 64 | 65 | ## Cost Considerations (Potentially Free) 66 | 67 | This workflow can be run essentially for free, depending on the usage volume and chosen services: 68 | 69 | * **n8n:** Can be self-hosted or used via n8n Cloud (free tier available). 70 | * **Google Sheets:** Free for moderate usage within Google account limits. 71 | * **Apify:** Free tier available, but scraping LinkedIn may incur costs depending on volume. 72 | * **Anthropic Claude:** May incur costs depending on API/model usage; check your provider's pricing. 73 | 74 | **Note:** Costs may be incurred if you exceed free tier limits of any service or use paid AI models. 75 | 76 | ## Customization 77 | 78 | * **Changing Data Source:** 79 | * Replace Google Sheets nodes with your preferred data source (e.g., Airtable) and update field mappings accordingly. 80 | * **Changing AI Models:** 81 | * Swap out Anthropic Claude nodes for your preferred AI provider (e.g., OpenAI, Google Gemini) and adjust prompts as needed. 82 | * **Adjusting Output:** 83 | * Modify the output Google Sheet structure or add additional columns as required for your workflow. 84 | -------------------------------------------------------------------------------- /Real-Life-Login-System/README.md: -------------------------------------------------------------------------------- 1 | # Real-Life Login System n8n Workflow 2 | 3 | This workflow implements a real-world login and user management system using Telegram for authentication, Google Sheets for user data storage, and Redis for session management—all orchestrated via n8n. 4 | 5 | ## Overview 6 | 7 | The workflow operates in several main parts: 8 | 1. **Telegram Authentication:** Listens for messages from users via a Telegram bot and uses their chat ID as a unique identifier. 9 | 2. **User Lookup & Registration:** Checks if the user exists in Google Sheets. If not, generates a new user ID and registers the user. 10 | 3. **Session Management:** Uses Redis to cache user sessions for fast lookup and login state management. 11 | 4. **User Data Management:** Stores and retrieves user details (name, Telegram chat ID, etc.) in Google Sheets. 12 | 5. **Workflow Integration:** Supports triggering from other workflows and merging user/session data as needed. 13 | 14 | ## Features 15 | 16 | * Telegram-based login and authentication. 17 | * Google Sheets as a user database (stores user ID, name, Telegram chat ID, etc.). 18 | * Redis for fast session caching and lookup. 19 | * Automatic user registration for new users. 20 | * Easy integration with other n8n workflows. 21 | * Modular design for real-life login and session management scenarios. 22 | 23 | ## Prerequisites 24 | 25 | 1. **Telegram Bot:** 26 | * A Telegram bot and its API token, configured in n8n. 27 | 2. **Google Sheets:** 28 | * A Google Sheet with a `Users` sheet to store user data (UserId, Name, Telegram Chat Id, etc.). 29 | * Google Sheets API credentials configured in n8n. 30 | 3. **Redis:** 31 | * Redis instance and credentials configured in n8n for session caching. 32 | 33 | ## Setup 34 | 35 | 1. **Import Workflow:** Import the `Real_Life_Login_System.json` file into your n8n instance. 36 | 2. **Create Local Redis Instance:** 37 | * If you don't already have Redis running, you can start a local instance for development/testing: 38 | * **On macOS (with Homebrew):** 39 | ```sh 40 | brew install redis 41 | brew services start redis 42 | ``` 43 | * **On Linux:** 44 | ```sh 45 | sudo apt-get install redis-server 46 | sudo service redis-server start 47 | ``` 48 | * **On Windows:** 49 | Download and run from https://github.com/microsoftarchive/redis/releases 50 | * By default, Redis will run on `localhost:6379`. 51 | 3. **Configure Credentials:** 52 | * Add Telegram bot credentials in n8n and select them in the Telegram Trigger node. 53 | * Add Google Sheets credentials for all Google Sheets nodes. 54 | * Add Redis credentials for all Redis nodes (use `localhost:6379` for local development). 55 | 4. **Prepare Google Sheets:** 56 | * Ensure your sheet has columns for UserId, Name, Telegram Chat Id, etc., as referenced in the workflow. 57 | 5. **Review Node Settings:** 58 | * Double-check all node settings, especially document IDs, sheet names, and field mappings, to match your Google Sheets setup. 59 | 6. **Activate Workflow:** 60 | * Save and activate the workflow in n8n. The workflow will listen for Telegram messages and manage user sessions automatically. 61 | 62 | ## Usage 63 | 64 | 1. **User Sends Message:** A user sends a message to your Telegram bot. 65 | 2. **User Lookup:** The workflow checks if the user exists in Google Sheets. 66 | 3. **Registration (if needed):** If the user is new, a user ID is generated and the user is registered in Google Sheets. 67 | 4. **Session Caching:** The user's session is cached in Redis for fast future lookups. 68 | 5. **Integration:** The workflow can be triggered by other workflows to fetch or update user/session data as needed. 69 | 70 | ## Workflow Structure 71 | 72 | * **Telegram Trigger Path:** `Telegram Trigger` -> `Edit Fields` -> `Merge` -> `Find Cached User` -> `Is Cached` -> `Find User`/`UserId`/`Get UserId`/`Create User`/`Cache User` 73 | * **Google Sheets Integration:** Used for both user lookup and registration. 74 | * **Redis Integration:** Used for session caching and fast user lookup. 75 | * **Workflow Trigger:** Can be triggered by other workflows for modular integration. 76 | 77 | ## Cost Considerations (Potentially Free) 78 | 79 | This workflow can be run essentially for free, depending on the usage volume and chosen services: 80 | 81 | * **n8n:** Can be self-hosted or used via n8n Cloud (free tier available). 82 | * **Google Sheets:** Free for moderate usage within Google account limits. 83 | * **Telegram:** Free for bots and messaging. 84 | * **Redis:** Free if self-hosted or using a free-tier cloud instance. 85 | 86 | **Note:** Costs may be incurred if you exceed free tier limits of any service or use paid cloud Redis providers. 87 | 88 | ## Customization 89 | 90 | * **Changing Data Source:** 91 | * Replace Google Sheets nodes with your preferred data source (e.g., Airtable, SQL) and update field mappings accordingly. 92 | * **Changing Session Store:** 93 | * Swap out Redis nodes for your preferred session/cache provider. 94 | * **Expanding User Data:** 95 | * Add more fields to the Google Sheet and update the workflow to handle additional user attributes. 96 | * **Integration:** 97 | * Use the workflow as a module in larger automation systems for real-life login and session management. 98 | -------------------------------------------------------------------------------- /Automated-Linkedin-Post-FromX/README.md: -------------------------------------------------------------------------------- 1 | # Automated LinkedIn Post From X (Twitter) n8n Workflow 2 | 3 | This workflow automates the process of scraping trending posts from X (Twitter), generating LinkedIn-ready content using AI, and posting or scheduling them to LinkedIn, with Google Sheets for data management and Telegram for notifications. 4 | 5 | ## Overview 6 | 7 | The workflow operates in several main parts: 8 | 1. **Scrape Trending X Posts:** On a schedule, fetches the latest posts from selected X (Twitter) accounts using RapidAPI. 9 | 2. **Deduplication & Storage:** Cleans and deduplicates posts, storing new ones in a Google Sheet. 10 | 3. **AI Post Generation:** Uses an AI agent to generate LinkedIn-ready posts from the scraped X content. 11 | 4. **Approval & Scheduling:** Allows for manual or automated approval, then schedules posts for LinkedIn. 12 | 5. **Posting & Notification:** Posts to LinkedIn (or prepares for posting), updates status in Google Sheets, and sends a Telegram notification when new posts are available. 13 | 14 | ## Features 15 | 16 | * Scrapes latest posts from X (Twitter) using RapidAPI. 17 | * Cleans, deduplicates, and stores posts in Google Sheets. 18 | * Uses AI to generate LinkedIn-optimized content from X posts. 19 | * Supports approval workflow and scheduled posting. 20 | * Notifies via Telegram when new posts are ready. 21 | * Tracks all post statuses and metadata in Google Sheets. 22 | 23 | ## Prerequisites 24 | 25 | 1. **Google Sheets:** 26 | * A Google Sheet to store scraped X posts and generated LinkedIn content. 27 | * Google Sheets API credentials configured in n8n. 28 | 2. **RapidAPI:** 29 | * RapidAPI account and credentials for the X (Twitter) scraping API. 30 | 3. **AI Model:** 31 | * Access to an AI model (e.g., OpenAI, Anthropic, or similar) via n8n's AI nodes for post generation. 32 | 4. **Telegram (optional):** 33 | * Telegram bot credentials for notifications. 34 | 5. **LinkedIn API (optional):** 35 | * LinkedIn API credentials if you want to automate posting directly to LinkedIn (not included in this workflow by default, but can be added). 36 | 37 | ## Setup 38 | 39 | 1. **Import Workflow:** Import the `Linkedin_Automation.json` file into your n8n instance. 40 | 2. **Configure Credentials:** 41 | * Add Google Sheets credentials in n8n and select them in all Google Sheets nodes. 42 | * Add RapidAPI credentials for the X (Twitter) scraping node. 43 | * Add AI model credentials for the AI Agent node. 44 | * Add Telegram bot credentials for the Telegram node (optional). 45 | 3. **Prepare Google Sheets:** 46 | * Ensure your sheet has columns for post content, status, metadata, etc., as referenced in the workflow. 47 | 4. **Review Node Settings:** 48 | * Double-check all node settings, especially document IDs, sheet names, and field mappings, to match your Google Sheets setup. 49 | 5. **Activate Workflow:** 50 | * Save and activate the workflow in n8n. The workflow will run on the defined schedule and can also be triggered manually as needed. 51 | 52 | ## Usage 53 | 54 | 1. **Scrape X Posts:** The workflow will automatically fetch and store new X posts on schedule. 55 | 2. **Generate LinkedIn Content:** AI will generate LinkedIn-ready posts from the scraped X content. 56 | 3. **Review & Approve:** Review generated posts in Google Sheets. Approve or edit as needed. 57 | 4. **Schedule/Publish:** Approved posts are scheduled for posting to LinkedIn (if integrated) or can be posted manually. 58 | 5. **Notifications:** Receive Telegram notifications when new posts are available for review or posting. 59 | 60 | ## Workflow Structure 61 | 62 | * **Scheduled Scraping Path:** `Schedule Trigger` -> `Get AI Tweets (RapidAPI)` -> `Clean Tweets` -> `Deduplication (Find Existing Tweet)` -> `Save New Tweet (Google Sheets)` 63 | * **AI Generation Path:** `Limit` -> `AI Agent (AI Model)` -> `Loop Posts` -> `Aggregate` -> `Telegram Notification` 64 | * **Approval & Posting Path:** `Google Sheets Trigger` -> `Filter Approved` -> `Max 20` -> `Get Post Timings` -> `Loop Approved Posts` -> `Update User/Wait for Posting` -> `Set Posting (Google Sheets)` 65 | * **Data Storage:** All input and output is managed via Google Sheets for easy access and review. 66 | 67 | ## Cost Considerations (Potentially Free) 68 | 69 | This workflow can be run essentially for free, depending on the usage volume and chosen services: 70 | 71 | * **n8n:** Can be self-hosted or used via n8n Cloud (free tier available). 72 | * **Google Sheets:** Free for moderate usage within Google account limits. 73 | * **RapidAPI:** Free tier available, but scraping X (Twitter) may incur costs depending on volume. 74 | * **AI Model:** May incur costs depending on API/model usage; check your provider's pricing. 75 | * **Telegram:** Free for notifications. 76 | 77 | **Note:** Costs may be incurred if you exceed free tier limits of any service or use paid AI models. 78 | 79 | ## Customization 80 | 81 | * **Changing Data Source:** 82 | * Replace Google Sheets nodes with your preferred data source (e.g., Airtable) and update field mappings accordingly. 83 | * **Changing AI Models:** 84 | * Swap out the AI Agent node for your preferred AI provider (e.g., OpenAI, Anthropic) and adjust prompts as needed. 85 | * **LinkedIn Integration:** 86 | * Add LinkedIn API nodes to automate posting directly to LinkedIn. 87 | * **Adjusting Output:** 88 | * Modify the output Google Sheet structure or add additional columns as required for your workflow. 89 | -------------------------------------------------------------------------------- /Personal-Assistant-Video/Youtube Agent (architjn.com).json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Youtube Agent (architjn.com)", 3 | "nodes": [ 4 | { 5 | "parameters": { 6 | "workflowInputs": { 7 | "values": [ 8 | { 9 | "name": "query" 10 | } 11 | ] 12 | } 13 | }, 14 | "type": "n8n-nodes-base.executeWorkflowTrigger", 15 | "typeVersion": 1.1, 16 | "position": [ 17 | 0, 18 | 0 19 | ], 20 | "id": "2b4e3f32-ab4d-4c89-987a-efaf5567c31e", 21 | "name": "When Executed by Another Workflow" 22 | }, 23 | { 24 | "parameters": { 25 | "options": {} 26 | }, 27 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter", 28 | "typeVersion": 1, 29 | "position": [ 30 | 80, 31 | 220 32 | ], 33 | "id": "dffc3659-8d10-4a8a-a754-186701a93a80", 34 | "name": "OpenRouter Chat Model", 35 | "credentials": { 36 | "openRouterApi": { 37 | "id": "CGW0UD2Uwkzjnlyv", 38 | "name": "OpenRouter account" 39 | } 40 | } 41 | }, 42 | { 43 | "parameters": { 44 | "description": "Call this tool to get the information about the youtube channel assigned.", 45 | "workflowId": { 46 | "__rl": true, 47 | "value": "TZ3tGTvdrzlDeafI", 48 | "mode": "list", 49 | "cachedResultName": "Youtube Knowledge (architjn)" 50 | }, 51 | "workflowInputs": { 52 | "mappingMode": "defineBelow", 53 | "value": { 54 | "type": "channel info" 55 | }, 56 | "matchingColumns": [ 57 | "video query" 58 | ], 59 | "schema": [ 60 | { 61 | "id": "type", 62 | "displayName": "type", 63 | "required": false, 64 | "defaultMatch": false, 65 | "display": true, 66 | "canBeUsedToMatch": true, 67 | "type": "string", 68 | "removed": false 69 | }, 70 | { 71 | "id": "video query", 72 | "displayName": "video query", 73 | "required": false, 74 | "defaultMatch": false, 75 | "display": true, 76 | "canBeUsedToMatch": true, 77 | "type": "string", 78 | "removed": true 79 | } 80 | ], 81 | "attemptToConvertTypes": false, 82 | "convertFieldsToString": false 83 | } 84 | }, 85 | "type": "@n8n/n8n-nodes-langchain.toolWorkflow", 86 | "typeVersion": 2.2, 87 | "position": [ 88 | 340, 89 | 220 90 | ], 91 | "id": "6dd79b0a-276f-484d-a396-241bd245af85", 92 | "name": "Youtube Channel Info" 93 | }, 94 | { 95 | "parameters": { 96 | "description": "Call this tool to get the information about the videos in the youtube channel. This tool takes video query as input which is search query performed on youtube on a specific channel.", 97 | "workflowId": { 98 | "__rl": true, 99 | "value": "TZ3tGTvdrzlDeafI", 100 | "mode": "list", 101 | "cachedResultName": "Youtube Knowledge (architjn)" 102 | }, 103 | "workflowInputs": { 104 | "mappingMode": "defineBelow", 105 | "value": { 106 | "video query": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('video_query', `search query to filter out videos on specified youtube channel. query can be small and direct to the point. This is only needed when type is \"search channel\" otherwise it can be blank`, 'string') }}", 107 | "type": "search channel" 108 | }, 109 | "matchingColumns": [ 110 | "video query" 111 | ], 112 | "schema": [ 113 | { 114 | "id": "type", 115 | "displayName": "type", 116 | "required": false, 117 | "defaultMatch": false, 118 | "display": true, 119 | "canBeUsedToMatch": true, 120 | "type": "string", 121 | "removed": false 122 | }, 123 | { 124 | "id": "video query", 125 | "displayName": "video query", 126 | "required": false, 127 | "defaultMatch": false, 128 | "display": true, 129 | "canBeUsedToMatch": true, 130 | "type": "string", 131 | "removed": false 132 | } 133 | ], 134 | "attemptToConvertTypes": false, 135 | "convertFieldsToString": false 136 | } 137 | }, 138 | "type": "@n8n/n8n-nodes-langchain.toolWorkflow", 139 | "typeVersion": 2.2, 140 | "position": [ 141 | 520, 142 | 220 143 | ], 144 | "id": "180c0622-f306-47cd-ad80-7a3632dd5a0f", 145 | "name": "Youtube Channel Videos" 146 | }, 147 | { 148 | "parameters": { 149 | "promptType": "define", 150 | "text": "={{ $json.query }}", 151 | "options": { 152 | "systemMessage": "=You are a youtube channel assistant for the channel assigned.\n\nYou have access to various tools, you can use them to get the desired information\n\n## Instructions\n- You must use tools to get the information required\n\n## Tools\n### Youtube Channel Info\n- This tool tells you which channel is assigned to you.\n- You can use \"Youtube Channel Info\" tool to get the channel info.\n\n### Youtube Channel Videos\nYou can use \"Youtube Channel Videos\" tool to get the channel videos." 153 | } 154 | }, 155 | "type": "@n8n/n8n-nodes-langchain.agent", 156 | "typeVersion": 2, 157 | "position": [ 158 | 220, 159 | 0 160 | ], 161 | "id": "954c515c-703e-4b8f-9fea-8d6e3a870a7a", 162 | "name": "Youtube Agent" 163 | } 164 | ], 165 | "pinData": { 166 | "When Executed by Another Workflow": [ 167 | { 168 | "json": { 169 | "query": "Do you have any youtube channel?" 170 | } 171 | } 172 | ] 173 | }, 174 | "connections": { 175 | "When Executed by Another Workflow": { 176 | "main": [ 177 | [ 178 | { 179 | "node": "Youtube Agent", 180 | "type": "main", 181 | "index": 0 182 | } 183 | ] 184 | ] 185 | }, 186 | "OpenRouter Chat Model": { 187 | "ai_languageModel": [ 188 | [ 189 | { 190 | "node": "Youtube Agent", 191 | "type": "ai_languageModel", 192 | "index": 0 193 | } 194 | ] 195 | ] 196 | }, 197 | "Youtube Channel Info": { 198 | "ai_tool": [ 199 | [ 200 | { 201 | "node": "Youtube Agent", 202 | "type": "ai_tool", 203 | "index": 0 204 | } 205 | ] 206 | ] 207 | }, 208 | "Youtube Channel Videos": { 209 | "ai_tool": [ 210 | [ 211 | { 212 | "node": "Youtube Agent", 213 | "type": "ai_tool", 214 | "index": 0 215 | } 216 | ] 217 | ] 218 | } 219 | }, 220 | "active": false, 221 | "settings": { 222 | "executionOrder": "v1" 223 | }, 224 | "versionId": "83bac678-86f9-4b88-b172-cb73dfc7e087", 225 | "meta": { 226 | "templateCredsSetupCompleted": true, 227 | "instanceId": "933df83c84196d70ce3ffd0bf5d3e1aca31b7366f2f84e1f3482640096e4a3a9" 228 | }, 229 | "id": "AVXSMnXdoqa2Hf91", 230 | "tags": [] 231 | } -------------------------------------------------------------------------------- /Personal-Assistant-Video/Architjn.com Agent.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Architjn.com Agent", 3 | "nodes": [ 4 | { 5 | "parameters": { 6 | "path": "bf662133-bbf5-42b6-8e9d-169c7a1b9d3a", 7 | "responseMode": "responseNode", 8 | "options": {} 9 | }, 10 | "type": "n8n-nodes-base.webhook", 11 | "typeVersion": 2, 12 | "position": [ 13 | 0, 14 | 0 15 | ], 16 | "id": "7f904bcb-b959-47a8-b209-c3876e53bf62", 17 | "name": "Webhook", 18 | "webhookId": "bf662133-bbf5-42b6-8e9d-169c7a1b9d3a" 19 | }, 20 | { 21 | "parameters": { 22 | "options": {} 23 | }, 24 | "type": "n8n-nodes-base.respondToWebhook", 25 | "typeVersion": 1.3, 26 | "position": [ 27 | 800, 28 | 0 29 | ], 30 | "id": "237a2fa3-d7e2-4ca2-acb1-38702a2fb44a", 31 | "name": "Respond to Webhook" 32 | }, 33 | { 34 | "parameters": { 35 | "promptType": "define", 36 | "text": "={{ $('Webhook').item.json.body.query }}", 37 | "options": { 38 | "systemMessage": "=You are a impersonating {{ $json['user name'] }}'s assistant.\n\nYou have access to tools." 39 | } 40 | }, 41 | "type": "@n8n/n8n-nodes-langchain.agent", 42 | "typeVersion": 2, 43 | "position": [ 44 | 440, 45 | 0 46 | ], 47 | "id": "5b9b5b41-0258-4150-b4a4-ff1b9e6fec52", 48 | "name": "Architjn.com Agent" 49 | }, 50 | { 51 | "parameters": { 52 | "sessionIdType": "customKey", 53 | "sessionKey": "={{ $('Webhook').item.json.body.sessionId }}", 54 | "databaseName": "architjn_website" 55 | }, 56 | "type": "@n8n/n8n-nodes-langchain.memoryMongoDbChat", 57 | "typeVersion": 1, 58 | "position": [ 59 | 440, 60 | 260 61 | ], 62 | "id": "2ece3c97-c074-463f-8d70-fce649720491", 63 | "name": "MongoDB Chat Memory", 64 | "credentials": { 65 | "mongoDb": { 66 | "id": "n6weSJULTJxTCHoO", 67 | "name": "MongoDB account" 68 | } 69 | } 70 | }, 71 | { 72 | "parameters": { 73 | "model": "openai/gpt-4.1-nano", 74 | "options": {} 75 | }, 76 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter", 77 | "typeVersion": 1, 78 | "position": [ 79 | 280, 80 | 260 81 | ], 82 | "id": "3f576850-830e-42a3-aef1-1d3117786daa", 83 | "name": "oAI", 84 | "credentials": { 85 | "openRouterApi": { 86 | "id": "CGW0UD2Uwkzjnlyv", 87 | "name": "OpenRouter account" 88 | } 89 | } 90 | }, 91 | { 92 | "parameters": { 93 | "description": "Call this tool to get the youtube videos you have on the channel.", 94 | "workflowId": { 95 | "__rl": true, 96 | "value": "AVXSMnXdoqa2Hf91", 97 | "mode": "list", 98 | "cachedResultName": "Youtube Agent (architjn.com)" 99 | }, 100 | "workflowInputs": { 101 | "mappingMode": "defineBelow", 102 | "value": { 103 | "query": "={{ $('Webhook').item.json.body.query }}" 104 | }, 105 | "matchingColumns": [ 106 | "query" 107 | ], 108 | "schema": [ 109 | { 110 | "id": "query", 111 | "displayName": "query", 112 | "required": false, 113 | "defaultMatch": false, 114 | "display": true, 115 | "canBeUsedToMatch": true, 116 | "type": "string", 117 | "removed": false 118 | } 119 | ], 120 | "attemptToConvertTypes": false, 121 | "convertFieldsToString": false 122 | } 123 | }, 124 | "type": "@n8n/n8n-nodes-langchain.toolWorkflow", 125 | "typeVersion": 2.2, 126 | "position": [ 127 | 680, 128 | 260 129 | ], 130 | "id": "47a2213a-f17a-4fb4-a0a1-6f509764c6f2", 131 | "name": "Youtube Channel" 132 | }, 133 | { 134 | "parameters": { 135 | "assignments": { 136 | "assignments": [ 137 | { 138 | "id": "4239faf1-eaa9-4f41-8b4c-303f597ecadf", 139 | "name": "user name", 140 | "value": "Archit Jain", 141 | "type": "string" 142 | } 143 | ] 144 | }, 145 | "options": {} 146 | }, 147 | "type": "n8n-nodes-base.set", 148 | "typeVersion": 3.4, 149 | "position": [ 150 | 220, 151 | 0 152 | ], 153 | "id": "80dced2f-ccbf-424d-a70a-69b75fe91e9b", 154 | "name": "User Info" 155 | } 156 | ], 157 | "pinData": { 158 | "Webhook": [ 159 | { 160 | "json": { 161 | "headers": { 162 | "connection": "upgrade", 163 | "host": "n8n.architjn.com", 164 | "x-real-ip": "49.36.189.84", 165 | "x-forwarded-for": "49.36.189.84", 166 | "x-forwarded-proto": "https", 167 | "content-length": "83", 168 | "content-type": "application/json", 169 | "user-agent": "PostmanRuntime/7.44.1", 170 | "accept": "*/*", 171 | "cache-control": "no-cache", 172 | "postman-token": "edab0698-99a3-4a39-84e3-a4aa0162e67a", 173 | "accept-encoding": "gzip, deflate, br" 174 | }, 175 | "params": {}, 176 | "query": {}, 177 | "body": { 178 | "query": "Do you have any youtube channel?", 179 | "sessionId": "X0Ti4V&!4I$" 180 | }, 181 | "webhookUrl": "https://n8n.architjn.com/webhook/bf662133-bbf5-42b6-8e9d-169c7a1b9d3a", 182 | "executionMode": "production" 183 | } 184 | } 185 | ] 186 | }, 187 | "connections": { 188 | "Webhook": { 189 | "main": [ 190 | [ 191 | { 192 | "node": "User Info", 193 | "type": "main", 194 | "index": 0 195 | } 196 | ] 197 | ] 198 | }, 199 | "Architjn.com Agent": { 200 | "main": [ 201 | [ 202 | { 203 | "node": "Respond to Webhook", 204 | "type": "main", 205 | "index": 0 206 | } 207 | ] 208 | ] 209 | }, 210 | "MongoDB Chat Memory": { 211 | "ai_memory": [ 212 | [ 213 | { 214 | "node": "Architjn.com Agent", 215 | "type": "ai_memory", 216 | "index": 0 217 | } 218 | ] 219 | ] 220 | }, 221 | "oAI": { 222 | "ai_languageModel": [ 223 | [ 224 | { 225 | "node": "Architjn.com Agent", 226 | "type": "ai_languageModel", 227 | "index": 0 228 | } 229 | ] 230 | ] 231 | }, 232 | "Youtube Channel": { 233 | "ai_tool": [ 234 | [ 235 | { 236 | "node": "Architjn.com Agent", 237 | "type": "ai_tool", 238 | "index": 0 239 | } 240 | ] 241 | ] 242 | }, 243 | "User Info": { 244 | "main": [ 245 | [ 246 | { 247 | "node": "Architjn.com Agent", 248 | "type": "main", 249 | "index": 0 250 | } 251 | ] 252 | ] 253 | } 254 | }, 255 | "active": true, 256 | "settings": { 257 | "executionOrder": "v1" 258 | }, 259 | "versionId": "495ceaa5-2034-42dc-b562-63fa84c2496f", 260 | "meta": { 261 | "templateCredsSetupCompleted": true, 262 | "instanceId": "933df83c84196d70ce3ffd0bf5d3e1aca31b7366f2f84e1f3482640096e4a3a9" 263 | }, 264 | "id": "s1ZvsCwnoBGj6kit", 265 | "tags": [] 266 | } -------------------------------------------------------------------------------- /Cold-Mailing-v0.1/README.md: -------------------------------------------------------------------------------- 1 | # Cold Mailing n8n Workflow 2 | 3 | This workflow automates the process of generating and sending personalized cold emails using AI, leveraging Airtable for contact management and status tracking. 4 | 5 | ## Overview 6 | 7 | The workflow operates in two main parts: 8 | 1. **Email Generation:** Triggered manually, it fetches a contact record marked as 'Pending' from Airtable, generates a personalized email body and subject line using AI (OpenRouter), and updates the Airtable record with the generated content and sets the status to 'Approval Pending'. 9 | 2. **Email Sending:** Triggered on a schedule, it fetches contact records marked as 'Approved' from Airtable, updates their status to 'Sending', sends the email using the pre-generated content, and finally updates the status to 'Sent'. 10 | 11 | ## Features 12 | 13 | * Fetches contact data from an Airtable base. 14 | * Uses AI (via OpenRouter models) to generate personalized email copy based on contact details (company, name, industry, location, job title, etc.). 15 | * Generates catchy, professional subject lines using AI. 16 | * Integrates a manual approval step within Airtable ('Approval Pending' -> 'Approved'). 17 | * Sends emails via SMTP on a defined schedule for approved contacts. 18 | * Tracks the status of each email ('Pending', 'Approval Pending', 'Approved', 'Sending', 'Sent') in Airtable. 19 | 20 | ## Prerequisites 21 | 22 | 1. **Airtable Base:** 23 | * An Airtable base and table configured to store contact information. 24 | * Required fields (names may vary slightly based on your specific Airtable setup, check node configurations): 25 | * `status`: Single select field with options: `Pending`, `Approval Pending`, `Approved`, `Sending`, `Sent`. 26 | * `Email`: Email field for the recipient's address. 27 | * `email_subject`: Text field to store the generated subject line. 28 | * `email_copy`: Long text field to store the generated email body. 29 | * Fields used for personalization in the AI prompts (e.g., `company_cleaned`, `firstname_cleaned`, `lastname_cleaned`, `industry`, `location`, `job`, `company_website`, `company_industry`, `company_location`, `company_employee_count`). 30 | * `id`: The Airtable Record ID (used for matching during updates). 31 | * Airtable API Credentials configured in n8n. 32 | 2. **OpenRouter:** 33 | * An OpenRouter account and API key. 34 | * OpenRouter Credentials configured in n8n. 35 | 3. **SMTP Server:** 36 | * An SMTP service (e.g., Mailgun, SendGrid) configured for sending emails. 37 | * SMTP Credentials configured in n8n. 38 | 39 | ## Setup 40 | 41 | 1. **Import Workflow:** Import the `Cold_Mailing.json` file into your n8n instance. 42 | 2. **Configure Credentials:** 43 | * Navigate to the Credentials section in your n8n settings. 44 | * Add new credentials for: 45 | * **Airtable (API Token):** Use your Airtable Personal Access Token. Select this credential in all `Airtable` nodes (`Airtable1`, `Get Approved Message`, `Sending Status Change`, `Email Sent Status Change`, `Airtable2`). 46 | * **OpenRouter:** Use your OpenRouter API key. Select this credential in the `OpenRouter Chat Model` nodes (`OpenRouter Chat Model`, `OpenRouter Chat Model1`). 47 | * **SMTP:** Configure your SMTP provider details (host, port, user, password). Select this credential in the `Send Email` node. 48 | 3. **Prepare Airtable:** Ensure your Airtable base is set up according to the details mentioned in the **Prerequisites** section. Update the Base ID and Table ID in the `Airtable` nodes within the workflow to match your specific Airtable setup if they differ from the defaults. 49 | 4. **Review Node Settings:** Double-check the settings within each node, particularly the Airtable nodes (field mappings, filter formulas) and the `Send Email` node (From Email), to ensure they match your requirements. 50 | 5. **Activate Workflow:** Save and activate the workflow in n8n. The scheduled part will start running based on the "Schedule Trigger" settings, and the manual part can be triggered as needed. 51 | 52 | ## Usage 53 | 54 | 1. **Populate Airtable:** Add contact records to your Airtable table with their status initially set to `Pending`. 55 | 2. **Generate Emails:** Manually trigger the workflow (using the "When clicking 'Test workflow'" node or by running the workflow manually). This will process one 'Pending' record, generate the email/subject, and update its status to `Approval Pending`. Repeat as needed for other pending contacts. 56 | 3. **Approve Emails:** Review the `email_copy` and `email_subject` fields in Airtable for records with status `Approval Pending`. If satisfied, change the status to `Approved`. 57 | 4. **Activate Schedule:** Ensure the "Schedule Trigger" node is active and configured to run at your desired frequency (e.g., every 15 minutes, daily). 58 | 5. **Automatic Sending:** The scheduled workflow will automatically pick up `Approved` records, send the emails, and update their status to `Sent`. 59 | 60 | ## Workflow Structure 61 | 62 | * **Manual Trigger Path:** `Manual Trigger` -> `Airtable1 (Get Pending)` -> `AI Agent (Generate Body)` -> `Basic LLM Chain (Generate Subject)` -> `Airtable2 (Update to Approval Pending)` 63 | * **Scheduled Trigger Path:** `Schedule Trigger` -> `Get Approved Message` -> `Sending Status Change` -> `Send Email` -> `Email Sent Status Change` 64 | * **AI Models:** `OpenRouter Chat Model` and `OpenRouter Chat Model1` provide the language models for the AI Agent and LLM Chain respectively. 65 | 66 | ## Cost Considerations (Potentially Free) 67 | 68 | This workflow can be run essentially for free, depending on the usage volume and chosen services: 69 | 70 | * **n8n:** The workflow platform itself can be self-hosted (requiring your own infrastructure costs) or used via n8n's cloud offering, which has a free tier suitable for many use cases. 71 | * **Airtable:** Airtable provides a generous free tier with limits on records per base and API calls per month. This workflow is likely to operate within these limits for moderate usage. 72 | * **AI Model (OpenRouter):** The workflow is currently configured to use a free model (`deepseek/deepseek-r1:free`) via OpenRouter. OpenRouter offers access to various models, including several free options. As long as you stick to free models, there's no cost here. 73 | * **SMTP Service:** Many email providers (like Mailgun, SendGrid, Brevo/Sendinblue) offer free tiers that allow sending hundreds or thousands of emails per month, which is often sufficient for cold outreach campaigns. 74 | 75 | **Note:** Costs may be incurred if you exceed the free tier limits of Airtable or your SMTP provider, choose to use paid AI models via OpenRouter, or opt for a paid n8n cloud plan. 76 | 77 | ## Customization 78 | 79 | * **Changing Data Source (e.g., to Google Sheets):** 80 | * Replace the `Airtable` nodes (`Airtable1`, `Get Approved Message`, `Sending Status Change`, `Email Sent Status Change`, `Airtable2`) with the corresponding nodes for your desired data source (e.g., `Google Sheets`). 81 | * Update the data mapping and filtering logic within the new nodes to match the structure of your spreadsheet and the workflow's requirements (fetching pending/approved records, updating status, storing generated content). 82 | * Ensure the expressions referencing data from the previous Airtable nodes (like `{{ $('Airtable1').item.json.id }}` or `{{ $json.fields.Email }}`) are updated to use the correct data structure from the new nodes. 83 | * **Changing AI Models:** 84 | * Replace the `OpenRouter Chat Model` nodes (`OpenRouter Chat Model`, `OpenRouter Chat Model1`) with nodes for your preferred AI provider (e.g., `OpenAI Chat Model`, `Anthropic Chat Model`). 85 | * Configure the new AI model nodes with your credentials and desired model parameters. 86 | * Adjust the prompts in the `AI Agent` and `Basic LLM Chain` nodes if necessary to optimize for the new models. 87 | -------------------------------------------------------------------------------- /ElevenLabs-Chatbot/Website_Chatbot_Elevenlabs.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Website Chatbot Elevenlabs", 3 | "nodes": [ 4 | { 5 | "parameters": { 6 | "promptType": "define", 7 | "text": "={{ $json.body.message }}", 8 | "options": { 9 | "systemMessage": "=```xml\n\nYou are a website knowledge base assistant, you complete any user request by checking the website content if it matches the user request.\n\n\n\nwebsite base url - https://www.architjn.com\nwebsite sitemap url - https://www.architjn.com/sitemap.xml\n\n\n\n1. First step must be to get the sitemap of the website.\n2. MUST shorlist three best URL match according to the request.\n3. MUST check all those three shortlisted URLs for the content of the page and extract the relevant infromation.\n4. MUST revisit the relevant information extracted to find the best suited response for the user's original request.\n5. You MUST not include all the information fetched, only include whichever is actually matches the user's request.\n - You should score each information with a score out of hundred\n - You must only add information which is above 75 in relevance to the user's request.\n6. MUST provide the user a clear and clean answer. Should be crisp.\n7. MUST not include any process of finding the information.\n8. MUST add citations with each answer.\n9. MUST answer as if you're part of the website team. You need to talk as first person using \"we\" wherever necessary. Like \"we have this\", \"we think this is possible like this\", etc.\n10. Answers must be short and crisp, until asked to be long.\n\n\n\n1. MUST be in markdown format.\n2. MUST use citation as [1] or [2], depending on how many are there.\n3. MUST use clickable links for citations in format which markdown supports like [[1]](SITE_URL)\n\n\n\n \n What's the best n8n usecase?\n One of the best usecase we have is to automate your linkedin posts using n8n by extracting twitter content daily with human in loop [[1]](https://www.architjn.com/blog/competitor-facebook-ads-analysis-n8n-workflow).\n \n\n" 10 | } 11 | }, 12 | "type": "@n8n/n8n-nodes-langchain.agent", 13 | "typeVersion": 2, 14 | "position": [ 15 | 312, 16 | 0 17 | ], 18 | "id": "4f2dd72b-4d90-4485-a09f-1083126d39cf", 19 | "name": "Support Agent" 20 | }, 21 | { 22 | "parameters": { 23 | "model": "openai/gpt-4.1-nano", 24 | "options": {} 25 | }, 26 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter", 27 | "typeVersion": 1, 28 | "position": [ 29 | 180, 30 | 220 31 | ], 32 | "id": "910b057e-9ff8-4e05-9fc5-1913802b173d", 33 | "name": "OpenRouter Chat Model", 34 | "credentials": { 35 | "openRouterApi": { 36 | "id": "CGW0UD2Uwkzjnlyv", 37 | "name": "OpenRouter account" 38 | } 39 | } 40 | }, 41 | { 42 | "parameters": { 43 | "toolDescription": "Get's the content of a webpage from the specified URL.", 44 | "url": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('URL', `any url with the full URL including https\nit only takes absolute url.`, 'string') }}", 45 | "options": {} 46 | }, 47 | "type": "n8n-nodes-base.httpRequestTool", 48 | "typeVersion": 4.2, 49 | "position": [ 50 | 540, 51 | 220 52 | ], 53 | "id": "6554c89d-b347-4230-8a1a-3315f5348b90", 54 | "name": "Website Content" 55 | }, 56 | { 57 | "parameters": { 58 | "toolDescription": "Use this tool to get the website's sitemap. This takes sitemap link as input for URL and returns the sitemap of the website in XML", 59 | "url": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('URL', `complete URL with https and full path to sitemap`, 'string') }}", 60 | "options": {} 61 | }, 62 | "type": "n8n-nodes-base.httpRequestTool", 63 | "typeVersion": 4.2, 64 | "position": [ 65 | 700, 66 | 220 67 | ], 68 | "id": "3bb5c20e-7bf1-4d75-83f1-8cb5f664c1e9", 69 | "name": "Website Sitemap" 70 | }, 71 | { 72 | "parameters": { 73 | "sessionIdType": "customKey", 74 | "sessionKey": "={{ $('Webhook').item.json.body.uuid }}" 75 | }, 76 | "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow", 77 | "typeVersion": 1.3, 78 | "position": [ 79 | 360, 80 | 220 81 | ], 82 | "id": "4f9c9df5-6d75-475d-94ac-6d611410b5a8", 83 | "name": "Simple Memory" 84 | }, 85 | { 86 | "parameters": { 87 | "httpMethod": "POST", 88 | "path": "26f20c01-d8a0-408c-9d24-df3a8076e784", 89 | "responseMode": "responseNode", 90 | "options": {} 91 | }, 92 | "type": "n8n-nodes-base.webhook", 93 | "typeVersion": 2, 94 | "position": [ 95 | 0, 96 | 0 97 | ], 98 | "id": "0819452e-3360-4a4b-8f09-ed1419c48ff7", 99 | "name": "Webhook", 100 | "webhookId": "26f20c01-d8a0-408c-9d24-df3a8076e784" 101 | }, 102 | { 103 | "parameters": { 104 | "options": {} 105 | }, 106 | "type": "n8n-nodes-base.respondToWebhook", 107 | "typeVersion": 1.3, 108 | "position": [ 109 | 680, 110 | 0 111 | ], 112 | "id": "c9aefa5b-b70e-4444-93cf-61e5087eb125", 113 | "name": "Respond to Webhook" 114 | } 115 | ], 116 | "pinData": { 117 | "Webhook": [ 118 | { 119 | "json": { 120 | "headers": { 121 | "connection": "upgrade", 122 | "host": "n8n.architjn.com", 123 | "x-real-ip": "34.59.11.47", 124 | "x-forwarded-for": "34.59.11.47", 125 | "x-forwarded-proto": "https", 126 | "content-length": "83", 127 | "accept": "*/*", 128 | "accept-encoding": "gzip, deflate", 129 | "user-agent": "Python/3.12 aiohttp/3.11.16", 130 | "content-type": "application/json" 131 | }, 132 | "params": {}, 133 | "query": {}, 134 | "body": { 135 | "message": "How to set up Any10?", 136 | "uuid": "b46919cb-b949-4951-9499-59290c4e8253" 137 | }, 138 | "webhookUrl": "https://n8n.architjn.com/webhook/26f20c01-d8a0-408c-9d24-df3a8076e784", 139 | "executionMode": "production" 140 | } 141 | } 142 | ] 143 | }, 144 | "connections": { 145 | "OpenRouter Chat Model": { 146 | "ai_languageModel": [ 147 | [ 148 | { 149 | "node": "Support Agent", 150 | "type": "ai_languageModel", 151 | "index": 0 152 | } 153 | ] 154 | ] 155 | }, 156 | "Website Content": { 157 | "ai_tool": [ 158 | [ 159 | { 160 | "node": "Support Agent", 161 | "type": "ai_tool", 162 | "index": 0 163 | } 164 | ] 165 | ] 166 | }, 167 | "Website Sitemap": { 168 | "ai_tool": [ 169 | [ 170 | { 171 | "node": "Support Agent", 172 | "type": "ai_tool", 173 | "index": 0 174 | } 175 | ] 176 | ] 177 | }, 178 | "Simple Memory": { 179 | "ai_memory": [ 180 | [ 181 | { 182 | "node": "Support Agent", 183 | "type": "ai_memory", 184 | "index": 0 185 | } 186 | ] 187 | ] 188 | }, 189 | "Webhook": { 190 | "main": [ 191 | [ 192 | { 193 | "node": "Support Agent", 194 | "type": "main", 195 | "index": 0 196 | } 197 | ] 198 | ] 199 | }, 200 | "Support Agent": { 201 | "main": [ 202 | [ 203 | { 204 | "node": "Respond to Webhook", 205 | "type": "main", 206 | "index": 0 207 | } 208 | ] 209 | ] 210 | } 211 | }, 212 | "active": true, 213 | "settings": { 214 | "executionOrder": "v1" 215 | }, 216 | "versionId": "f540aa02-c010-4f47-9c19-3bbac2a5f50a", 217 | "meta": { 218 | "templateCredsSetupCompleted": true, 219 | "instanceId": "933df83c84196d70ce3ffd0bf5d3e1aca31b7366f2f84e1f3482640096e4a3a9" 220 | }, 221 | "id": "7TqokjUZkh435SCL", 222 | "tags": [] 223 | } -------------------------------------------------------------------------------- /Personal-Assistant-Video/Youtube Knowledge (architjn).json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Youtube Knowledge (architjn)", 3 | "nodes": [ 4 | { 5 | "parameters": { 6 | "resource": "video", 7 | "filters": { 8 | "channelId": "={{ $json['channel id'] }}", 9 | "q": "={{ $json['video query'] }}" 10 | }, 11 | "options": { 12 | "order": "relevance" 13 | } 14 | }, 15 | "type": "n8n-nodes-base.youTube", 16 | "typeVersion": 1, 17 | "position": [ 18 | 700, 19 | -120 20 | ], 21 | "id": "96b14fa7-3e06-4330-9d6c-ceafd9b26157", 22 | "name": "Find Video", 23 | "credentials": { 24 | "youTubeOAuth2Api": { 25 | "id": "5t2G133mYC1jE3ti", 26 | "name": "YouTube Architjn" 27 | } 28 | } 29 | }, 30 | { 31 | "parameters": { 32 | "workflowInputs": { 33 | "values": [ 34 | { 35 | "name": "type" 36 | }, 37 | { 38 | "name": "video query" 39 | } 40 | ] 41 | } 42 | }, 43 | "type": "n8n-nodes-base.executeWorkflowTrigger", 44 | "typeVersion": 1.1, 45 | "position": [ 46 | 0, 47 | 0 48 | ], 49 | "id": "6afa60dc-ad82-460e-ab28-1da4d6e2e836", 50 | "name": "When Executed by Another Workflow" 51 | }, 52 | { 53 | "parameters": { 54 | "assignments": { 55 | "assignments": [ 56 | { 57 | "id": "0c4681ac-2393-4229-8b13-c882a5d99ef3", 58 | "name": "Title", 59 | "value": "={{ $json.snippet.title }}", 60 | "type": "string" 61 | }, 62 | { 63 | "id": "6485c911-d244-43fb-a89f-29d6bb578622", 64 | "name": "description", 65 | "value": "={{ $json.snippet.description }}", 66 | "type": "string" 67 | }, 68 | { 69 | "id": "2920a3db-d1f6-4c9a-9450-59f5bb390a78", 70 | "name": "publish-date", 71 | "value": "={{ $json.snippet.publishTime }}", 72 | "type": "string" 73 | }, 74 | { 75 | "id": "0a80f67a-a352-4341-a505-3a9d1f245c99", 76 | "name": "video-link", 77 | "value": "=https://youtu.be/{{ $json.id.videoId }}", 78 | "type": "string" 79 | } 80 | ] 81 | }, 82 | "options": {} 83 | }, 84 | "type": "n8n-nodes-base.set", 85 | "typeVersion": 3.4, 86 | "position": [ 87 | 940, 88 | -140 89 | ], 90 | "id": "d927f959-0adb-495a-8c44-bc24e9230a40", 91 | "name": "Video Details" 92 | }, 93 | { 94 | "parameters": { 95 | "rules": { 96 | "values": [ 97 | { 98 | "conditions": { 99 | "options": { 100 | "caseSensitive": true, 101 | "leftValue": "", 102 | "typeValidation": "strict", 103 | "version": 2 104 | }, 105 | "conditions": [ 106 | { 107 | "leftValue": "={{ $('When Executed by Another Workflow').item.json.type }}", 108 | "rightValue": "search channel", 109 | "operator": { 110 | "type": "string", 111 | "operation": "equals" 112 | }, 113 | "id": "8f560a45-a454-4a41-9617-85c8bb3ebc5e" 114 | } 115 | ], 116 | "combinator": "and" 117 | }, 118 | "renameOutput": true, 119 | "outputKey": "Search" 120 | }, 121 | { 122 | "conditions": { 123 | "options": { 124 | "caseSensitive": true, 125 | "leftValue": "", 126 | "typeValidation": "strict", 127 | "version": 2 128 | }, 129 | "conditions": [ 130 | { 131 | "id": "340ae224-a226-448b-946f-7c615a20cb55", 132 | "leftValue": "={{ $('When Executed by Another Workflow').item.json.type }}", 133 | "rightValue": "channel info", 134 | "operator": { 135 | "type": "string", 136 | "operation": "equals", 137 | "name": "filter.operator.equals" 138 | } 139 | } 140 | ], 141 | "combinator": "and" 142 | }, 143 | "renameOutput": true, 144 | "outputKey": "Info" 145 | } 146 | ] 147 | }, 148 | "options": {} 149 | }, 150 | "type": "n8n-nodes-base.switch", 151 | "typeVersion": 3.2, 152 | "position": [ 153 | 440, 154 | 0 155 | ], 156 | "id": "2d87b2c8-0bbe-44b7-870c-38dfceef25fa", 157 | "name": "Switch" 158 | }, 159 | { 160 | "parameters": { 161 | "operation": "get", 162 | "channelId": "={{ $json['channel id'] }}" 163 | }, 164 | "type": "n8n-nodes-base.youTube", 165 | "typeVersion": 1, 166 | "position": [ 167 | 900, 168 | 140 169 | ], 170 | "id": "d76b4853-101f-42f6-97fa-5ce11ec3a6a2", 171 | "name": "Get a channel", 172 | "credentials": { 173 | "youTubeOAuth2Api": { 174 | "id": "5t2G133mYC1jE3ti", 175 | "name": "YouTube Architjn" 176 | } 177 | } 178 | }, 179 | { 180 | "parameters": { 181 | "assignments": { 182 | "assignments": [ 183 | { 184 | "id": "601f5cc5-b802-4178-84b6-ffa610e0cbe7", 185 | "name": "channel id", 186 | "value": "UCQUiHn9RLG3ofJxIt4imnBw", 187 | "type": "string" 188 | } 189 | ] 190 | }, 191 | "options": {} 192 | }, 193 | "type": "n8n-nodes-base.set", 194 | "typeVersion": 3.4, 195 | "position": [ 196 | 220, 197 | 0 198 | ], 199 | "id": "2d76b660-ac1f-4ff4-9ffe-440188018f3e", 200 | "name": "Channel Info" 201 | }, 202 | { 203 | "parameters": { 204 | "assignments": { 205 | "assignments": [ 206 | { 207 | "id": "4a5694a1-a3a0-47ed-8444-f64c1f6768ad", 208 | "name": "Channel Name", 209 | "value": "={{ $json.brandingSettings.channel.title }}", 210 | "type": "string" 211 | }, 212 | { 213 | "id": "cf7836f8-2d96-4163-a018-08afe8641a4c", 214 | "name": "Channel Custom URL", 215 | "value": "={{ $json.snippet.customUrl }}", 216 | "type": "string" 217 | }, 218 | { 219 | "id": "2921eb2b-7bc3-4232-b677-9bdfefa370a4", 220 | "name": "total video count", 221 | "value": "={{ $json.statistics.videoCount }}", 222 | "type": "string" 223 | }, 224 | { 225 | "id": "0b65188c-28d5-4c81-a114-b469eb21cf18", 226 | "name": "subscribers count", 227 | "value": "={{ $json.statistics.subscriberCount }}", 228 | "type": "string" 229 | } 230 | ] 231 | }, 232 | "options": {} 233 | }, 234 | "type": "n8n-nodes-base.set", 235 | "typeVersion": 3.4, 236 | "position": [ 237 | 1120, 238 | 140 239 | ], 240 | "id": "daa4c61c-e17a-493e-9939-605f0ec360ba", 241 | "name": "Channel Details" 242 | } 243 | ], 244 | "pinData": { 245 | "When Executed by Another Workflow": [ 246 | { 247 | "json": { 248 | "type": "search channel", 249 | "video query": "self hosting" 250 | } 251 | } 252 | ] 253 | }, 254 | "connections": { 255 | "When Executed by Another Workflow": { 256 | "main": [ 257 | [ 258 | { 259 | "node": "Channel Info", 260 | "type": "main", 261 | "index": 0 262 | } 263 | ] 264 | ] 265 | }, 266 | "Find Video": { 267 | "main": [ 268 | [ 269 | { 270 | "node": "Video Details", 271 | "type": "main", 272 | "index": 0 273 | } 274 | ] 275 | ] 276 | }, 277 | "Switch": { 278 | "main": [ 279 | [ 280 | { 281 | "node": "Find Video", 282 | "type": "main", 283 | "index": 0 284 | } 285 | ], 286 | [ 287 | { 288 | "node": "Get a channel", 289 | "type": "main", 290 | "index": 0 291 | } 292 | ] 293 | ] 294 | }, 295 | "Channel Info": { 296 | "main": [ 297 | [ 298 | { 299 | "node": "Switch", 300 | "type": "main", 301 | "index": 0 302 | } 303 | ] 304 | ] 305 | }, 306 | "Get a channel": { 307 | "main": [ 308 | [ 309 | { 310 | "node": "Channel Details", 311 | "type": "main", 312 | "index": 0 313 | } 314 | ] 315 | ] 316 | } 317 | }, 318 | "active": false, 319 | "settings": { 320 | "executionOrder": "v1" 321 | }, 322 | "versionId": "3c73be68-3a1c-4c2e-a7a4-aa336e7d5acb", 323 | "meta": { 324 | "templateCredsSetupCompleted": true, 325 | "instanceId": "933df83c84196d70ce3ffd0bf5d3e1aca31b7366f2f84e1f3482640096e4a3a9" 326 | }, 327 | "id": "TZ3tGTvdrzlDeafI", 328 | "tags": [] 329 | } -------------------------------------------------------------------------------- /Lead-Gen-Copy/Get Leads for Free.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "get leads for free", 3 | "nodes": [ 4 | { 5 | "parameters": {}, 6 | "type": "n8n-nodes-base.manualTrigger", 7 | "typeVersion": 1, 8 | "position": [ 9 | -300, 10 | -260 11 | ], 12 | "id": "c1ec5b01-0801-46ab-bbc5-bc592eea1e84", 13 | "name": "When clicking ‘Test workflow’" 14 | }, 15 | { 16 | "parameters": { 17 | "assignments": { 18 | "assignments": [ 19 | { 20 | "id": "6471a106-2e18-4ca6-980e-a024c4d42be8", 21 | "name": "website", 22 | "value": "https://www.yellowpages.com/search?search_terms=Dentists&geo_location_terms=New%20York%2C%20NY", 23 | "type": "string" 24 | }, 25 | { 26 | "id": "a8c416f2-5410-4493-a1ed-d51282566216", 27 | "name": "pages", 28 | "value": "3", 29 | "type": "string" 30 | } 31 | ] 32 | }, 33 | "options": {} 34 | }, 35 | "type": "n8n-nodes-base.set", 36 | "typeVersion": 3.4, 37 | "position": [ 38 | -20, 39 | -260 40 | ], 41 | "id": "1f0e8557-0331-4fc7-bc14-b9d53b52fe96", 42 | "name": "Website" 43 | }, 44 | { 45 | "parameters": { 46 | "text": "={{ $json.results[0].content }}", 47 | "schemaType": "manual", 48 | "inputSchema": "{\n\t\"type\": \"array\",\n\t\"items\": {\n\t\t\"type\": \"object\",\n\t\t\"properties\": {\n\t\t\t\"company_name\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t},\n\t\t\t\"phone_number\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"pattern\": \"^\\\\+?[0-9]{7,15}$\"\n\t\t\t},\n \"website\": {\n\t\t\t\t\"type\": \"string\"\n\t\t\t},\n\t\t\t\"year_in_business\": {\n\t\t\t\t\"type\": \"number\",\n\t\t\t\t\"minimum\": 0,\n\t\t\t\t\"maximum\": 99\n\t\t\t}\n\t\t}\n\t}\n}\n", 49 | "options": { 50 | "systemPromptTemplate": "You are an expert extraction algorithm.\nOnly extract relevant information from the text.\nIf you do not know the value of an attribute asked to extract, you may omit the attribute's value.\nAlways output the data in a json array called results. \nYour goal is to extract all the companies of the page. To do so, you will give: company name, phone number, website, number of years in business, for each result you can find." 51 | } 52 | }, 53 | "type": "@n8n/n8n-nodes-langchain.informationExtractor", 54 | "typeVersion": 1, 55 | "position": [ 56 | 1640, 57 | -400 58 | ], 59 | "id": "db2d2aea-394d-489b-bc89-ec6d4224e960", 60 | "name": "Information Extractor" 61 | }, 62 | { 63 | "parameters": { 64 | "model": { 65 | "__rl": true, 66 | "value": "gpt-4o", 67 | "mode": "list", 68 | "cachedResultName": "gpt-4o" 69 | }, 70 | "options": {} 71 | }, 72 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", 73 | "typeVersion": 1.2, 74 | "position": [ 75 | 1740, 76 | -180 77 | ], 78 | "id": "67b67200-be4f-48ca-8b39-b12ef076c863", 79 | "name": "OpenAI Chat Model", 80 | "credentials": { 81 | "openAiApi": { 82 | "id": "*****", 83 | "name": "OpenAi" 84 | } 85 | } 86 | }, 87 | { 88 | "parameters": { 89 | "fieldToSplitOut": "output", 90 | "options": {} 91 | }, 92 | "type": "n8n-nodes-base.splitOut", 93 | "typeVersion": 1, 94 | "position": [ 95 | 2000, 96 | -400 97 | ], 98 | "id": "ec348438-0935-48bd-8fc9-bf0ee8c1f325", 99 | "name": "Split Out" 100 | }, 101 | { 102 | "parameters": { 103 | "operation": "append", 104 | "documentId": { 105 | "__rl": true, 106 | "value": "196EDvvDyybuOO6wX5PWmT2kcOW8xAdq7Vz2PjhT3nrs", 107 | "mode": "list", 108 | "cachedResultName": "Leads Dentist demo", 109 | "cachedResultUrl": "" 110 | }, 111 | "sheetName": { 112 | "__rl": true, 113 | "value": "gid=0", 114 | "mode": "list", 115 | "cachedResultName": "leads", 116 | "cachedResultUrl": "" 117 | }, 118 | "columns": { 119 | "mappingMode": "defineBelow", 120 | "value": { 121 | "Dentist": "={{ $json.company_name }}", 122 | "phone number": "={{ $json.phone_number }}", 123 | "years in business": "={{ $json.year_in_business }}", 124 | "website": "={{ $json.website }}", 125 | "doNotUse": "={{ $json.website \n ? `info@${$json.website.replace(/^https?:\\/\\//, '').replace(/^www\\./, '').split('/')[0]}` \n : `info@${$json.company_name.split(' ')[0].toLowerCase()}.com` }}" 126 | }, 127 | "matchingColumns": [], 128 | "schema": [ 129 | { 130 | "id": "Dentist", 131 | "displayName": "Dentist", 132 | "required": false, 133 | "defaultMatch": false, 134 | "display": true, 135 | "type": "string", 136 | "canBeUsedToMatch": true 137 | }, 138 | { 139 | "id": "phone number", 140 | "displayName": "phone number", 141 | "required": false, 142 | "defaultMatch": false, 143 | "display": true, 144 | "type": "string", 145 | "canBeUsedToMatch": true 146 | }, 147 | { 148 | "id": "website", 149 | "displayName": "website", 150 | "required": false, 151 | "defaultMatch": false, 152 | "display": true, 153 | "type": "string", 154 | "canBeUsedToMatch": true, 155 | "removed": false 156 | }, 157 | { 158 | "id": "years in business", 159 | "displayName": "years in business", 160 | "required": false, 161 | "defaultMatch": false, 162 | "display": true, 163 | "type": "string", 164 | "canBeUsedToMatch": true 165 | }, 166 | { 167 | "id": "doNotUse", 168 | "displayName": "doNotUse", 169 | "required": false, 170 | "defaultMatch": false, 171 | "display": true, 172 | "type": "string", 173 | "canBeUsedToMatch": true, 174 | "removed": false 175 | } 176 | ], 177 | "attemptToConvertTypes": false, 178 | "convertFieldsToString": false 179 | }, 180 | "options": {} 181 | }, 182 | "type": "n8n-nodes-base.googleSheets", 183 | "typeVersion": 4.5, 184 | "position": [ 185 | 2340, 186 | -140 187 | ], 188 | "id": "2cc81861-8a73-46c5-89e6-6ff8cc13104d", 189 | "name": "Google Sheets", 190 | "credentials": { 191 | "googleSheetsOAuth2Api": { 192 | "id": "49HDdgBiLhALfiaO", 193 | "name": "Google Sheets account 8" 194 | } 195 | } 196 | }, 197 | { 198 | "parameters": { 199 | "method": "POST", 200 | "url": "https://realtime.oxylabs.io/v1/queries", 201 | "authentication": "genericCredentialType", 202 | "genericAuthType": "httpBasicAuth", 203 | "sendHeaders": true, 204 | "headerParameters": { 205 | "parameters": [ 206 | { 207 | "name": "Content-Type", 208 | "value": "application/json" 209 | } 210 | ] 211 | }, 212 | "sendBody": true, 213 | "specifyBody": "json", 214 | "jsonBody": "={\n \"source\": \"universal\",\n \"url\": \"{{ $json.url }}\"\n}\n\n", 215 | "options": {} 216 | }, 217 | "id": "30b43dd3-be9b-43ab-b39a-d52a28e9977b", 218 | "name": "ScrapeWebsite", 219 | "type": "n8n-nodes-base.httpRequest", 220 | "typeVersion": 4.2, 221 | "position": [ 222 | 1400, 223 | -400 224 | ], 225 | "credentials": { 226 | "httpBasicAuth": { 227 | "id": "*****", 228 | "name": "scraper" 229 | } 230 | } 231 | }, 232 | { 233 | "parameters": { 234 | "batchSize": "=1", 235 | "options": { 236 | "reset": false 237 | } 238 | }, 239 | "type": "n8n-nodes-base.splitInBatches", 240 | "typeVersion": 3, 241 | "position": [ 242 | 800, 243 | -260 244 | ], 245 | "id": "1ec34435-685a-4626-bdf5-1ddcaaf26b85", 246 | "name": "Loop Over Items" 247 | }, 248 | { 249 | "parameters": { 250 | "assignments": { 251 | "assignments": [ 252 | { 253 | "id": "920c0da2-b882-4504-bdf4-7e697785f028", 254 | "name": "counter", 255 | "value": 2, 256 | "type": "number" 257 | } 258 | ] 259 | }, 260 | "options": {} 261 | }, 262 | "type": "n8n-nodes-base.set", 263 | "typeVersion": 3.4, 264 | "position": [ 265 | 200, 266 | -260 267 | ], 268 | "id": "809bfe3c-88d1-4cec-b717-8f08495df2c1", 269 | "name": "init" 270 | }, 271 | { 272 | "parameters": { 273 | "resource": "lead", 274 | "campaignId": "=cam_YA575FbieMfvioKCp", 275 | "email": "={{ $json.doNotUse }}", 276 | "additionalFields": { 277 | "companyName": "={{ $json.Dentist }}", 278 | "companyDomain": "={{ $json.website }}", 279 | "phone": "={{ $json[\"phone number\"] }}" 280 | } 281 | }, 282 | "type": "n8n-nodes-base.lemlist", 283 | "typeVersion": 2, 284 | "position": [ 285 | 1380, 286 | -640 287 | ], 288 | "id": "ef6907e1-e5a5-4036-8ee2-db9a7b3a831a", 289 | "name": "Lemlist", 290 | "credentials": { 291 | "lemlistApi": { 292 | "id": "M1I0E5rU55R5GLGc", 293 | "name": "lemlist admin - growth" 294 | } 295 | } 296 | }, 297 | { 298 | "parameters": { 299 | "content": "Fill here website and ", 300 | "height": 280 301 | }, 302 | "type": "n8n-nodes-base.stickyNote", 303 | "typeVersion": 1, 304 | "position": [ 305 | -80, 306 | -360 307 | ], 308 | "id": "8607d08e-764f-4d05-bf3f-0508226b009a", 309 | "name": "Sticky Note" 310 | }, 311 | { 312 | "parameters": { 313 | "jsCode": "const websiteData = $(\"Website\").all()[0]?.json;\nconst pages = Array.from({ length: websiteData.pages }, (_, i) => i + 1);\nconst urls = pages.map((page) => ({ json: { url: `${websiteData.website}&page=${page}` } }));\n\nreturn urls;\n" 314 | }, 315 | "type": "n8n-nodes-base.code", 316 | "typeVersion": 2, 317 | "position": [ 318 | 420, 319 | -260 320 | ], 321 | "id": "13b1623f-218c-4c94-9d4a-a70f84af515c", 322 | "name": "generate_URL" 323 | } 324 | ], 325 | "pinData": {}, 326 | "connections": { 327 | "When clicking ‘Test workflow’": { 328 | "main": [ 329 | [ 330 | { 331 | "node": "Website", 332 | "type": "main", 333 | "index": 0 334 | } 335 | ] 336 | ] 337 | }, 338 | "Website": { 339 | "main": [ 340 | [ 341 | { 342 | "node": "init", 343 | "type": "main", 344 | "index": 0 345 | } 346 | ] 347 | ] 348 | }, 349 | "OpenAI Chat Model": { 350 | "ai_languageModel": [ 351 | [ 352 | { 353 | "node": "Information Extractor", 354 | "type": "ai_languageModel", 355 | "index": 0 356 | } 357 | ] 358 | ] 359 | }, 360 | "Information Extractor": { 361 | "main": [ 362 | [ 363 | { 364 | "node": "Split Out", 365 | "type": "main", 366 | "index": 0 367 | } 368 | ] 369 | ] 370 | }, 371 | "Split Out": { 372 | "main": [ 373 | [ 374 | { 375 | "node": "Google Sheets", 376 | "type": "main", 377 | "index": 0 378 | } 379 | ] 380 | ] 381 | }, 382 | "ScrapeWebsite": { 383 | "main": [ 384 | [ 385 | { 386 | "node": "Information Extractor", 387 | "type": "main", 388 | "index": 0 389 | } 390 | ] 391 | ] 392 | }, 393 | "Loop Over Items": { 394 | "main": [ 395 | [ 396 | { 397 | "node": "Lemlist", 398 | "type": "main", 399 | "index": 0 400 | } 401 | ], 402 | [ 403 | { 404 | "node": "ScrapeWebsite", 405 | "type": "main", 406 | "index": 0 407 | } 408 | ] 409 | ] 410 | }, 411 | "Google Sheets": { 412 | "main": [ 413 | [ 414 | { 415 | "node": "Loop Over Items", 416 | "type": "main", 417 | "index": 0 418 | } 419 | ] 420 | ] 421 | }, 422 | "init": { 423 | "main": [ 424 | [ 425 | { 426 | "node": "generate_URL", 427 | "type": "main", 428 | "index": 0 429 | } 430 | ] 431 | ] 432 | }, 433 | "generate_URL": { 434 | "main": [ 435 | [ 436 | { 437 | "node": "Loop Over Items", 438 | "type": "main", 439 | "index": 0 440 | } 441 | ] 442 | ] 443 | } 444 | }, 445 | "active": false, 446 | "settings": { 447 | "executionOrder": "v1" 448 | }, 449 | "versionId": "4ad9f796-26e2-40a1-b5e6-bb7fd8f458b7", 450 | "meta": { 451 | "templateCredsSetupCompleted": true, 452 | "instanceId": "f0a68da631efd4ed052a324b63ff90f7a844426af0398a68338f44245d1dd9e5" 453 | }, 454 | "id": "6WrQJHyt4vjBNj3v", 455 | "tags": [] 456 | } -------------------------------------------------------------------------------- /HackerNews Trending Product/HN_Top_Product.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "HN Top Product", 3 | "nodes": [ 4 | { 5 | "parameters": { 6 | "promptType": "define", 7 | "text": "=```html\n{{ $json.results[0].cleaned_html }}\n```", 8 | "options": { 9 | "systemMessage": "User will provide an extracted HTML version of a crawled website inside \\`\\`\\`html.\n\nThe website is list of about top products post people do on different technology areas.\n\nYou need to find all the posts and return them as response\n\n- MUST consider the points and number of comments.\n- MUST remove \"Show HN\" from the title\n- Comment Link should be full URL with domain and https\n\nOutput guidelines\n- Must be in JSON\n- With each item there should be 'title', 'comments', 'points', 'mainLink' and 'time'. \n- Make sure to use exact key names as defined above\n- Must wrap JSON in \\`\\`\\`json\n\nOutput format (JSON)\n```json\n[{\"title\": \"Product one\", \"comments\": \"link to comments\", \"points\": \"22\", \"time\":\"2025-05-12T05:21:42 1747027302\", \"mainLink\":\"link to the project under titleline\"}]\n```\n" 10 | } 11 | }, 12 | "type": "@n8n/n8n-nodes-langchain.agent", 13 | "typeVersion": 1.9, 14 | "position": [ 15 | 700, 16 | -360 17 | ], 18 | "id": "7127be05-eb7c-4789-af11-e0f52a247399", 19 | "name": "Hacker News Analyser" 20 | }, 21 | { 22 | "parameters": { 23 | "method": "POST", 24 | "url": "http://localhost:11235/crawl", 25 | "sendBody": true, 26 | "specifyBody": "json", 27 | "jsonBody": "{\n \"urls\": [\"https://news.ycombinator.com/show\"],\n \"priority\": 10\n}", 28 | "options": {} 29 | }, 30 | "type": "n8n-nodes-base.httpRequest", 31 | "typeVersion": 4.2, 32 | "position": [ 33 | 500, 34 | -360 35 | ], 36 | "id": "8ab1a10f-a785-48ef-b48b-0f984aad6a66", 37 | "name": "Hacker News Show" 38 | }, 39 | { 40 | "parameters": { 41 | "jsCode": "/**\n * Extract top 3 posts that are 12‑24 h old.\n * @param {string} raw AI model response (includes ```json ... ```)\n * @returns {Array}\n */\nfunction getTopPosts(raw) {\n // strip newlines\n const cleaned = raw.replace(/\\n/g, '');\n \n // pull out the JSON block\n const m = cleaned.match(/```json\\s*([\\s\\S]*?)\\s*```/i);\n if (!m) return [];\n\n let posts;\n try {\n posts = JSON.parse(m[1]);\n } catch (e) {\n console.error('Bad JSON:', e);\n return [];\n }\n \n console.log({raw:posts})\n const now = Date.now();\n const H12_MS = 12 * 60 * 60 * 1000;\n const H24_MS = 24 * 60 * 60 * 1000;\n console.log({now, H12_MS, H24_MS})\n\n const windowed = posts.filter(p => {\n const ts = p.time.split(' ')[1] * 1000\n if (isNaN(ts)) return false;\n\n const age = now - ts;\n return age >= H12_MS && age < H24_MS;\n });\n\n return windowed\n .filter(p => p.points > 100)\n .sort((a, b) => Number(b.points) - Number(a.points))\n .slice(0, 3);\n}\n\n/* ---------- usage ---------- */\nconst aiResponse = $input.first().json.output\n\nreturn getTopPosts(aiResponse);\n" 42 | }, 43 | "type": "n8n-nodes-base.code", 44 | "typeVersion": 2, 45 | "position": [ 46 | 1040, 47 | -360 48 | ], 49 | "id": "bef2b01e-0d3a-458b-8dec-7f530bb520a6", 50 | "name": "Give Products" 51 | }, 52 | { 53 | "parameters": { 54 | "method": "POST", 55 | "url": "http://localhost:11235/crawl", 56 | "sendBody": true, 57 | "specifyBody": "json", 58 | "jsonBody": "={\n \"urls\": [\"{{ $json.comments }}\"],\n \"priority\": 10\n}", 59 | "options": {} 60 | }, 61 | "type": "n8n-nodes-base.httpRequest", 62 | "typeVersion": 4.2, 63 | "position": [ 64 | 1080, 65 | 80 66 | ], 67 | "id": "4c04cbbd-c6dd-4c12-a6cd-d735eac5d023", 68 | "name": "Get Comments" 69 | }, 70 | { 71 | "parameters": { 72 | "options": {} 73 | }, 74 | "type": "n8n-nodes-base.splitInBatches", 75 | "typeVersion": 3, 76 | "position": [ 77 | 780, 78 | 60 79 | ], 80 | "id": "f117c3b0-1c40-4e52-b4a1-c842a40244e5", 81 | "name": "Loop Over Items" 82 | }, 83 | { 84 | "parameters": { 85 | "jsCode": "const input = $input.first().json.output;\n\nconst match = input.match(/```md\\s*([\\s\\S]*?)\\s*```/);\n\nreturn {md: match ? match[1] : \"\"}" 86 | }, 87 | "type": "n8n-nodes-base.code", 88 | "typeVersion": 2, 89 | "position": [ 90 | 1700, 91 | 80 92 | ], 93 | "id": "bb8b62c1-02e2-492c-bd01-812bcb5333e6", 94 | "name": "Clean Report" 95 | }, 96 | { 97 | "parameters": { 98 | "operation": "create", 99 | "base": { 100 | "__rl": true, 101 | "value": "appsxjR5wn1IDLy4u", 102 | "mode": "list", 103 | "cachedResultName": "Social Media Posts", 104 | "cachedResultUrl": "https://airtable.com/appsxjR5wn1IDLy4u" 105 | }, 106 | "table": { 107 | "__rl": true, 108 | "value": "tblh2J0ICXx2Uoyyv", 109 | "mode": "list", 110 | "cachedResultName": "Linkedin Posts", 111 | "cachedResultUrl": "https://airtable.com/appsxjR5wn1IDLy4u/tblh2J0ICXx2Uoyyv" 112 | }, 113 | "columns": { 114 | "mappingMode": "defineBelow", 115 | "value": { 116 | "Status": "Pending", 117 | "Full Report": "={{ $json.md }}", 118 | "Title": "={{ $('Loop Over Items').item.json.title }}", 119 | "Comments Link": "={{ $('Loop Over Items').item.json.comments }}", 120 | "Project Link": "={{ $('Loop Over Items').item.json.mainLink }}" 121 | }, 122 | "matchingColumns": [], 123 | "schema": [ 124 | { 125 | "id": "Title", 126 | "displayName": "Title", 127 | "required": false, 128 | "defaultMatch": false, 129 | "canBeUsedToMatch": true, 130 | "display": true, 131 | "type": "string", 132 | "readOnly": false, 133 | "removed": false 134 | }, 135 | { 136 | "id": "Status", 137 | "displayName": "Status", 138 | "required": false, 139 | "defaultMatch": false, 140 | "canBeUsedToMatch": true, 141 | "display": true, 142 | "type": "options", 143 | "options": [ 144 | { 145 | "name": "Pending", 146 | "value": "Pending" 147 | }, 148 | { 149 | "name": "Needs Approval", 150 | "value": "Needs Approval" 151 | }, 152 | { 153 | "name": "Approved", 154 | "value": "Approved" 155 | }, 156 | { 157 | "name": "Posted", 158 | "value": "Posted" 159 | } 160 | ], 161 | "readOnly": false, 162 | "removed": false 163 | }, 164 | { 165 | "id": "Full Report", 166 | "displayName": "Full Report", 167 | "required": false, 168 | "defaultMatch": false, 169 | "canBeUsedToMatch": true, 170 | "display": true, 171 | "type": "string", 172 | "readOnly": false, 173 | "removed": false 174 | }, 175 | { 176 | "id": "Post Content", 177 | "displayName": "Post Content", 178 | "required": false, 179 | "defaultMatch": false, 180 | "canBeUsedToMatch": true, 181 | "display": true, 182 | "type": "string", 183 | "readOnly": false, 184 | "removed": false 185 | }, 186 | { 187 | "id": "Comments Link", 188 | "displayName": "Comments Link", 189 | "required": false, 190 | "defaultMatch": false, 191 | "canBeUsedToMatch": true, 192 | "display": true, 193 | "type": "string", 194 | "readOnly": false, 195 | "removed": false 196 | }, 197 | { 198 | "id": "Project Link", 199 | "displayName": "Project Link", 200 | "required": false, 201 | "defaultMatch": false, 202 | "canBeUsedToMatch": true, 203 | "display": true, 204 | "type": "string", 205 | "readOnly": false, 206 | "removed": false 207 | } 208 | ], 209 | "attemptToConvertTypes": false, 210 | "convertFieldsToString": false 211 | }, 212 | "options": {} 213 | }, 214 | "type": "n8n-nodes-base.airtable", 215 | "typeVersion": 2.1, 216 | "position": [ 217 | 1940, 218 | 80 219 | ], 220 | "id": "04f2ffe7-fcbb-4780-bb14-65f8ff57f782", 221 | "name": "Airtable", 222 | "credentials": { 223 | "airtableTokenApi": { 224 | "id": "VVqSecErCTMnzYoZ", 225 | "name": "Airtable Personal Access Token account" 226 | } 227 | } 228 | }, 229 | { 230 | "parameters": { 231 | "inputSource": "passthrough" 232 | }, 233 | "type": "n8n-nodes-base.executeWorkflowTrigger", 234 | "typeVersion": 1.1, 235 | "position": [ 236 | 260, 237 | 0 238 | ], 239 | "id": "56f578ba-78b8-4b6c-9066-623e57bd6ffd", 240 | "name": "When Executed by Another Workflow" 241 | }, 242 | { 243 | "parameters": { 244 | "model": "openai/gpt-4.1-nano", 245 | "options": {} 246 | }, 247 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter", 248 | "typeVersion": 1, 249 | "position": [ 250 | 1440, 251 | -260 252 | ], 253 | "id": "8066364b-4984-4d09-beab-ed7e750ec0b2", 254 | "name": "Cheap Brain", 255 | "credentials": { 256 | "openRouterApi": { 257 | "id": "bj1izcizFpf7AJv9", 258 | "name": "OpenRouter account" 259 | } 260 | } 261 | }, 262 | { 263 | "parameters": { 264 | "content": "## Brain\n- Cost Efficient Brain\n- High Quality\n- Fast Response", 265 | "height": 440, 266 | "width": 300 267 | }, 268 | "type": "n8n-nodes-base.stickyNote", 269 | "position": [ 270 | 1300, 271 | -480 272 | ], 273 | "typeVersion": 1, 274 | "id": "82dfcaab-81ef-450f-9700-5d75c8b98420", 275 | "name": "Sticky Note" 276 | }, 277 | { 278 | "parameters": { 279 | "content": "## Post Finder\n- Find top trending post in last 24 hours.\n- Shortlist only three", 280 | "height": 440, 281 | "width": 880, 282 | "color": 4 283 | }, 284 | "type": "n8n-nodes-base.stickyNote", 285 | "position": [ 286 | 380, 287 | -480 288 | ], 289 | "typeVersion": 1, 290 | "id": "327a5c32-27d7-49dd-891b-e53725b113fc", 291 | "name": "Sticky Note1" 292 | }, 293 | { 294 | "parameters": { 295 | "content": "## Product Research\n- Reads discussion\n- Understands features, not listed\n- Gets user feedback from comments\n- Creates a detailed report", 296 | "height": 380, 297 | "width": 1680, 298 | "color": 3 299 | }, 300 | "type": "n8n-nodes-base.stickyNote", 301 | "position": [ 302 | 460, 303 | -20 304 | ], 305 | "typeVersion": 1, 306 | "id": "2102f0eb-8b8f-4519-a58a-878498d6c2c2", 307 | "name": "Sticky Note2" 308 | }, 309 | { 310 | "parameters": { 311 | "promptType": "define", 312 | "text": "=```html\n{{ $json.results[0].cleaned_html }}\n```", 313 | "options": { 314 | "systemMessage": "You will be provided by an HTML code (inside \\`\\`\\`html) extracted from a website where a product is discussed as comments.\n\nMost of the time, owner of the post will be posting a description about the product first, and then there will be discussion.\n\nYou need to create a report of what product is. and other details of the product.\n\nUsing the extracted data, think step by step.\n1. Lay down what can be sections for the article. Should have Interesting achievements section at 2nd position.\n2. Extract the detailed information for each section one by one.\n3. Extract top 5 interesting fact/achievements about the product, \n\nInstructions\n- MUST not show thinking process\n- MUST give final report inside \\`\\`\\`md\n- Report MUST be in Markdown format\n- MUST not assume anything, only rely on information available" 315 | } 316 | }, 317 | "type": "@n8n/n8n-nodes-langchain.agent", 318 | "typeVersion": 1.9, 319 | "position": [ 320 | 1300, 321 | 80 322 | ], 323 | "id": "ab2faea0-c4ab-4375-acf0-27d6bbde0baa", 324 | "name": "Understand Discussion" 325 | }, 326 | { 327 | "parameters": { 328 | "assignments": { 329 | "assignments": [ 330 | { 331 | "id": "e7656f36-9747-4a04-b6f5-889a42170780", 332 | "name": "message", 333 | "value": "Social Media Posts Created", 334 | "type": "string" 335 | } 336 | ] 337 | }, 338 | "options": {} 339 | }, 340 | "type": "n8n-nodes-base.set", 341 | "typeVersion": 3.4, 342 | "position": [ 343 | 980, 344 | -20 345 | ], 346 | "id": "66a88b88-6349-49fe-9e55-73b0e545405a", 347 | "name": "End" 348 | } 349 | ], 350 | "pinData": {}, 351 | "connections": { 352 | "Hacker News Analyser": { 353 | "main": [ 354 | [ 355 | { 356 | "node": "Give Products", 357 | "type": "main", 358 | "index": 0 359 | } 360 | ] 361 | ] 362 | }, 363 | "Hacker News Show": { 364 | "main": [ 365 | [ 366 | { 367 | "node": "Hacker News Analyser", 368 | "type": "main", 369 | "index": 0 370 | } 371 | ] 372 | ] 373 | }, 374 | "Give Products": { 375 | "main": [ 376 | [ 377 | { 378 | "node": "Loop Over Items", 379 | "type": "main", 380 | "index": 0 381 | } 382 | ] 383 | ] 384 | }, 385 | "Loop Over Items": { 386 | "main": [ 387 | [ 388 | { 389 | "node": "End", 390 | "type": "main", 391 | "index": 0 392 | } 393 | ], 394 | [ 395 | { 396 | "node": "Get Comments", 397 | "type": "main", 398 | "index": 0 399 | } 400 | ] 401 | ] 402 | }, 403 | "Get Comments": { 404 | "main": [ 405 | [ 406 | { 407 | "node": "Understand Discussion", 408 | "type": "main", 409 | "index": 0 410 | } 411 | ] 412 | ] 413 | }, 414 | "Clean Report": { 415 | "main": [ 416 | [ 417 | { 418 | "node": "Airtable", 419 | "type": "main", 420 | "index": 0 421 | } 422 | ] 423 | ] 424 | }, 425 | "Airtable": { 426 | "main": [ 427 | [ 428 | { 429 | "node": "Loop Over Items", 430 | "type": "main", 431 | "index": 0 432 | } 433 | ] 434 | ] 435 | }, 436 | "When Executed by Another Workflow": { 437 | "main": [ 438 | [ 439 | { 440 | "node": "Hacker News Show", 441 | "type": "main", 442 | "index": 0 443 | } 444 | ] 445 | ] 446 | }, 447 | "Cheap Brain": { 448 | "ai_languageModel": [ 449 | [ 450 | { 451 | "node": "Hacker News Analyser", 452 | "type": "ai_languageModel", 453 | "index": 0 454 | }, 455 | { 456 | "node": "Understand Discussion", 457 | "type": "ai_languageModel", 458 | "index": 0 459 | } 460 | ] 461 | ] 462 | }, 463 | "Understand Discussion": { 464 | "main": [ 465 | [ 466 | { 467 | "node": "Clean Report", 468 | "type": "main", 469 | "index": 0 470 | } 471 | ] 472 | ] 473 | } 474 | }, 475 | "active": false, 476 | "settings": { 477 | "executionOrder": "v1" 478 | }, 479 | "versionId": "d43c904e-5f53-40c7-bd11-b9036769cf21", 480 | "meta": { 481 | "templateCredsSetupCompleted": true, 482 | "instanceId": "c3507e77e4379f59057306ad7bb9be218363efd8788e56d1d029f4cf772961f8" 483 | }, 484 | "id": "dEj1W8p9Whay8GIT", 485 | "tags": [] 486 | } -------------------------------------------------------------------------------- /Competitor-Analysis-Linkedin-Post/competitor-analysis-linkedin-post.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "My workflow", 3 | "nodes": [ 4 | { 5 | "parameters": {}, 6 | "type": "n8n-nodes-base.manualTrigger", 7 | "typeVersion": 1, 8 | "position": [ 9 | -2500, 10 | -260 11 | ], 12 | "id": "3bb2904b-10bd-4422-808e-042fb6ab4966", 13 | "name": "When clicking \u2018Test workflow\u2019" 14 | }, 15 | { 16 | "parameters": { 17 | "content": "## Get Competitor List\n", 18 | "height": 240, 19 | "width": 280 20 | }, 21 | "type": "n8n-nodes-base.stickyNote", 22 | "typeVersion": 1, 23 | "position": [ 24 | -2160, 25 | -340 26 | ], 27 | "id": "b53580a5-6971-4532-a02a-0d747e9702fc", 28 | "name": "Sticky Note" 29 | }, 30 | { 31 | "parameters": { 32 | "documentId": { 33 | "__rl": true, 34 | "value": "REDACTED", 35 | "mode": "list" 36 | }, 37 | "sheetName": { 38 | "__rl": true, 39 | "value": "REDACTED", 40 | "mode": "list" 41 | }, 42 | "options": {} 43 | }, 44 | "type": "n8n-nodes-base.googleSheets", 45 | "typeVersion": 4.5, 46 | "position": [ 47 | -2080, 48 | -260 49 | ], 50 | "id": "cf8e66bc-676c-443d-90be-a3afa552d40a", 51 | "name": "Google Sheets2", 52 | "credentials": {} 53 | }, 54 | { 55 | "parameters": { 56 | "content": "## Run Apify Profile Scraper\n", 57 | "height": 240, 58 | "width": 320, 59 | "color": 3 60 | }, 61 | "type": "n8n-nodes-base.stickyNote", 62 | "typeVersion": 1, 63 | "position": [ 64 | -1680, 65 | -340 66 | ], 67 | "id": "df47dab2-5dcc-4978-a8f5-6556fb915fd8", 68 | "name": "Sticky Note1" 69 | }, 70 | { 71 | "parameters": { 72 | "method": "POST", 73 | "url": "https://api.apify.com/v2/acts/apimaestro~linkedin-profile-posts/run-sync-get-dataset-items?token=REDACTED", 74 | "sendBody": true, 75 | "specifyBody": "json", 76 | "jsonBody": "={\n \"limit\": 1,\n \"username\": \"{{ $json['LinkedIn URL'] }}\"\n} ", 77 | "options": {} 78 | }, 79 | "type": "n8n-nodes-base.httpRequest", 80 | "typeVersion": 4.2, 81 | "position": [ 82 | -1560, 83 | -260 84 | ], 85 | "id": "2a88274e-ae48-4594-be2d-15394fbf9bb4", 86 | "name": "HTTP Request1" 87 | }, 88 | { 89 | "parameters": { 90 | "content": "## Store Posts on GSheet", 91 | "height": 240, 92 | "width": 320, 93 | "color": 5 94 | }, 95 | "type": "n8n-nodes-base.stickyNote", 96 | "typeVersion": 1, 97 | "position": [ 98 | -1200, 99 | -340 100 | ], 101 | "id": "b31682e6-04f7-41f2-989b-33102a9004af", 102 | "name": "Sticky Note2" 103 | }, 104 | { 105 | "parameters": { 106 | "operation": "append", 107 | "documentId": { 108 | "__rl": true, 109 | "value": "REDACTED", 110 | "mode": "list" 111 | }, 112 | "sheetName": { 113 | "__rl": true, 114 | "value": "REDACTED", 115 | "mode": "list" 116 | }, 117 | "columns": { 118 | "mappingMode": "autoMapInputData", 119 | "value": {}, 120 | "matchingColumns": [], 121 | "schema": [], 122 | "attemptToConvertTypes": false, 123 | "convertFieldsToString": false 124 | }, 125 | "options": {} 126 | }, 127 | "type": "n8n-nodes-base.googleSheets", 128 | "typeVersion": 4.5, 129 | "position": [ 130 | -1100, 131 | -260 132 | ], 133 | "id": "0c668e8a-9552-4f7e-a96a-396162ef94d8", 134 | "name": "Google Sheets3", 135 | "credentials": {} 136 | }, 137 | { 138 | "parameters": { 139 | "maxItems": 5 140 | }, 141 | "type": "n8n-nodes-base.limit", 142 | "typeVersion": 1, 143 | "position": [ 144 | -1840, 145 | -260 146 | ], 147 | "id": "3a7181d8-8967-452e-880f-0f00e94c3176", 148 | "name": "Limit" 149 | }, 150 | { 151 | "parameters": { 152 | "maxItems": 5 153 | }, 154 | "type": "n8n-nodes-base.limit", 155 | "typeVersion": 1, 156 | "position": [ 157 | -1340, 158 | -260 159 | ], 160 | "id": "7d0591a9-6333-40ab-bbf4-74d4d1083ce6", 161 | "name": "Limit1" 162 | }, 163 | { 164 | "parameters": { 165 | "promptType": "define", 166 | "text": "=You're a LinkedIn ghostwriter for a startup called Amplify which is a DTC clothing brand selling sustainable, ethically made apparel - we offer high-quality, eco-conscious clothing that lasts 5x longer than fast fashion, while being competitively priced for the premium segment. You are actually posting from the founders profile to be founder-led marketing\n\n- Premium Clothing (Basics, Activewear, Business Casual, Seasonal Collections)\n- 40% better quality than comparable brands at the same price point\n\nYour audience is:\n\n- Consumers\n- Founders\n- Business Owners\n\nThis is because you are posting through a personal brand profile talking about amplify, and LinkedIn primarily has a B2B/professional audience, and posts that resonate with emotion about building the business through challenges really resonate, as opposed to selling the product in every post. Pay attention to this detail. Your hooks are really good - but you are always selling Amplify the company & the product, when you should really be talking about you + the challenges you went through. It feels too salesy because you're not being real and authentic, which you should fix. I really like the ones where you talked about you + rejection / etc and hardships. DO NOT KEEP TALKING ABOUT THE FEATURES OF THE PRODUCT/BRAND INSTEAD YOU SHOULD GENERALIZE IT A BIT MORE FROM A FOUNDER/BUSINESS OWNER TYPE DIALOGUE (FOR EXAMPLE - REJECTION FROM A VC COULD BE ABOUT THE FACT THAT HES A FIRST TIME FOUNDER TRYING TO BUILD AN APPAREL BRAND INSTEAD OF SAYING I GOT REJECTED FOR SUSTAINABLE FASHION). THIS IS JUST AN EXAMPLE, YOU DO NOT NEED TO FOLLOW THIS EXACT EXAMPLE EVERY GENERATION, ITS JUST A BOILERPLATE TO TELL YOU HOW TO GENERATE\n\nYour job: Write 5 high-performing LinkedIn posts for Amplify that:\n\n- Feel like they're written by the founder (real, sharp, confident)\n- Use high-performing formats (e.g. bold opinion, checklist, mini-story, insight drop, spicy comparison)\n- Tone: direct, founder-led, anti-BS. Not polished marketing speak.\n\nHere is 1 high-performing LinkedIn/Twitter posts with 500+ likes to learn from, using these, generate a high performing post for our brand Amplfy, along with the hook type and text\nHook Type:\n {{ $json.output.hook_type }}\n\nHook/Post Text:\n{{ $json.output.hook_example_text }}", 167 | "hasOutputParser": true 168 | }, 169 | "type": "@n8n/n8n-nodes-langchain.chainLlm", 170 | "typeVersion": 1.6, 171 | "position": [ 172 | -180, 173 | -260 174 | ], 175 | "id": "073c9adc-15e1-4576-a349-d327c4d277c2", 176 | "name": "Basic LLM Chain" 177 | }, 178 | { 179 | "parameters": { 180 | "model": { 181 | "__rl": true, 182 | "mode": "list", 183 | "value": "claude-3-7-sonnet-20250219", 184 | "cachedResultName": "Claude 3.7 Sonnet" 185 | }, 186 | "options": {} 187 | }, 188 | "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic", 189 | "typeVersion": 1.3, 190 | "position": [ 191 | -200, 192 | -60 193 | ], 194 | "id": "d9085e37-3253-42aa-9e74-baff99938e88", 195 | "name": "Anthropic Chat Model", 196 | "credentials": {} 197 | }, 198 | { 199 | "parameters": { 200 | "content": "## Generate Posts from Examples", 201 | "height": 420, 202 | "width": 320, 203 | "color": 6 204 | }, 205 | "type": "n8n-nodes-base.stickyNote", 206 | "typeVersion": 1, 207 | "position": [ 208 | -220, 209 | -360 210 | ], 211 | "id": "638af811-2718-4e0d-9715-cf0acec2d752", 212 | "name": "Sticky Note4" 213 | }, 214 | { 215 | "parameters": { 216 | "jsonSchemaExample": "{\n\t\"post_number\": \"1\",\n\t\"post_text\": \"This is the text of the post itself\"\n}" 217 | }, 218 | "type": "@n8n/n8n-nodes-langchain.outputParserStructured", 219 | "typeVersion": 1.2, 220 | "position": [ 221 | -40, 222 | -40 223 | ], 224 | "id": "fd8c14ef-4cb7-4a98-b3e2-5cc97a795c1d", 225 | "name": "Structured Output Parser" 226 | }, 227 | { 228 | "parameters": { 229 | "content": "## Analyze Posts and Come Up with Post Formats", 230 | "height": 420, 231 | "width": 320, 232 | "color": 6 233 | }, 234 | "type": "n8n-nodes-base.stickyNote", 235 | "typeVersion": 1, 236 | "position": [ 237 | -760, 238 | -380 239 | ], 240 | "id": "701fed0a-433f-403c-83ed-ade0082a1d02", 241 | "name": "Sticky Note5" 242 | }, 243 | { 244 | "parameters": { 245 | "model": { 246 | "__rl": true, 247 | "mode": "list", 248 | "value": "claude-3-7-sonnet-20250219", 249 | "cachedResultName": "Claude 3.7 Sonnet" 250 | }, 251 | "options": {} 252 | }, 253 | "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic", 254 | "typeVersion": 1.3, 255 | "position": [ 256 | -740, 257 | -80 258 | ], 259 | "id": "9378c8dd-db74-480e-8468-450ff3de7ac5", 260 | "name": "Anthropic Chat Model1", 261 | "credentials": {} 262 | }, 263 | { 264 | "parameters": { 265 | "promptType": "define", 266 | "text": "=You're a LinkedIn ghostwriter for a startup called Amplify which is a DTC clothing brand selling sustainable, ethically made apparel - we offer high-quality, eco-conscious clothing that lasts 5x longer than fast fashion, while being competitively priced for the premium segment.\n\nYour job: Analyze these 10 posts from competitors and come up with a list of popular post formats, deeply breaking down what the hook is, what the content type is, and what kind of post it is. This will be used later as the format to mimic when we actually write our post\n\n\nHere is 1 high-performing LinkedIn/Twitter posts with 500+ likes to learn from, using these, analyze them and break down their formats/hooks etc.\n\nPost Text:\n {{ $json.text }}\n\nNumber of Reactions (more=better):\n{{ $json.stats.total_reactions }}", 267 | "hasOutputParser": true 268 | }, 269 | "type": "@n8n/n8n-nodes-langchain.chainLlm", 270 | "typeVersion": 1.6, 271 | "position": [ 272 | -720, 273 | -260 274 | ], 275 | "id": "983b1cc5-f31d-4c5c-94a4-31ac19a7e181", 276 | "name": "Analyze Posts - Anthropic" 277 | }, 278 | { 279 | "parameters": { 280 | "jsonSchemaExample": "{\n\t\"hook_type\": \"Contrasting Past and Present\",\n\t\"hook_example_text\": \"We started Delve out of a cramped MIT dorm room. Here's the story to our office in SF... (In this, show examples of the first 2 hooks of the LinkedIn Posts\"\n}" 281 | }, 282 | "type": "@n8n/n8n-nodes-langchain.outputParserStructured", 283 | "typeVersion": 1.2, 284 | "position": [ 285 | -560, 286 | -80 287 | ], 288 | "id": "ab10e50f-23a9-47cb-adb1-f0b5ed05660d", 289 | "name": "Structured Output Parser1" 290 | }, 291 | { 292 | "parameters": { 293 | "content": "## Add Generated Post to Google Sheet", 294 | "height": 280, 295 | "width": 340, 296 | "color": 5 297 | }, 298 | "type": "n8n-nodes-base.stickyNote", 299 | "typeVersion": 1, 300 | "position": [ 301 | 240, 302 | -300 303 | ], 304 | "id": "18d48c0d-afed-4b07-9771-9d8614f0bc79", 305 | "name": "Sticky Note6" 306 | }, 307 | { 308 | "parameters": { 309 | "operation": "append", 310 | "documentId": { 311 | "__rl": true, 312 | "value": "REDACTED", 313 | "mode": "list" 314 | }, 315 | "sheetName": { 316 | "__rl": true, 317 | "value": "REDACTED", 318 | "mode": "list" 319 | }, 320 | "columns": { 321 | "mappingMode": "defineBelow", 322 | "value": { 323 | "Original Competitor Post": "={{ $('Analyze Posts - Anthropic').item.json.output.hook_example_text }}", 324 | "Generated Post": "={{ $json.output.post_text }}" 325 | }, 326 | "matchingColumns": [], 327 | "schema": [ 328 | { 329 | "id": "Original Competitor Post", 330 | "displayName": "Original Competitor Post", 331 | "required": false, 332 | "defaultMatch": false, 333 | "display": true, 334 | "type": "string", 335 | "canBeUsedToMatch": true 336 | }, 337 | { 338 | "id": "Generated Post", 339 | "displayName": "Generated Post", 340 | "required": false, 341 | "defaultMatch": false, 342 | "display": true, 343 | "type": "string", 344 | "canBeUsedToMatch": true 345 | } 346 | ], 347 | "attemptToConvertTypes": false, 348 | "convertFieldsToString": false 349 | }, 350 | "options": {} 351 | }, 352 | "type": "n8n-nodes-base.googleSheets", 353 | "typeVersion": 4.5, 354 | "position": [ 355 | 340, 356 | -200 357 | ], 358 | "id": "36db2ae9-e11c-433b-960f-919007f9901e", 359 | "name": "Google Sheets", 360 | "credentials": {} 361 | } 362 | ], 363 | "pinData": {}, 364 | "connections": { 365 | "When clicking \u2018Test workflow\u2019": { 366 | "main": [ 367 | [ 368 | { 369 | "node": "Google Sheets2", 370 | "type": "main", 371 | "index": 0 372 | } 373 | ] 374 | ] 375 | }, 376 | "Google Sheets2": { 377 | "main": [ 378 | [ 379 | { 380 | "node": "Limit", 381 | "type": "main", 382 | "index": 0 383 | } 384 | ] 385 | ] 386 | }, 387 | "HTTP Request1": { 388 | "main": [ 389 | [ 390 | { 391 | "node": "Limit1", 392 | "type": "main", 393 | "index": 0 394 | } 395 | ] 396 | ] 397 | }, 398 | "Google Sheets3": { 399 | "main": [ 400 | [ 401 | { 402 | "node": "Analyze Posts - Anthropic", 403 | "type": "main", 404 | "index": 0 405 | } 406 | ] 407 | ] 408 | }, 409 | "Limit": { 410 | "main": [ 411 | [ 412 | { 413 | "node": "HTTP Request1", 414 | "type": "main", 415 | "index": 0 416 | } 417 | ] 418 | ] 419 | }, 420 | "Limit1": { 421 | "main": [ 422 | [ 423 | { 424 | "node": "Google Sheets3", 425 | "type": "main", 426 | "index": 0 427 | } 428 | ] 429 | ] 430 | }, 431 | "Basic LLM Chain": { 432 | "main": [ 433 | [ 434 | { 435 | "node": "Google Sheets", 436 | "type": "main", 437 | "index": 0 438 | } 439 | ] 440 | ] 441 | }, 442 | "Anthropic Chat Model": { 443 | "ai_languageModel": [ 444 | [ 445 | { 446 | "node": "Basic LLM Chain", 447 | "type": "ai_languageModel", 448 | "index": 0 449 | } 450 | ] 451 | ] 452 | }, 453 | "Structured Output Parser": { 454 | "ai_outputParser": [ 455 | [ 456 | { 457 | "node": "Basic LLM Chain", 458 | "type": "ai_outputParser", 459 | "index": 0 460 | } 461 | ] 462 | ] 463 | }, 464 | "Anthropic Chat Model1": { 465 | "ai_languageModel": [ 466 | [ 467 | { 468 | "node": "Analyze Posts - Anthropic", 469 | "type": "ai_languageModel", 470 | "index": 0 471 | } 472 | ] 473 | ] 474 | }, 475 | "Analyze Posts - Anthropic": { 476 | "main": [ 477 | [ 478 | { 479 | "node": "Basic LLM Chain", 480 | "type": "main", 481 | "index": 0 482 | } 483 | ] 484 | ] 485 | }, 486 | "Structured Output Parser1": { 487 | "ai_outputParser": [ 488 | [ 489 | { 490 | "node": "Analyze Posts - Anthropic", 491 | "type": "ai_outputParser", 492 | "index": 0 493 | } 494 | ] 495 | ] 496 | } 497 | }, 498 | "active": false, 499 | "settings": { 500 | "executionOrder": "v1" 501 | }, 502 | "versionId": "c06ecd4d-6b73-4c6e-951e-a167e0cafc02", 503 | "meta": { 504 | "templateCredsSetupCompleted": true, 505 | "instanceId": "168fead106935d011d42ab8e6efa7083b8bcc9576da437d7be9e150f4369ea62" 506 | }, 507 | "id": "BulRg4w777gE2OAx", 508 | "tags": [] 509 | } 510 | -------------------------------------------------------------------------------- /Gmail-Label-Optimiser/Gmail_Optimiser.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Gmail Optimiser", 3 | "nodes": [ 4 | { 5 | "parameters": { 6 | "pollTimes": { 7 | "item": [ 8 | { 9 | "mode": "everyMinute" 10 | } 11 | ] 12 | }, 13 | "simple": false, 14 | "filters": {}, 15 | "options": {} 16 | }, 17 | "type": "n8n-nodes-base.gmailTrigger", 18 | "typeVersion": 1.2, 19 | "position": [ 20 | 0, 21 | 480 22 | ], 23 | "id": "b8974db0-fe4b-4a4c-ab27-21e7b78b2672", 24 | "name": "Gmail Trigger", 25 | "credentials": { 26 | "gmailOAuth2": { 27 | "id": "qaWniySSWX6Qgmeo", 28 | "name": "architjn93@gmail.com" 29 | } 30 | } 31 | }, 32 | { 33 | "parameters": { 34 | "inputText": "=Identify the category of this email -\n\nHTML: {{ $json.html }}\n\nTEXT: {{ $json.text }}\n\nSUBJECT: {{ $json.subject }}", 35 | "categories": { 36 | "categories": [ 37 | { 38 | "category": "Marketing/Promotional", 39 | "description": "The email provided is strictly marketing or promotional" 40 | }, 41 | { 42 | "category": "Stock Updates", 43 | "description": "The email provided is strictly just basic stock update" 44 | }, 45 | { 46 | "category": "Newsletter", 47 | "description": "The email is strictly some kind of newsletter" 48 | }, 49 | { 50 | "category": "Stock Important", 51 | "description": "The email is strictly about affecting your stock portfolio and is not general update." 52 | }, 53 | { 54 | "category": "Sale/Earning", 55 | "description": "The email is strictly about a sale of my product with a value above zero." 56 | }, 57 | { 58 | "category": "Security Alert", 59 | "description": "The email is strictly about security alert of my online account" 60 | }, 61 | { 62 | "category": "Payment Receipt", 63 | "description": "The email is strictly about a spend I did anywhere" 64 | } 65 | ] 66 | }, 67 | "options": { 68 | "fallback": "discard", 69 | "systemPromptTemplate": "Please classify the email content provided by the user into one of the following categories: {categories}, and use the provided formatting instructions below. Don't explain, and only output the json." 70 | } 71 | }, 72 | "type": "@n8n/n8n-nodes-langchain.textClassifier", 73 | "typeVersion": 1.1, 74 | "position": [ 75 | 220, 76 | 480 77 | ], 78 | "id": "7c2a0dbd-8acc-4064-9c7e-86217abeb854", 79 | "name": "Text Classifier" 80 | }, 81 | { 82 | "parameters": { 83 | "model": "openai/gpt-4.1-nano", 84 | "options": {} 85 | }, 86 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter", 87 | "typeVersion": 1, 88 | "position": [ 89 | 308, 90 | 700 91 | ], 92 | "id": "4c86fb80-851d-4dc9-b3d3-6e59e3e70667", 93 | "name": "OpenRouter Chat Model", 94 | "credentials": { 95 | "openRouterApi": { 96 | "id": "CGW0UD2Uwkzjnlyv", 97 | "name": "OpenRouter account" 98 | } 99 | } 100 | }, 101 | { 102 | "parameters": { 103 | "resource": "label", 104 | "returnAll": true 105 | }, 106 | "type": "n8n-nodes-base.gmail", 107 | "typeVersion": 2.1, 108 | "position": [ 109 | 1040, 110 | 480 111 | ], 112 | "id": "0e2f15ad-224d-43c5-b485-e259b83f8ca7", 113 | "name": "Gmail", 114 | "webhookId": "6b76f922-ec53-42ac-a91a-e77be933c5e2", 115 | "credentials": { 116 | "gmailOAuth2": { 117 | "id": "qaWniySSWX6Qgmeo", 118 | "name": "architjn93@gmail.com" 119 | } 120 | } 121 | }, 122 | { 123 | "parameters": { 124 | "assignments": { 125 | "assignments": [ 126 | { 127 | "id": "2fc318d7-4722-4d48-9413-e523e6c331cf", 128 | "name": "classified", 129 | "value": "Marketing", 130 | "type": "string" 131 | } 132 | ] 133 | }, 134 | "options": {} 135 | }, 136 | "type": "n8n-nodes-base.set", 137 | "typeVersion": 3.4, 138 | "position": [ 139 | 596, 140 | -120 141 | ], 142 | "id": "7d09dec0-cae5-468a-b5bf-baaef7a80b8e", 143 | "name": "Marketing" 144 | }, 145 | { 146 | "parameters": { 147 | "assignments": { 148 | "assignments": [ 149 | { 150 | "id": "2fc318d7-4722-4d48-9413-e523e6c331cf", 151 | "name": "classified", 152 | "value": "Stock Updates", 153 | "type": "string" 154 | } 155 | ] 156 | }, 157 | "options": {} 158 | }, 159 | "type": "n8n-nodes-base.set", 160 | "typeVersion": 3.4, 161 | "position": [ 162 | 596, 163 | 80 164 | ], 165 | "id": "767ef774-f85d-4419-a181-5023288d2026", 166 | "name": "Stock Updates" 167 | }, 168 | { 169 | "parameters": { 170 | "assignments": { 171 | "assignments": [ 172 | { 173 | "id": "2fc318d7-4722-4d48-9413-e523e6c331cf", 174 | "name": "classified", 175 | "value": "Newsletter", 176 | "type": "string" 177 | } 178 | ] 179 | }, 180 | "options": {} 181 | }, 182 | "type": "n8n-nodes-base.set", 183 | "typeVersion": 3.4, 184 | "position": [ 185 | 596, 186 | 280 187 | ], 188 | "id": "04fd8e9a-721c-4334-961c-54daaf5c81a2", 189 | "name": "Newsletter" 190 | }, 191 | { 192 | "parameters": { 193 | "assignments": { 194 | "assignments": [ 195 | { 196 | "id": "2fc318d7-4722-4d48-9413-e523e6c331cf", 197 | "name": "classified", 198 | "value": "Stock Important", 199 | "type": "string" 200 | } 201 | ] 202 | }, 203 | "options": {} 204 | }, 205 | "type": "n8n-nodes-base.set", 206 | "typeVersion": 3.4, 207 | "position": [ 208 | 596, 209 | 480 210 | ], 211 | "id": "94c8397e-0676-461d-b36d-de93831bbc92", 212 | "name": "Stock Important" 213 | }, 214 | { 215 | "parameters": { 216 | "assignments": { 217 | "assignments": [ 218 | { 219 | "id": "2fc318d7-4722-4d48-9413-e523e6c331cf", 220 | "name": "classified", 221 | "value": "Earning", 222 | "type": "string" 223 | } 224 | ] 225 | }, 226 | "options": {} 227 | }, 228 | "type": "n8n-nodes-base.set", 229 | "typeVersion": 3.4, 230 | "position": [ 231 | 596, 232 | 680 233 | ], 234 | "id": "2b57ae4f-3614-4516-8b62-0364946d22e3", 235 | "name": "Earning" 236 | }, 237 | { 238 | "parameters": { 239 | "assignments": { 240 | "assignments": [ 241 | { 242 | "id": "2fc318d7-4722-4d48-9413-e523e6c331cf", 243 | "name": "classified", 244 | "value": "Security Alert", 245 | "type": "string" 246 | } 247 | ] 248 | }, 249 | "options": {} 250 | }, 251 | "type": "n8n-nodes-base.set", 252 | "typeVersion": 3.4, 253 | "position": [ 254 | 596, 255 | 880 256 | ], 257 | "id": "c8dc2260-5ef1-40e5-999e-fde8abb2fa53", 258 | "name": "Security Alert" 259 | }, 260 | { 261 | "parameters": { 262 | "assignments": { 263 | "assignments": [ 264 | { 265 | "id": "2fc318d7-4722-4d48-9413-e523e6c331cf", 266 | "name": "classified", 267 | "value": "Spent", 268 | "type": "string" 269 | } 270 | ] 271 | }, 272 | "options": {} 273 | }, 274 | "type": "n8n-nodes-base.set", 275 | "typeVersion": 3.4, 276 | "position": [ 277 | 596, 278 | 1080 279 | ], 280 | "id": "e86e54cc-ecfb-4015-bfdd-1c659bf25002", 281 | "name": "Spent" 282 | }, 283 | { 284 | "parameters": { 285 | "numberInputs": 7 286 | }, 287 | "type": "n8n-nodes-base.merge", 288 | "typeVersion": 3.2, 289 | "position": [ 290 | 820, 291 | 400 292 | ], 293 | "id": "95eaa1eb-1d53-4f61-a286-372b9270cefa", 294 | "name": "Merge" 295 | }, 296 | { 297 | "parameters": { 298 | "jsCode": "const items = $input.all();\nconst filteredList = items.filter(r => r.json.name?.toLowerCase() == $('Merge').first().json.classified?.toLowerCase())\n\nreturn filteredList.length > 0 ? filteredList[0]: {id: \"NA\"};" 299 | }, 300 | "type": "n8n-nodes-base.code", 301 | "typeVersion": 2, 302 | "position": [ 303 | 1260, 304 | 480 305 | ], 306 | "id": "fb2e5db0-4ea6-4f7e-add5-2eba7dfb69b5", 307 | "name": "Filter" 308 | }, 309 | { 310 | "parameters": { 311 | "rules": { 312 | "values": [ 313 | { 314 | "conditions": { 315 | "options": { 316 | "caseSensitive": true, 317 | "leftValue": "", 318 | "typeValidation": "strict", 319 | "version": 2 320 | }, 321 | "conditions": [ 322 | { 323 | "leftValue": "={{ $json.id }}", 324 | "rightValue": "NA", 325 | "operator": { 326 | "type": "string", 327 | "operation": "equals" 328 | }, 329 | "id": "1f3fd335-6ce1-4856-adf6-5d0c44dac708" 330 | } 331 | ], 332 | "combinator": "and" 333 | }, 334 | "renameOutput": true, 335 | "outputKey": "Unknown Category" 336 | }, 337 | { 338 | "conditions": { 339 | "options": { 340 | "caseSensitive": true, 341 | "leftValue": "", 342 | "typeValidation": "strict", 343 | "version": 2 344 | }, 345 | "conditions": [ 346 | { 347 | "id": "4421706d-52ad-48a4-9c20-c0bd0967253e", 348 | "leftValue": "={{ $json.id }}", 349 | "rightValue": "NA", 350 | "operator": { 351 | "type": "string", 352 | "operation": "notEquals" 353 | } 354 | } 355 | ], 356 | "combinator": "and" 357 | }, 358 | "renameOutput": true, 359 | "outputKey": "Existing Category" 360 | } 361 | ] 362 | }, 363 | "options": {} 364 | }, 365 | "type": "n8n-nodes-base.switch", 366 | "typeVersion": 3.2, 367 | "position": [ 368 | 1480, 369 | 480 370 | ], 371 | "id": "02364c27-46c1-40d4-9435-83f26feaa0f0", 372 | "name": "Switch" 373 | }, 374 | { 375 | "parameters": { 376 | "resource": "label", 377 | "operation": "create", 378 | "name": "={{ $('Merge').first().json.classified }}", 379 | "options": {} 380 | }, 381 | "type": "n8n-nodes-base.gmail", 382 | "typeVersion": 2.1, 383 | "position": [ 384 | 1860, 385 | 120 386 | ], 387 | "id": "755a9cfb-c3a3-4667-bd8b-33c5192d1170", 388 | "name": "Create Label", 389 | "webhookId": "fcd87af3-51c8-4f1d-84ff-c9be143aaf6e", 390 | "credentials": { 391 | "gmailOAuth2": { 392 | "id": "qaWniySSWX6Qgmeo", 393 | "name": "architjn93@gmail.com" 394 | } 395 | } 396 | }, 397 | { 398 | "parameters": { 399 | "resource": "thread", 400 | "operation": "addLabels", 401 | "threadId": "={{ $('Gmail Trigger').first().json.threadId }}", 402 | "labelIds": "={{ [$json.id] }}" 403 | }, 404 | "type": "n8n-nodes-base.gmail", 405 | "typeVersion": 2.1, 406 | "position": [ 407 | 2260, 408 | 500 409 | ], 410 | "id": "3bc41b43-ea15-4725-8a1c-680e60456ebb", 411 | "name": "Apply Label", 412 | "webhookId": "57fd8396-cf56-40b7-a57a-13a60ab5751a", 413 | "credentials": { 414 | "gmailOAuth2": { 415 | "id": "qaWniySSWX6Qgmeo", 416 | "name": "architjn93@gmail.com" 417 | } 418 | } 419 | }, 420 | { 421 | "parameters": { 422 | "content": "## New Email Trigger", 423 | "height": 1480, 424 | "width": 220 425 | }, 426 | "type": "n8n-nodes-base.stickyNote", 427 | "position": [ 428 | -60, 429 | -220 430 | ], 431 | "typeVersion": 1, 432 | "id": "fea09302-280e-491c-b158-a659d799414a", 433 | "name": "Sticky Note" 434 | }, 435 | { 436 | "parameters": { 437 | "content": "## Classify Email", 438 | "height": 1480, 439 | "width": 760, 440 | "color": 3 441 | }, 442 | "type": "n8n-nodes-base.stickyNote", 443 | "position": [ 444 | 200, 445 | -220 446 | ], 447 | "typeVersion": 1, 448 | "id": "e3629a00-e2ee-48a6-8644-7f5c60fd92f6", 449 | "name": "Sticky Note1" 450 | }, 451 | { 452 | "parameters": { 453 | "content": "## Find Existing Label", 454 | "height": 1480, 455 | "width": 640, 456 | "color": 5 457 | }, 458 | "type": "n8n-nodes-base.stickyNote", 459 | "position": [ 460 | 980, 461 | -220 462 | ], 463 | "typeVersion": 1, 464 | "id": "c6e59d86-b666-4432-a1c2-30c1485cbe3d", 465 | "name": "Sticky Note2" 466 | }, 467 | { 468 | "parameters": { 469 | "content": "## Create New Label", 470 | "height": 640, 471 | "width": 820, 472 | "color": 6 473 | }, 474 | "type": "n8n-nodes-base.stickyNote", 475 | "position": [ 476 | 1640, 477 | -220 478 | ], 479 | "typeVersion": 1, 480 | "id": "1d613e34-2f23-48d5-ae0b-0f9eef979f7d", 481 | "name": "Sticky Note3" 482 | }, 483 | { 484 | "parameters": { 485 | "content": "## Apply Label", 486 | "height": 820, 487 | "width": 820, 488 | "color": 4 489 | }, 490 | "type": "n8n-nodes-base.stickyNote", 491 | "position": [ 492 | 1640, 493 | 440 494 | ], 495 | "typeVersion": 1, 496 | "id": "1c129b5e-4cf5-4547-9692-250c2cde4a42", 497 | "name": "Sticky Note4" 498 | } 499 | ], 500 | "pinData": {}, 501 | "connections": { 502 | "Gmail Trigger": { 503 | "main": [ 504 | [ 505 | { 506 | "node": "Text Classifier", 507 | "type": "main", 508 | "index": 0 509 | } 510 | ] 511 | ] 512 | }, 513 | "OpenRouter Chat Model": { 514 | "ai_languageModel": [ 515 | [ 516 | { 517 | "node": "Text Classifier", 518 | "type": "ai_languageModel", 519 | "index": 0 520 | } 521 | ] 522 | ] 523 | }, 524 | "Text Classifier": { 525 | "main": [ 526 | [ 527 | { 528 | "node": "Marketing", 529 | "type": "main", 530 | "index": 0 531 | } 532 | ], 533 | [ 534 | { 535 | "node": "Stock Updates", 536 | "type": "main", 537 | "index": 0 538 | } 539 | ], 540 | [ 541 | { 542 | "node": "Newsletter", 543 | "type": "main", 544 | "index": 0 545 | } 546 | ], 547 | [ 548 | { 549 | "node": "Stock Important", 550 | "type": "main", 551 | "index": 0 552 | } 553 | ], 554 | [ 555 | { 556 | "node": "Earning", 557 | "type": "main", 558 | "index": 0 559 | } 560 | ], 561 | [ 562 | { 563 | "node": "Security Alert", 564 | "type": "main", 565 | "index": 0 566 | } 567 | ], 568 | [ 569 | { 570 | "node": "Spent", 571 | "type": "main", 572 | "index": 0 573 | } 574 | ] 575 | ] 576 | }, 577 | "Marketing": { 578 | "main": [ 579 | [ 580 | { 581 | "node": "Merge", 582 | "type": "main", 583 | "index": 0 584 | } 585 | ] 586 | ] 587 | }, 588 | "Merge": { 589 | "main": [ 590 | [ 591 | { 592 | "node": "Gmail", 593 | "type": "main", 594 | "index": 0 595 | } 596 | ] 597 | ] 598 | }, 599 | "Stock Updates": { 600 | "main": [ 601 | [ 602 | { 603 | "node": "Merge", 604 | "type": "main", 605 | "index": 1 606 | } 607 | ] 608 | ] 609 | }, 610 | "Newsletter": { 611 | "main": [ 612 | [ 613 | { 614 | "node": "Merge", 615 | "type": "main", 616 | "index": 2 617 | } 618 | ] 619 | ] 620 | }, 621 | "Stock Important": { 622 | "main": [ 623 | [ 624 | { 625 | "node": "Merge", 626 | "type": "main", 627 | "index": 3 628 | } 629 | ] 630 | ] 631 | }, 632 | "Earning": { 633 | "main": [ 634 | [ 635 | { 636 | "node": "Merge", 637 | "type": "main", 638 | "index": 4 639 | } 640 | ] 641 | ] 642 | }, 643 | "Security Alert": { 644 | "main": [ 645 | [ 646 | { 647 | "node": "Merge", 648 | "type": "main", 649 | "index": 5 650 | } 651 | ] 652 | ] 653 | }, 654 | "Spent": { 655 | "main": [ 656 | [ 657 | { 658 | "node": "Merge", 659 | "type": "main", 660 | "index": 6 661 | } 662 | ] 663 | ] 664 | }, 665 | "Gmail": { 666 | "main": [ 667 | [ 668 | { 669 | "node": "Filter", 670 | "type": "main", 671 | "index": 0 672 | } 673 | ] 674 | ] 675 | }, 676 | "Filter": { 677 | "main": [ 678 | [ 679 | { 680 | "node": "Switch", 681 | "type": "main", 682 | "index": 0 683 | } 684 | ] 685 | ] 686 | }, 687 | "Switch": { 688 | "main": [ 689 | [ 690 | { 691 | "node": "Create Label", 692 | "type": "main", 693 | "index": 0 694 | } 695 | ], 696 | [ 697 | { 698 | "node": "Apply Label", 699 | "type": "main", 700 | "index": 0 701 | } 702 | ] 703 | ] 704 | }, 705 | "Create Label": { 706 | "main": [ 707 | [ 708 | { 709 | "node": "Apply Label", 710 | "type": "main", 711 | "index": 0 712 | } 713 | ] 714 | ] 715 | } 716 | }, 717 | "active": true, 718 | "settings": { 719 | "executionOrder": "v1" 720 | }, 721 | "versionId": "57b3b7a5-d267-417c-9dab-73fea1c2fdfd", 722 | "meta": { 723 | "templateCredsSetupCompleted": true, 724 | "instanceId": "933df83c84196d70ce3ffd0bf5d3e1aca31b7366f2f84e1f3482640096e4a3a9" 725 | }, 726 | "id": "nDFWJnq4gYgNKDm8", 727 | "tags": [] 728 | } -------------------------------------------------------------------------------- /Real-Life-Login-System/Real_Life_Login_System.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Login System", 3 | "nodes": [ 4 | { 5 | "parameters": { 6 | "updates": [ 7 | "message" 8 | ], 9 | "additionalFields": {} 10 | }, 11 | "type": "n8n-nodes-base.telegramTrigger", 12 | "typeVersion": 1.2, 13 | "position": [ 14 | -160, 15 | 800 16 | ], 17 | "id": "47ba2270-9e4d-4bf1-a3c5-c68e2e810065", 18 | "name": "Get Message", 19 | "webhookId": "36b5c727-a6f8-4fee-9055-c9ad06b93a38", 20 | "credentials": { 21 | "telegramApi": { 22 | "id": "nl1aur0dBto9loNM", 23 | "name": "Trader AI Bot" 24 | } 25 | } 26 | }, 27 | { 28 | "parameters": { 29 | "documentId": { 30 | "__rl": true, 31 | "value": "14dImXClDkvAd6bPhyOv5s1DUOg3Q_aTI1l0gO1V0klg", 32 | "mode": "list", 33 | "cachedResultName": "Login Sample Sheet", 34 | "cachedResultUrl": "https://docs.google.com/spreadsheets/d/14dImXClDkvAd6bPhyOv5s1DUOg3Q_aTI1l0gO1V0klg/edit?usp=drivesdk" 35 | }, 36 | "sheetName": { 37 | "__rl": true, 38 | "value": "gid=0", 39 | "mode": "list", 40 | "cachedResultName": "Users", 41 | "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-fthqXBqtGbt0FC4x8ti5cRnvi0apEcJcFIzgQWhHuk/edit#gid=0" 42 | }, 43 | "filtersUI": { 44 | "values": [ 45 | { 46 | "lookupColumn": "Telegram Chat Id", 47 | "lookupValue": "={{ $('Merge').item.json['Telegram Chat Id'] }}" 48 | } 49 | ] 50 | }, 51 | "options": {} 52 | }, 53 | "type": "n8n-nodes-base.googleSheets", 54 | "typeVersion": 4.6, 55 | "position": [ 56 | 560, 57 | 600 58 | ], 59 | "id": "2ab85c19-5f38-49de-b6a6-316c621705f6", 60 | "name": "Find User", 61 | "alwaysOutputData": true, 62 | "credentials": { 63 | "googleSheetsOAuth2Api": { 64 | "id": "Rn3BYzXFYtmdsek1", 65 | "name": "Google Sheets account" 66 | } 67 | } 68 | }, 69 | { 70 | "parameters": { 71 | "rules": { 72 | "values": [ 73 | { 74 | "conditions": { 75 | "options": { 76 | "caseSensitive": true, 77 | "leftValue": "", 78 | "typeValidation": "strict", 79 | "version": 2 80 | }, 81 | "conditions": [ 82 | { 83 | "leftValue": "={{ $json.row_number }}", 84 | "rightValue": "", 85 | "operator": { 86 | "type": "number", 87 | "operation": "exists", 88 | "singleValue": true 89 | }, 90 | "id": "80c45455-653c-43f4-b3ea-5d19f3dfcfcf" 91 | } 92 | ], 93 | "combinator": "and" 94 | }, 95 | "renameOutput": true, 96 | "outputKey": "Old" 97 | }, 98 | { 99 | "conditions": { 100 | "options": { 101 | "caseSensitive": true, 102 | "leftValue": "", 103 | "typeValidation": "strict", 104 | "version": 2 105 | }, 106 | "conditions": [ 107 | { 108 | "id": "98ee6aae-5b1c-4016-9b4b-c288d37381cd", 109 | "leftValue": "={{ $json.row_number }}", 110 | "rightValue": "", 111 | "operator": { 112 | "type": "number", 113 | "operation": "notExists", 114 | "singleValue": true 115 | } 116 | } 117 | ], 118 | "combinator": "and" 119 | }, 120 | "renameOutput": true, 121 | "outputKey": "New" 122 | } 123 | ] 124 | }, 125 | "options": {} 126 | }, 127 | "type": "n8n-nodes-base.switch", 128 | "typeVersion": 3.2, 129 | "position": [ 130 | 760, 131 | 600 132 | ], 133 | "id": "3dcd8b09-cb74-439b-80aa-87c7994e65b1", 134 | "name": "Is New User" 135 | }, 136 | { 137 | "parameters": { 138 | "jsCode": "function uuidv4() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);\n return v.toString(16);\n });\n}\n\nreturn [{ json: { uuid: uuidv4() } }];" 139 | }, 140 | "type": "n8n-nodes-base.code", 141 | "typeVersion": 2, 142 | "position": [ 143 | 920, 144 | 780 145 | ], 146 | "id": "9e20fe5b-c5e0-4b94-8262-01dd022ff0e7", 147 | "name": "Get UserId" 148 | }, 149 | { 150 | "parameters": { 151 | "operation": "append", 152 | "documentId": { 153 | "__rl": true, 154 | "value": "14dImXClDkvAd6bPhyOv5s1DUOg3Q_aTI1l0gO1V0klg", 155 | "mode": "list", 156 | "cachedResultName": "Login Sample Sheet", 157 | "cachedResultUrl": "https://docs.google.com/spreadsheets/d/14dImXClDkvAd6bPhyOv5s1DUOg3Q_aTI1l0gO1V0klg/edit?usp=drivesdk" 158 | }, 159 | "sheetName": { 160 | "__rl": true, 161 | "value": "gid=0", 162 | "mode": "list", 163 | "cachedResultName": "Users", 164 | "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-fthqXBqtGbt0FC4x8ti5cRnvi0apEcJcFIzgQWhHuk/edit#gid=0" 165 | }, 166 | "columns": { 167 | "mappingMode": "defineBelow", 168 | "value": { 169 | "UserId": "={{ $json.uuid }}", 170 | "Name": "={{ $('Get Message').item.json.message.chat.first_name }}", 171 | "Telegram Chat Id": "={{ $('Merge').item.json['Telegram Chat Id'] }}" 172 | }, 173 | "matchingColumns": [], 174 | "schema": [ 175 | { 176 | "id": "UserId", 177 | "displayName": "UserId", 178 | "required": false, 179 | "defaultMatch": false, 180 | "display": true, 181 | "type": "string", 182 | "canBeUsedToMatch": true 183 | }, 184 | { 185 | "id": "Name", 186 | "displayName": "Name", 187 | "required": false, 188 | "defaultMatch": false, 189 | "display": true, 190 | "type": "string", 191 | "canBeUsedToMatch": true 192 | }, 193 | { 194 | "id": "Email", 195 | "displayName": "Email", 196 | "required": false, 197 | "defaultMatch": false, 198 | "display": true, 199 | "type": "string", 200 | "canBeUsedToMatch": true 201 | }, 202 | { 203 | "id": "Telegram Chat Id", 204 | "displayName": "Telegram Chat Id", 205 | "required": false, 206 | "defaultMatch": false, 207 | "display": true, 208 | "type": "string", 209 | "canBeUsedToMatch": true 210 | } 211 | ], 212 | "attemptToConvertTypes": false, 213 | "convertFieldsToString": false 214 | }, 215 | "options": {} 216 | }, 217 | "type": "n8n-nodes-base.googleSheets", 218 | "typeVersion": 4.6, 219 | "position": [ 220 | 1120, 221 | 780 222 | ], 223 | "id": "17f198c5-7a18-4661-b299-3cac28804b99", 224 | "name": "Create User", 225 | "credentials": { 226 | "googleSheetsOAuth2Api": { 227 | "id": "Rn3BYzXFYtmdsek1", 228 | "name": "Google Sheets account" 229 | } 230 | } 231 | }, 232 | { 233 | "parameters": { 234 | "numberInputs": 3 235 | }, 236 | "type": "n8n-nodes-base.merge", 237 | "typeVersion": 3.1, 238 | "position": [ 239 | 1500, 240 | 900 241 | ], 242 | "id": "ae42ce20-dd11-4ae3-8036-3d424cac004b", 243 | "name": "UserId" 244 | }, 245 | { 246 | "parameters": { 247 | "operation": "get", 248 | "propertyName": "UserId", 249 | "key": "=fin-{{ $json['Telegram Chat Id'] }}-userId", 250 | "options": {} 251 | }, 252 | "type": "n8n-nodes-base.redis", 253 | "typeVersion": 1, 254 | "position": [ 255 | 60, 256 | 1040 257 | ], 258 | "id": "d70a4151-887d-475b-baeb-9588be242929", 259 | "name": "Find Cached User", 260 | "credentials": { 261 | "redis": { 262 | "id": "GvDlhohDVV1ytedG", 263 | "name": "Redis account" 264 | } 265 | } 266 | }, 267 | { 268 | "parameters": { 269 | "rules": { 270 | "values": [ 271 | { 272 | "conditions": { 273 | "options": { 274 | "caseSensitive": true, 275 | "leftValue": "", 276 | "typeValidation": "strict", 277 | "version": 2 278 | }, 279 | "conditions": [ 280 | { 281 | "leftValue": "={{ $json.UserId }}", 282 | "rightValue": "", 283 | "operator": { 284 | "type": "string", 285 | "operation": "empty", 286 | "singleValue": true 287 | }, 288 | "id": "155d0a34-e8b7-4b4f-8718-38a2d5f0622b" 289 | } 290 | ], 291 | "combinator": "and" 292 | }, 293 | "renameOutput": true, 294 | "outputKey": "Not Set" 295 | }, 296 | { 297 | "conditions": { 298 | "options": { 299 | "caseSensitive": true, 300 | "leftValue": "", 301 | "typeValidation": "strict", 302 | "version": 2 303 | }, 304 | "conditions": [ 305 | { 306 | "id": "7a2a6895-7019-47f7-a36a-18bf191c18eb", 307 | "leftValue": "={{ $json.UserId }}", 308 | "rightValue": "", 309 | "operator": { 310 | "type": "string", 311 | "operation": "notEmpty", 312 | "singleValue": true 313 | } 314 | } 315 | ], 316 | "combinator": "and" 317 | }, 318 | "renameOutput": true, 319 | "outputKey": "Is Set" 320 | } 321 | ] 322 | }, 323 | "options": {} 324 | }, 325 | "type": "n8n-nodes-base.switch", 326 | "typeVersion": 3.2, 327 | "position": [ 328 | 280, 329 | 1040 330 | ], 331 | "id": "c930bee8-2e8c-4eab-9a59-56ee1cb9349e", 332 | "name": "Is Cached" 333 | }, 334 | { 335 | "parameters": { 336 | "operation": "set", 337 | "key": "=fin-{{ $('Merge').item.json['Telegram Chat Id'] }}-userId", 338 | "value": "={{ $json.UserId }}" 339 | }, 340 | "type": "n8n-nodes-base.redis", 341 | "typeVersion": 1, 342 | "position": [ 343 | 1120, 344 | 580 345 | ], 346 | "id": "4896c86b-42f8-4b18-899b-f4353ef397ac", 347 | "name": "Cache User", 348 | "credentials": { 349 | "redis": { 350 | "id": "GvDlhohDVV1ytedG", 351 | "name": "Redis account" 352 | } 353 | } 354 | }, 355 | { 356 | "parameters": { 357 | "content": "# Find or Create User", 358 | "height": 880, 359 | "width": 2080, 360 | "color": 3 361 | }, 362 | "type": "n8n-nodes-base.stickyNote", 363 | "position": [ 364 | -320, 365 | 420 366 | ], 367 | "typeVersion": 1, 368 | "id": "07465c66-6b72-4870-b02d-156e32f551ab", 369 | "name": "Sticky Note" 370 | }, 371 | { 372 | "parameters": { 373 | "workflowInputs": { 374 | "values": [ 375 | { 376 | "name": "message" 377 | }, 378 | { 379 | "name": "userId" 380 | } 381 | ] 382 | } 383 | }, 384 | "type": "n8n-nodes-base.executeWorkflowTrigger", 385 | "typeVersion": 1.1, 386 | "position": [ 387 | -160, 388 | 600 389 | ], 390 | "id": "715e7922-e3fc-40cb-8a00-207c2ac08861", 391 | "name": "When Executed by Another Workflow" 392 | }, 393 | { 394 | "parameters": {}, 395 | "type": "n8n-nodes-base.merge", 396 | "typeVersion": 3.1, 397 | "position": [ 398 | -160, 399 | 1040 400 | ], 401 | "id": "5de97977-1128-42f7-9b96-075dd9662e1e", 402 | "name": "Merge" 403 | }, 404 | { 405 | "parameters": { 406 | "documentId": { 407 | "__rl": true, 408 | "value": "14dImXClDkvAd6bPhyOv5s1DUOg3Q_aTI1l0gO1V0klg", 409 | "mode": "list", 410 | "cachedResultName": "Login Sample Sheet", 411 | "cachedResultUrl": "https://docs.google.com/spreadsheets/d/14dImXClDkvAd6bPhyOv5s1DUOg3Q_aTI1l0gO1V0klg/edit?usp=drivesdk" 412 | }, 413 | "sheetName": { 414 | "__rl": true, 415 | "value": "gid=0", 416 | "mode": "list", 417 | "cachedResultName": "Users", 418 | "cachedResultUrl": "https://docs.google.com/spreadsheets/d/14dImXClDkvAd6bPhyOv5s1DUOg3Q_aTI1l0gO1V0klg/edit#gid=0" 419 | }, 420 | "filtersUI": { 421 | "values": [ 422 | { 423 | "lookupColumn": "UserId", 424 | "lookupValue": "={{ $json.userId }}" 425 | } 426 | ] 427 | }, 428 | "options": {} 429 | }, 430 | "type": "n8n-nodes-base.googleSheets", 431 | "typeVersion": 4.6, 432 | "position": [ 433 | 60, 434 | 600 435 | ], 436 | "id": "5e68c21d-51f2-4a61-803b-5aff05007d3c", 437 | "name": "Get User", 438 | "credentials": { 439 | "googleSheetsOAuth2Api": { 440 | "id": "Rn3BYzXFYtmdsek1", 441 | "name": "Google Sheets account" 442 | } 443 | } 444 | }, 445 | { 446 | "parameters": { 447 | "assignments": { 448 | "assignments": [ 449 | { 450 | "id": "62f2f7d1-f852-403e-9e05-a686721b6557", 451 | "name": "Telegram Chat Id", 452 | "value": "={{ $json.message.chat.id }}", 453 | "type": "string" 454 | }, 455 | { 456 | "id": "d3c87a8a-ed93-4509-87ad-baffd513de3f", 457 | "name": "Message", 458 | "value": "={{ $json.message.text }}", 459 | "type": "string" 460 | } 461 | ] 462 | }, 463 | "options": {} 464 | }, 465 | "type": "n8n-nodes-base.set", 466 | "typeVersion": 3.4, 467 | "position": [ 468 | 60, 469 | 800 470 | ], 471 | "id": "da473a91-2c5b-4d6d-b850-4c35a1426625", 472 | "name": "Edit Fields" 473 | }, 474 | { 475 | "parameters": { 476 | "assignments": { 477 | "assignments": [ 478 | { 479 | "id": "62f2f7d1-f852-403e-9e05-a686721b6557", 480 | "name": "Telegram Chat Id", 481 | "value": "={{ $json['Telegram Chat Id'] }}", 482 | "type": "string" 483 | }, 484 | { 485 | "id": "d3c87a8a-ed93-4509-87ad-baffd513de3f", 486 | "name": "Message", 487 | "value": "={{ $('When Executed by Another Workflow').item.json.message }}", 488 | "type": "string" 489 | } 490 | ] 491 | }, 492 | "options": {} 493 | }, 494 | "type": "n8n-nodes-base.set", 495 | "typeVersion": 3.4, 496 | "position": [ 497 | 320, 498 | 600 499 | ], 500 | "id": "642b0052-8987-4c09-b926-5382e37ddc02", 501 | "name": "Edit Fields2" 502 | } 503 | ], 504 | "pinData": {}, 505 | "connections": { 506 | "Get Message": { 507 | "main": [ 508 | [ 509 | { 510 | "node": "Edit Fields", 511 | "type": "main", 512 | "index": 0 513 | } 514 | ] 515 | ] 516 | }, 517 | "Find User": { 518 | "main": [ 519 | [ 520 | { 521 | "node": "Is New User", 522 | "type": "main", 523 | "index": 0 524 | } 525 | ] 526 | ] 527 | }, 528 | "Is New User": { 529 | "main": [ 530 | [ 531 | { 532 | "node": "Cache User", 533 | "type": "main", 534 | "index": 0 535 | } 536 | ], 537 | [ 538 | { 539 | "node": "Get UserId", 540 | "type": "main", 541 | "index": 0 542 | } 543 | ] 544 | ] 545 | }, 546 | "Get UserId": { 547 | "main": [ 548 | [ 549 | { 550 | "node": "Create User", 551 | "type": "main", 552 | "index": 0 553 | } 554 | ] 555 | ] 556 | }, 557 | "Create User": { 558 | "main": [ 559 | [ 560 | { 561 | "node": "UserId", 562 | "type": "main", 563 | "index": 1 564 | } 565 | ] 566 | ] 567 | }, 568 | "UserId": { 569 | "main": [ 570 | [] 571 | ] 572 | }, 573 | "Find Cached User": { 574 | "main": [ 575 | [ 576 | { 577 | "node": "Is Cached", 578 | "type": "main", 579 | "index": 0 580 | } 581 | ] 582 | ] 583 | }, 584 | "Is Cached": { 585 | "main": [ 586 | [ 587 | { 588 | "node": "Find User", 589 | "type": "main", 590 | "index": 0 591 | } 592 | ], 593 | [ 594 | { 595 | "node": "UserId", 596 | "type": "main", 597 | "index": 2 598 | } 599 | ] 600 | ] 601 | }, 602 | "Cache User": { 603 | "main": [ 604 | [ 605 | { 606 | "node": "UserId", 607 | "type": "main", 608 | "index": 0 609 | } 610 | ] 611 | ] 612 | }, 613 | "When Executed by Another Workflow": { 614 | "main": [ 615 | [ 616 | { 617 | "node": "Get User", 618 | "type": "main", 619 | "index": 0 620 | } 621 | ] 622 | ] 623 | }, 624 | "Merge": { 625 | "main": [ 626 | [ 627 | { 628 | "node": "Find Cached User", 629 | "type": "main", 630 | "index": 0 631 | } 632 | ] 633 | ] 634 | }, 635 | "Get User": { 636 | "main": [ 637 | [ 638 | { 639 | "node": "Edit Fields2", 640 | "type": "main", 641 | "index": 0 642 | } 643 | ] 644 | ] 645 | }, 646 | "Edit Fields": { 647 | "main": [ 648 | [ 649 | { 650 | "node": "Merge", 651 | "type": "main", 652 | "index": 1 653 | } 654 | ] 655 | ] 656 | }, 657 | "Edit Fields2": { 658 | "main": [ 659 | [ 660 | { 661 | "node": "Merge", 662 | "type": "main", 663 | "index": 0 664 | } 665 | ] 666 | ] 667 | } 668 | }, 669 | "active": false, 670 | "settings": { 671 | "executionOrder": "v1" 672 | }, 673 | "versionId": "c91fe9b2-0dd1-4aeb-a3d5-37e962b09495", 674 | "meta": { 675 | "templateCredsSetupCompleted": true, 676 | "instanceId": "933df83c84196d70ce3ffd0bf5d3e1aca31b7366f2f84e1f3482640096e4a3a9" 677 | }, 678 | "id": "wQIlBiGuRAehquVv", 679 | "tags": [] 680 | } -------------------------------------------------------------------------------- /Cold-Mailing-v0.1/Cold_Mailing.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Cold Mailing", 3 | "nodes": [ 4 | { 5 | "parameters": {}, 6 | "type": "n8n-nodes-base.manualTrigger", 7 | "typeVersion": 1, 8 | "position": [ 9 | 0, 10 | 100 11 | ], 12 | "id": "26279898-0db1-48e6-a1e7-7490e85927a7", 13 | "name": "When clicking ‘Test workflow’" 14 | }, 15 | { 16 | "parameters": { 17 | "operation": "search", 18 | "base": { 19 | "__rl": true, 20 | "value": "appQ5QAPg3YP3laMB", 21 | "mode": "list", 22 | "cachedResultName": "Untitled Base", 23 | "cachedResultUrl": "https://airtable.com/appQ5QAPg3YP3laMB" 24 | }, 25 | "table": { 26 | "__rl": true, 27 | "value": "tbl14xeFbMZuie4qO", 28 | "mode": "list", 29 | "cachedResultName": "Customer Records", 30 | "cachedResultUrl": "https://airtable.com/appQ5QAPg3YP3laMB/tbl14xeFbMZuie4qO" 31 | }, 32 | "filterByFormula": "{status} = 'Pending'", 33 | "returnAll": false, 34 | "limit": 1, 35 | "options": {} 36 | }, 37 | "type": "n8n-nodes-base.airtable", 38 | "typeVersion": 2.1, 39 | "position": [ 40 | 220, 41 | 100 42 | ], 43 | "id": "00622250-2fba-4dbc-9b02-748f18c9972f", 44 | "name": "Airtable1", 45 | "credentials": { 46 | "airtableTokenApi": { 47 | "id": "VVqSecErCTMnzYoZ", 48 | "name": "Airtable Personal Access Token account" 49 | } 50 | } 51 | }, 52 | { 53 | "parameters": { 54 | "promptType": "define", 55 | "text": "=Please write an email for the person with following details-\n\nCompany Name - {{ $json.company_cleaned }}\nPerson's First Name - {{ $json.firstname_cleaned }}\nPerson's Last Name - {{ $json.lastname_cleaned }}\nPerson's Working Industry - {{ $json.industry }}\nPerson lives in {{ $json.location }}\nPerson is having job title {{ $json.job }} in the company.\nCompany website is {{ $json.company_website }}\nCompany's industry is {{ $json.company_industry }}\nCompany's Location is {{ $json.company_location }}\nCurrent Company employee count is {{ $json.company_employee_count }}", 56 | "hasOutputParser": true, 57 | "options": { 58 | "systemMessage": "you are asked to create an cold email to a professional, the email should feel personal and hand written by a human. No AI detectable word should be used. Keep human touch in emails. Keep the starting 70% of the email related to the person to make them excited and read more and in rest 30% be subtle to promote to use our product. make it crisp, shorter, easy to understand and interesting.\n\nservice we provide is AI custom solutions. when you talk about our services be specific on what can be improved in their existing systems to excite them more. Make the email specifically targeting to their designation. Only talk about how it can improve process.\n\ndo not assume things, only talk about whatever the information is available. Make sure to only include information which is relevant for the email, not all information has to be in the email.\n\nformatting tips\n- just give the email body, do not give any subject or any other irrelevant explanation with response.\n- Email system cannot render styling, so keep simple text, no bold, or any other styling.\n- Do not leave any placeholders, all the values should be filled in" 59 | } 60 | }, 61 | "type": "@n8n/n8n-nodes-langchain.agent", 62 | "typeVersion": 1.9, 63 | "position": [ 64 | 440, 65 | 0 66 | ], 67 | "id": "c22f660b-8f6d-4656-8a4e-a28ce2687717", 68 | "name": "AI Agent" 69 | }, 70 | { 71 | "parameters": { 72 | "model": "deepseek/deepseek-r1:free", 73 | "options": {} 74 | }, 75 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter", 76 | "typeVersion": 1, 77 | "position": [ 78 | 528, 79 | 220 80 | ], 81 | "id": "91f91bc9-8146-46c4-abc9-5db7b6a0948c", 82 | "name": "OpenRouter Chat Model", 83 | "credentials": { 84 | "openRouterApi": { 85 | "id": "KDCaXFkFWD4mKsO1", 86 | "name": "OpenRouter account" 87 | } 88 | } 89 | }, 90 | { 91 | "parameters": { 92 | "rule": { 93 | "interval": [ 94 | { 95 | "field": "minutes" 96 | } 97 | ] 98 | } 99 | }, 100 | "type": "n8n-nodes-base.scheduleTrigger", 101 | "typeVersion": 1.2, 102 | "position": [ 103 | 0, 104 | 460 105 | ], 106 | "id": "e30e1666-e748-4257-a7e2-4171f82791eb", 107 | "name": "Schedule Trigger" 108 | }, 109 | { 110 | "parameters": { 111 | "fromEmail": "postmaster@example.com", 112 | "toEmail": "={{ $json.fields.Email }}", 113 | "subject": "={{ $json.fields.email_subject }}", 114 | "emailFormat": "text", 115 | "text": "={{ $json.fields.email_copy }}", 116 | "options": { 117 | "appendAttribution": false 118 | } 119 | }, 120 | "type": "n8n-nodes-base.emailSend", 121 | "typeVersion": 2.1, 122 | "position": [ 123 | 660, 124 | 460 125 | ], 126 | "id": "17e423f5-63f7-4c4c-b490-29cb477d688b", 127 | "name": "Send Email", 128 | "webhookId": "2b4fd971-7ea3-4dab-9504-581e26b0ec44", 129 | "credentials": { 130 | "smtp": { 131 | "id": "tjpUMX2Hw7xaBngN", 132 | "name": "Mail Gun SMTP" 133 | } 134 | } 135 | }, 136 | { 137 | "parameters": { 138 | "operation": "search", 139 | "base": { 140 | "__rl": true, 141 | "value": "appQ5QAPg3YP3laMB", 142 | "mode": "list", 143 | "cachedResultName": "Untitled Base", 144 | "cachedResultUrl": "https://airtable.com/appQ5QAPg3YP3laMB" 145 | }, 146 | "table": { 147 | "__rl": true, 148 | "value": "tbl14xeFbMZuie4qO", 149 | "mode": "list", 150 | "cachedResultName": "Customer Records", 151 | "cachedResultUrl": "https://airtable.com/appQ5QAPg3YP3laMB/tbl14xeFbMZuie4qO" 152 | }, 153 | "filterByFormula": "{status} = 'Approved'", 154 | "returnAll": false, 155 | "limit": 1, 156 | "options": {} 157 | }, 158 | "type": "n8n-nodes-base.airtable", 159 | "typeVersion": 2.1, 160 | "position": [ 161 | 220, 162 | 460 163 | ], 164 | "id": "bd8e6193-a456-4c99-ac56-7055ae587102", 165 | "name": "Get Approved Message", 166 | "credentials": { 167 | "airtableTokenApi": { 168 | "id": "VVqSecErCTMnzYoZ", 169 | "name": "Airtable Personal Access Token account" 170 | } 171 | } 172 | }, 173 | { 174 | "parameters": { 175 | "operation": "upsert", 176 | "base": { 177 | "__rl": true, 178 | "value": "appQ5QAPg3YP3laMB", 179 | "mode": "list", 180 | "cachedResultName": "Untitled Base", 181 | "cachedResultUrl": "https://airtable.com/appQ5QAPg3YP3laMB" 182 | }, 183 | "table": { 184 | "__rl": true, 185 | "value": "tbl14xeFbMZuie4qO", 186 | "mode": "list", 187 | "cachedResultName": "Customer Records", 188 | "cachedResultUrl": "https://airtable.com/appQ5QAPg3YP3laMB/tbl14xeFbMZuie4qO" 189 | }, 190 | "columns": { 191 | "mappingMode": "defineBelow", 192 | "value": { 193 | "id": "={{ $json.id }}", 194 | "status": "Sending", 195 | "company_employee_count": 0 196 | }, 197 | "matchingColumns": [ 198 | "id" 199 | ], 200 | "schema": [ 201 | { 202 | "id": "id", 203 | "displayName": "id", 204 | "required": false, 205 | "defaultMatch": true, 206 | "display": true, 207 | "type": "string", 208 | "readOnly": true, 209 | "removed": false 210 | }, 211 | { 212 | "id": "company_cleaned", 213 | "displayName": "company_cleaned", 214 | "required": false, 215 | "defaultMatch": false, 216 | "canBeUsedToMatch": true, 217 | "display": true, 218 | "type": "string", 219 | "readOnly": false, 220 | "removed": false 221 | }, 222 | { 223 | "id": "status", 224 | "displayName": "status", 225 | "required": false, 226 | "defaultMatch": false, 227 | "canBeUsedToMatch": true, 228 | "display": true, 229 | "type": "options", 230 | "options": [ 231 | { 232 | "name": "pending", 233 | "value": "pending" 234 | }, 235 | { 236 | "name": "Approval Pending", 237 | "value": "Approval Pending" 238 | }, 239 | { 240 | "name": "Approved", 241 | "value": "Approved" 242 | }, 243 | { 244 | "name": "Sending", 245 | "value": "Sending" 246 | }, 247 | { 248 | "name": "Sent", 249 | "value": "Sent" 250 | } 251 | ], 252 | "readOnly": false, 253 | "removed": false 254 | }, 255 | { 256 | "id": "firstname_cleaned", 257 | "displayName": "firstname_cleaned", 258 | "required": false, 259 | "defaultMatch": false, 260 | "canBeUsedToMatch": true, 261 | "display": true, 262 | "type": "string", 263 | "readOnly": false, 264 | "removed": false 265 | }, 266 | { 267 | "id": "lastname_cleaned", 268 | "displayName": "lastname_cleaned", 269 | "required": false, 270 | "defaultMatch": false, 271 | "canBeUsedToMatch": true, 272 | "display": true, 273 | "type": "string", 274 | "readOnly": false, 275 | "removed": false 276 | }, 277 | { 278 | "id": "industry", 279 | "displayName": "industry", 280 | "required": false, 281 | "defaultMatch": false, 282 | "canBeUsedToMatch": true, 283 | "display": true, 284 | "type": "string", 285 | "readOnly": false, 286 | "removed": false 287 | }, 288 | { 289 | "id": "location", 290 | "displayName": "location", 291 | "required": false, 292 | "defaultMatch": false, 293 | "canBeUsedToMatch": true, 294 | "display": true, 295 | "type": "string", 296 | "readOnly": false, 297 | "removed": false 298 | }, 299 | { 300 | "id": "job", 301 | "displayName": "job", 302 | "required": false, 303 | "defaultMatch": false, 304 | "canBeUsedToMatch": true, 305 | "display": true, 306 | "type": "string", 307 | "readOnly": false, 308 | "removed": false 309 | }, 310 | { 311 | "id": "Email", 312 | "displayName": "Email", 313 | "required": false, 314 | "defaultMatch": false, 315 | "canBeUsedToMatch": true, 316 | "display": true, 317 | "type": "string", 318 | "readOnly": false, 319 | "removed": false 320 | }, 321 | { 322 | "id": "Mobile no.", 323 | "displayName": "Mobile no.", 324 | "required": false, 325 | "defaultMatch": false, 326 | "canBeUsedToMatch": true, 327 | "display": true, 328 | "type": "string", 329 | "readOnly": false, 330 | "removed": false 331 | }, 332 | { 333 | "id": "company_website", 334 | "displayName": "company_website", 335 | "required": false, 336 | "defaultMatch": false, 337 | "canBeUsedToMatch": true, 338 | "display": true, 339 | "type": "string", 340 | "readOnly": false, 341 | "removed": false 342 | }, 343 | { 344 | "id": "company_industry", 345 | "displayName": "company_industry", 346 | "required": false, 347 | "defaultMatch": false, 348 | "canBeUsedToMatch": true, 349 | "display": true, 350 | "type": "string", 351 | "readOnly": false, 352 | "removed": false 353 | }, 354 | { 355 | "id": "company_location", 356 | "displayName": "company_location", 357 | "required": false, 358 | "defaultMatch": false, 359 | "canBeUsedToMatch": true, 360 | "display": true, 361 | "type": "string", 362 | "readOnly": false, 363 | "removed": false 364 | }, 365 | { 366 | "id": "company_employee_count", 367 | "displayName": "company_employee_count", 368 | "required": false, 369 | "defaultMatch": false, 370 | "canBeUsedToMatch": true, 371 | "display": true, 372 | "type": "number", 373 | "readOnly": false, 374 | "removed": false 375 | }, 376 | { 377 | "id": "company_linkedin", 378 | "displayName": "company_linkedin", 379 | "required": false, 380 | "defaultMatch": false, 381 | "canBeUsedToMatch": true, 382 | "display": true, 383 | "type": "string", 384 | "readOnly": false, 385 | "removed": false 386 | }, 387 | { 388 | "id": "salesnavigator_url", 389 | "displayName": "salesnavigator_url", 390 | "required": false, 391 | "defaultMatch": false, 392 | "canBeUsedToMatch": true, 393 | "display": true, 394 | "type": "string", 395 | "readOnly": false, 396 | "removed": false 397 | }, 398 | { 399 | "id": "linkedin_profile_url", 400 | "displayName": "linkedin_profile_url", 401 | "required": false, 402 | "defaultMatch": false, 403 | "canBeUsedToMatch": true, 404 | "display": true, 405 | "type": "string", 406 | "readOnly": false, 407 | "removed": false 408 | }, 409 | { 410 | "id": "email_copy", 411 | "displayName": "email_copy", 412 | "required": false, 413 | "defaultMatch": false, 414 | "canBeUsedToMatch": true, 415 | "display": true, 416 | "type": "string", 417 | "readOnly": false, 418 | "removed": false 419 | } 420 | ], 421 | "attemptToConvertTypes": false, 422 | "convertFieldsToString": false 423 | }, 424 | "options": {} 425 | }, 426 | "type": "n8n-nodes-base.airtable", 427 | "typeVersion": 2.1, 428 | "position": [ 429 | 440, 430 | 460 431 | ], 432 | "id": "98f25e08-d6b9-41d7-8baf-a48da75c2985", 433 | "name": "Sending Status Change", 434 | "credentials": { 435 | "airtableTokenApi": { 436 | "id": "VVqSecErCTMnzYoZ", 437 | "name": "Airtable Personal Access Token account" 438 | } 439 | } 440 | }, 441 | { 442 | "parameters": { 443 | "operation": "upsert", 444 | "base": { 445 | "__rl": true, 446 | "value": "appQ5QAPg3YP3laMB", 447 | "mode": "list", 448 | "cachedResultName": "Untitled Base", 449 | "cachedResultUrl": "https://airtable.com/appQ5QAPg3YP3laMB" 450 | }, 451 | "table": { 452 | "__rl": true, 453 | "value": "tbl14xeFbMZuie4qO", 454 | "mode": "list", 455 | "cachedResultName": "Customer Records", 456 | "cachedResultUrl": "https://airtable.com/appQ5QAPg3YP3laMB/tbl14xeFbMZuie4qO" 457 | }, 458 | "columns": { 459 | "mappingMode": "defineBelow", 460 | "value": { 461 | "id": "={{ $('Get Approved Message').item.json.id }}", 462 | "status": "Sent", 463 | "company_employee_count": 0 464 | }, 465 | "matchingColumns": [ 466 | "id" 467 | ], 468 | "schema": [ 469 | { 470 | "id": "id", 471 | "displayName": "id", 472 | "required": false, 473 | "defaultMatch": true, 474 | "display": true, 475 | "type": "string", 476 | "readOnly": true, 477 | "removed": false 478 | }, 479 | { 480 | "id": "company_cleaned", 481 | "displayName": "company_cleaned", 482 | "required": false, 483 | "defaultMatch": false, 484 | "canBeUsedToMatch": true, 485 | "display": true, 486 | "type": "string", 487 | "readOnly": false, 488 | "removed": false 489 | }, 490 | { 491 | "id": "status", 492 | "displayName": "status", 493 | "required": false, 494 | "defaultMatch": false, 495 | "canBeUsedToMatch": true, 496 | "display": true, 497 | "type": "options", 498 | "options": [ 499 | { 500 | "name": "pending", 501 | "value": "pending" 502 | }, 503 | { 504 | "name": "Approval Pending", 505 | "value": "Approval Pending" 506 | }, 507 | { 508 | "name": "Approved", 509 | "value": "Approved" 510 | }, 511 | { 512 | "name": "Sending", 513 | "value": "Sending" 514 | }, 515 | { 516 | "name": "Sent", 517 | "value": "Sent" 518 | } 519 | ], 520 | "readOnly": false, 521 | "removed": false 522 | }, 523 | { 524 | "id": "firstname_cleaned", 525 | "displayName": "firstname_cleaned", 526 | "required": false, 527 | "defaultMatch": false, 528 | "canBeUsedToMatch": true, 529 | "display": true, 530 | "type": "string", 531 | "readOnly": false, 532 | "removed": false 533 | }, 534 | { 535 | "id": "lastname_cleaned", 536 | "displayName": "lastname_cleaned", 537 | "required": false, 538 | "defaultMatch": false, 539 | "canBeUsedToMatch": true, 540 | "display": true, 541 | "type": "string", 542 | "readOnly": false, 543 | "removed": false 544 | }, 545 | { 546 | "id": "industry", 547 | "displayName": "industry", 548 | "required": false, 549 | "defaultMatch": false, 550 | "canBeUsedToMatch": true, 551 | "display": true, 552 | "type": "string", 553 | "readOnly": false, 554 | "removed": false 555 | }, 556 | { 557 | "id": "location", 558 | "displayName": "location", 559 | "required": false, 560 | "defaultMatch": false, 561 | "canBeUsedToMatch": true, 562 | "display": true, 563 | "type": "string", 564 | "readOnly": false, 565 | "removed": false 566 | }, 567 | { 568 | "id": "job", 569 | "displayName": "job", 570 | "required": false, 571 | "defaultMatch": false, 572 | "canBeUsedToMatch": true, 573 | "display": true, 574 | "type": "string", 575 | "readOnly": false, 576 | "removed": false 577 | }, 578 | { 579 | "id": "Email", 580 | "displayName": "Email", 581 | "required": false, 582 | "defaultMatch": false, 583 | "canBeUsedToMatch": true, 584 | "display": true, 585 | "type": "string", 586 | "readOnly": false, 587 | "removed": false 588 | }, 589 | { 590 | "id": "Mobile no.", 591 | "displayName": "Mobile no.", 592 | "required": false, 593 | "defaultMatch": false, 594 | "canBeUsedToMatch": true, 595 | "display": true, 596 | "type": "string", 597 | "readOnly": false, 598 | "removed": false 599 | }, 600 | { 601 | "id": "company_website", 602 | "displayName": "company_website", 603 | "required": false, 604 | "defaultMatch": false, 605 | "canBeUsedToMatch": true, 606 | "display": true, 607 | "type": "string", 608 | "readOnly": false, 609 | "removed": false 610 | }, 611 | { 612 | "id": "company_industry", 613 | "displayName": "company_industry", 614 | "required": false, 615 | "defaultMatch": false, 616 | "canBeUsedToMatch": true, 617 | "display": true, 618 | "type": "string", 619 | "readOnly": false, 620 | "removed": false 621 | }, 622 | { 623 | "id": "company_location", 624 | "displayName": "company_location", 625 | "required": false, 626 | "defaultMatch": false, 627 | "canBeUsedToMatch": true, 628 | "display": true, 629 | "type": "string", 630 | "readOnly": false, 631 | "removed": false 632 | }, 633 | { 634 | "id": "company_employee_count", 635 | "displayName": "company_employee_count", 636 | "required": false, 637 | "defaultMatch": false, 638 | "canBeUsedToMatch": true, 639 | "display": true, 640 | "type": "number", 641 | "readOnly": false, 642 | "removed": false 643 | }, 644 | { 645 | "id": "company_linkedin", 646 | "displayName": "company_linkedin", 647 | "required": false, 648 | "defaultMatch": false, 649 | "canBeUsedToMatch": true, 650 | "display": true, 651 | "type": "string", 652 | "readOnly": false, 653 | "removed": false 654 | }, 655 | { 656 | "id": "salesnavigator_url", 657 | "displayName": "salesnavigator_url", 658 | "required": false, 659 | "defaultMatch": false, 660 | "canBeUsedToMatch": true, 661 | "display": true, 662 | "type": "string", 663 | "readOnly": false, 664 | "removed": false 665 | }, 666 | { 667 | "id": "linkedin_profile_url", 668 | "displayName": "linkedin_profile_url", 669 | "required": false, 670 | "defaultMatch": false, 671 | "canBeUsedToMatch": true, 672 | "display": true, 673 | "type": "string", 674 | "readOnly": false, 675 | "removed": false 676 | }, 677 | { 678 | "id": "email_copy", 679 | "displayName": "email_copy", 680 | "required": false, 681 | "defaultMatch": false, 682 | "canBeUsedToMatch": true, 683 | "display": true, 684 | "type": "string", 685 | "readOnly": false, 686 | "removed": false 687 | } 688 | ], 689 | "attemptToConvertTypes": false, 690 | "convertFieldsToString": false 691 | }, 692 | "options": {} 693 | }, 694 | "type": "n8n-nodes-base.airtable", 695 | "typeVersion": 2.1, 696 | "position": [ 697 | 880, 698 | 460 699 | ], 700 | "id": "3a09da68-8acd-47ca-bac8-537827e76444", 701 | "name": "Email Sent Status Change", 702 | "credentials": { 703 | "airtableTokenApi": { 704 | "id": "VVqSecErCTMnzYoZ", 705 | "name": "Airtable Personal Access Token account" 706 | } 707 | } 708 | }, 709 | { 710 | "parameters": { 711 | "promptType": "define", 712 | "text": "=please write a catchy, subtle, professional, eye catching, subject line for provided email body. \n- should be in plain text, no formating or styling\n- should have no emojis\nSubject line should have maximum 50 characters\n- subject line should not look sales like.\n\nresponse structure\n- must be only the subject line\n- there should be no other text other than subject line\n\nbody -\n {{ $json.output }}" 713 | }, 714 | "type": "@n8n/n8n-nodes-langchain.chainLlm", 715 | "typeVersion": 1.6, 716 | "position": [ 717 | 816, 718 | 0 719 | ], 720 | "id": "c801c12d-01ee-4b51-8f33-da5cc77638ea", 721 | "name": "Basic LLM Chain" 722 | }, 723 | { 724 | "parameters": { 725 | "model": "deepseek/deepseek-r1:free", 726 | "options": {} 727 | }, 728 | "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter", 729 | "typeVersion": 1, 730 | "position": [ 731 | 904, 732 | 220 733 | ], 734 | "id": "381c5d66-f5b9-4c11-9ccc-431d86f8e940", 735 | "name": "OpenRouter Chat Model1", 736 | "credentials": { 737 | "openRouterApi": { 738 | "id": "KDCaXFkFWD4mKsO1", 739 | "name": "OpenRouter account" 740 | } 741 | } 742 | }, 743 | { 744 | "parameters": { 745 | "operation": "upsert", 746 | "base": { 747 | "__rl": true, 748 | "value": "appQ5QAPg3YP3laMB", 749 | "mode": "list", 750 | "cachedResultName": "Untitled Base", 751 | "cachedResultUrl": "https://airtable.com/appQ5QAPg3YP3laMB" 752 | }, 753 | "table": { 754 | "__rl": true, 755 | "value": "tbl14xeFbMZuie4qO", 756 | "mode": "list", 757 | "cachedResultName": "Customer Records", 758 | "cachedResultUrl": "https://airtable.com/appQ5QAPg3YP3laMB/tbl14xeFbMZuie4qO" 759 | }, 760 | "columns": { 761 | "mappingMode": "defineBelow", 762 | "value": { 763 | "company_employee_count": 0, 764 | "email_subject": "={{ $json.text }}", 765 | "email_copy": "={{ $('AI Agent').item.json.output }}", 766 | "status": "Approval Pending", 767 | "id": "={{ $('Airtable1').item.json.id }}" 768 | }, 769 | "matchingColumns": [ 770 | "id" 771 | ], 772 | "schema": [ 773 | { 774 | "id": "id", 775 | "displayName": "id", 776 | "required": false, 777 | "defaultMatch": true, 778 | "display": true, 779 | "type": "string", 780 | "readOnly": true, 781 | "removed": false 782 | }, 783 | { 784 | "id": "company_cleaned", 785 | "displayName": "company_cleaned", 786 | "required": false, 787 | "defaultMatch": false, 788 | "canBeUsedToMatch": true, 789 | "display": true, 790 | "type": "string", 791 | "readOnly": false, 792 | "removed": false 793 | }, 794 | { 795 | "id": "status", 796 | "displayName": "status", 797 | "required": false, 798 | "defaultMatch": false, 799 | "canBeUsedToMatch": true, 800 | "display": true, 801 | "type": "options", 802 | "options": [ 803 | { 804 | "name": "Pending", 805 | "value": "Pending" 806 | }, 807 | { 808 | "name": "Approval Pending", 809 | "value": "Approval Pending" 810 | }, 811 | { 812 | "name": "Approved", 813 | "value": "Approved" 814 | }, 815 | { 816 | "name": "Sending", 817 | "value": "Sending" 818 | }, 819 | { 820 | "name": "Sent", 821 | "value": "Sent" 822 | } 823 | ], 824 | "readOnly": false, 825 | "removed": false 826 | }, 827 | { 828 | "id": "firstname_cleaned", 829 | "displayName": "firstname_cleaned", 830 | "required": false, 831 | "defaultMatch": false, 832 | "canBeUsedToMatch": true, 833 | "display": true, 834 | "type": "string", 835 | "readOnly": false, 836 | "removed": false 837 | }, 838 | { 839 | "id": "lastname_cleaned", 840 | "displayName": "lastname_cleaned", 841 | "required": false, 842 | "defaultMatch": false, 843 | "canBeUsedToMatch": true, 844 | "display": true, 845 | "type": "string", 846 | "readOnly": false, 847 | "removed": false 848 | }, 849 | { 850 | "id": "industry", 851 | "displayName": "industry", 852 | "required": false, 853 | "defaultMatch": false, 854 | "canBeUsedToMatch": true, 855 | "display": true, 856 | "type": "string", 857 | "readOnly": false, 858 | "removed": false 859 | }, 860 | { 861 | "id": "location", 862 | "displayName": "location", 863 | "required": false, 864 | "defaultMatch": false, 865 | "canBeUsedToMatch": true, 866 | "display": true, 867 | "type": "string", 868 | "readOnly": false, 869 | "removed": false 870 | }, 871 | { 872 | "id": "job", 873 | "displayName": "job", 874 | "required": false, 875 | "defaultMatch": false, 876 | "canBeUsedToMatch": true, 877 | "display": true, 878 | "type": "string", 879 | "readOnly": false, 880 | "removed": false 881 | }, 882 | { 883 | "id": "Email", 884 | "displayName": "Email", 885 | "required": false, 886 | "defaultMatch": false, 887 | "canBeUsedToMatch": true, 888 | "display": true, 889 | "type": "string", 890 | "readOnly": false, 891 | "removed": false 892 | }, 893 | { 894 | "id": "Mobile no.", 895 | "displayName": "Mobile no.", 896 | "required": false, 897 | "defaultMatch": false, 898 | "canBeUsedToMatch": true, 899 | "display": true, 900 | "type": "string", 901 | "readOnly": false, 902 | "removed": false 903 | }, 904 | { 905 | "id": "company_website", 906 | "displayName": "company_website", 907 | "required": false, 908 | "defaultMatch": false, 909 | "canBeUsedToMatch": true, 910 | "display": true, 911 | "type": "string", 912 | "readOnly": false, 913 | "removed": false 914 | }, 915 | { 916 | "id": "company_industry", 917 | "displayName": "company_industry", 918 | "required": false, 919 | "defaultMatch": false, 920 | "canBeUsedToMatch": true, 921 | "display": true, 922 | "type": "string", 923 | "readOnly": false, 924 | "removed": false 925 | }, 926 | { 927 | "id": "company_location", 928 | "displayName": "company_location", 929 | "required": false, 930 | "defaultMatch": false, 931 | "canBeUsedToMatch": true, 932 | "display": true, 933 | "type": "string", 934 | "readOnly": false, 935 | "removed": false 936 | }, 937 | { 938 | "id": "company_employee_count", 939 | "displayName": "company_employee_count", 940 | "required": false, 941 | "defaultMatch": false, 942 | "canBeUsedToMatch": true, 943 | "display": true, 944 | "type": "number", 945 | "readOnly": false, 946 | "removed": false 947 | }, 948 | { 949 | "id": "company_linkedin", 950 | "displayName": "company_linkedin", 951 | "required": false, 952 | "defaultMatch": false, 953 | "canBeUsedToMatch": true, 954 | "display": true, 955 | "type": "string", 956 | "readOnly": false, 957 | "removed": false 958 | }, 959 | { 960 | "id": "salesnavigator_url", 961 | "displayName": "salesnavigator_url", 962 | "required": false, 963 | "defaultMatch": false, 964 | "canBeUsedToMatch": true, 965 | "display": true, 966 | "type": "string", 967 | "readOnly": false, 968 | "removed": false 969 | }, 970 | { 971 | "id": "linkedin_profile_url", 972 | "displayName": "linkedin_profile_url", 973 | "required": false, 974 | "defaultMatch": false, 975 | "canBeUsedToMatch": true, 976 | "display": true, 977 | "type": "string", 978 | "readOnly": false, 979 | "removed": false 980 | }, 981 | { 982 | "id": "email_copy", 983 | "displayName": "email_copy", 984 | "required": false, 985 | "defaultMatch": false, 986 | "canBeUsedToMatch": true, 987 | "display": true, 988 | "type": "string", 989 | "readOnly": false, 990 | "removed": false 991 | }, 992 | { 993 | "id": "email_subject", 994 | "displayName": "email_subject", 995 | "required": false, 996 | "defaultMatch": false, 997 | "canBeUsedToMatch": true, 998 | "display": true, 999 | "type": "string", 1000 | "readOnly": false, 1001 | "removed": false 1002 | } 1003 | ], 1004 | "attemptToConvertTypes": false, 1005 | "convertFieldsToString": false 1006 | }, 1007 | "options": {} 1008 | }, 1009 | "type": "n8n-nodes-base.airtable", 1010 | "typeVersion": 2.1, 1011 | "position": [ 1012 | 1192, 1013 | 100 1014 | ], 1015 | "id": "0813ff20-bbda-4c65-ae21-ce4617fc60c8", 1016 | "name": "Airtable2", 1017 | "credentials": { 1018 | "airtableTokenApi": { 1019 | "id": "VVqSecErCTMnzYoZ", 1020 | "name": "Airtable Personal Access Token account" 1021 | } 1022 | } 1023 | } 1024 | ], 1025 | "pinData": {}, 1026 | "connections": { 1027 | "When clicking ‘Test workflow’": { 1028 | "main": [ 1029 | [ 1030 | { 1031 | "node": "Airtable1", 1032 | "type": "main", 1033 | "index": 0 1034 | } 1035 | ] 1036 | ] 1037 | }, 1038 | "Airtable1": { 1039 | "main": [ 1040 | [ 1041 | { 1042 | "node": "AI Agent", 1043 | "type": "main", 1044 | "index": 0 1045 | } 1046 | ] 1047 | ] 1048 | }, 1049 | "OpenRouter Chat Model": { 1050 | "ai_languageModel": [ 1051 | [ 1052 | { 1053 | "node": "AI Agent", 1054 | "type": "ai_languageModel", 1055 | "index": 0 1056 | } 1057 | ] 1058 | ] 1059 | }, 1060 | "AI Agent": { 1061 | "main": [ 1062 | [ 1063 | { 1064 | "node": "Basic LLM Chain", 1065 | "type": "main", 1066 | "index": 0 1067 | } 1068 | ] 1069 | ] 1070 | }, 1071 | "Schedule Trigger": { 1072 | "main": [ 1073 | [ 1074 | { 1075 | "node": "Get Approved Message", 1076 | "type": "main", 1077 | "index": 0 1078 | } 1079 | ] 1080 | ] 1081 | }, 1082 | "Send Email": { 1083 | "main": [ 1084 | [ 1085 | { 1086 | "node": "Email Sent Status Change", 1087 | "type": "main", 1088 | "index": 0 1089 | } 1090 | ] 1091 | ] 1092 | }, 1093 | "Get Approved Message": { 1094 | "main": [ 1095 | [ 1096 | { 1097 | "node": "Sending Status Change", 1098 | "type": "main", 1099 | "index": 0 1100 | } 1101 | ] 1102 | ] 1103 | }, 1104 | "Sending Status Change": { 1105 | "main": [ 1106 | [ 1107 | { 1108 | "node": "Send Email", 1109 | "type": "main", 1110 | "index": 0 1111 | } 1112 | ] 1113 | ] 1114 | }, 1115 | "OpenRouter Chat Model1": { 1116 | "ai_languageModel": [ 1117 | [ 1118 | { 1119 | "node": "Basic LLM Chain", 1120 | "type": "ai_languageModel", 1121 | "index": 0 1122 | } 1123 | ] 1124 | ] 1125 | }, 1126 | "Basic LLM Chain": { 1127 | "main": [ 1128 | [ 1129 | { 1130 | "node": "Airtable2", 1131 | "type": "main", 1132 | "index": 0 1133 | } 1134 | ] 1135 | ] 1136 | }, 1137 | "Airtable2": { 1138 | "main": [ 1139 | [] 1140 | ] 1141 | } 1142 | }, 1143 | "active": false, 1144 | "settings": { 1145 | "executionOrder": "v1" 1146 | }, 1147 | "versionId": "fddabf0f-9c0b-4080-bda0-c27cfa28a734", 1148 | "meta": { 1149 | "templateCredsSetupCompleted": true, 1150 | "instanceId": "c3507e77e4379f59057306ad7bb9be218363efd8788e56d1d029f4cf772961f8" 1151 | }, 1152 | "id": "sV3jSx0H8FEyHIGp", 1153 | "tags": [] 1154 | } 1155 | --------------------------------------------------------------------------------