by ankitkansaldev
🎬 TikTok Influencer Scraper (URL Input) via Bright Data + n8n & Sheets A comprehensive n8n automation that scrapes TikTok influencer profiles using Bright Data's TikTok dataset and automatically saves detailed profile information to Google Sheets. 📋 Overview This workflow provides an automated TikTok influencer data collection solution that scrapes comprehensive profile information and saves it to Google Sheets. Perfect for influencer marketing research, competitor analysis, social media monitoring, and marketing campaign planning. ✨ Key Features 📝 Form-Based Input: Simple web form to submit TikTok profile URLs 🤖 Bright Data Integration: Uses Bright Data's TikTok dataset for reliable scraping ⏳ Status Monitoring: Intelligent polling system to check scraping progress 🔄 Retry Logic: Automatic retry mechanism with 30-second intervals 📊 Data Extraction: Comprehensive profile data including engagement metrics 📈 Google Sheets Storage: Automatic data storage and organization ⚡ Error Handling: Built-in error handling and status reporting 🎯 Custom Fields: Configurable output fields for specific data needs 🎯 What This Workflow Does Input Profile URLs**: TikTok profile URLs submitted through web form Custom Fields**: Configurable data fields for extraction Country Settings**: Geo-targeting for accurate data collection Processing Form Submission: User submits TikTok profile URL through web form API Trigger: Sends profile data to Bright Data for scraping Status Polling: Continuously checks scraping progress Wait & Retry: Implements 30-second delays between status checks Data Retrieval: Fetches complete profile data when ready Sheet Update: Saves extracted data to Google Sheets Status Reporting: Provides completion status and messages Output Data Points | Field | Description | Example | |-------|-------------|---------| | Account ID | Unique TikTok account identifier | @username123 | | Nickname | Display name on profile | "John Doe" | | Biography | Profile bio/description | "Content creator & influencer" | | Followers | Number of followers | 1,250,000 | | Following | Number of accounts following | 500 | | Likes | Total likes across all videos | 50,000,000 | | Videos Count | Total number of videos posted | 1,200 | | Profile URL | Direct link to TikTok profile | https://www.tiktok.com/@username | | Profile Picture | Profile image URL | https://p16-sign-sg.tiktokcdn.com/... | | Profile Picture HD | High-definition profile image | https://p16-sign-sg.tiktokcdn.com/... | | Is Verified | Verification status | true/false | | Bio Link | External link in bio | https://linktr.ee/username | | Like Engagement Rate | Engagement rate based on likes | 5.2% | | Comment Engagement Rate | Engagement rate based on comments | 2.1% | | Top Videos | List of top performing videos | [video_objects] | | Region | Geographic region | "US" | | Is Under Age 18 | Age status indicator | true/false | 🚀 Setup Instructions Prerequisites n8n instance (self-hosted or cloud) Google account with Sheets access Bright Data account with TikTok dataset access Valid TikTok profile URLs for testing 10-15 minutes for setup Step 1: Import the Workflow Copy the JSON workflow code from the provided file In n8n: Workflows → + Add workflow → Import from JSON Paste JSON and click Import Step 2: Configure Bright Data Set up Bright Data credentials: In n8n: Credentials → + Add credential → HTTP Request Generic Credential Name: "Bright Data API" Authentication: Bearer Token Token: Your Bright Data API key Test the connection Configure dataset: Ensure you have access to TikTok dataset (gd_l1villgoiiidt09ci) Verify dataset permissions in Bright Data dashboard Check dataset limits and pricing Step 3: Configure Google Sheets Integration Create a Google Sheet: Go to Google Sheets Create a new spreadsheet named "TikTok Influencer Data" Create a sheet tab named "TikTok profile by url" Copy the Sheet ID from URL: https://docs.google.com/spreadsheets/d/SHEET_ID_HERE/edit Set up Google Sheets credentials: In n8n: Credentials → + Add credential → Google Sheets OAuth2 API Complete OAuth setup and test connection Prepare your data sheet with columns: Column A: Account ID Column B: Nickname Column C: Biography Column D: Followers Column E: Following Column F: Likes Column G: Videos Count Column H: Profile URL Column I: Is Verified Column J: Bio Link Column K: Like Engagement Rate Column L: Comment Engagement Rate Column M: Region Column N: Status Column O: Message Step 4: Update Workflow Settings Update API credentials: Open "Sends profile URLs to Bright Data to trigger scraping" node Replace BRIGHT_DATA_API_KEY with your actual API key Update dataset ID if different Update Google Sheets nodes: Open "Google Sheets" node Replace document ID: 1OeqtCFm4Wek9DI5YFOWQXTpQJS-SJxC10iAPKEKkmiY Select your Google Sheets credential Choose the correct sheet/tab name Configure form settings: Open "Search by Profile URL" node Customize form title and field labels as needed Note the webhook URL for form access Step 5: Test & Activate Add test profiles: Access the form using the webhook URL Submit 1-2 TikTok profile URLs for testing Use full URLs (e.g., https://www.tiktok.com/@username) Test the workflow: Submit a test profile through the form Monitor execution in n8n Verify data appears in Google Sheet Check for any error messages 📖 Usage Guide Submitting TikTok Profiles Navigate to your form URL (found in Form Trigger node) Enter TikTok profile URL in the format: https://www.tiktok.com/@username Click Submit to start the scraping process Wait for processing (typically 1-3 minutes) Understanding the Process The workflow follows this sequence: Form Submission → Profile URL captured API Trigger → Scraping job submitted to Bright Data Status Polling → Checks every 30 seconds if data is ready Data Retrieval → Fetches complete profile information Sheet Update → Saves data to Google Sheets Monitoring Progress Check n8n execution logs for real-time status Bright Data dashboard shows scraping progress Google Sheets will populate when data is ready Status column shows "ready" when complete Reading the Results Your Google Sheet will show: Complete TikTok profile information Engagement metrics and statistics Profile verification status Bio links and external connections Timestamp of data collection 🔧 Customization Options Adding More Data Points Edit the JSON body in "Sends profile URLs to Bright Data" node to include additional fields: "custom_output_fields": [ "account_id", "nickname", "biography", "followers", "following", "likes", "videos_count", "language", "creation_time", "last_post_time", "avg_video_duration", "hashtags_used", "music_used" ] Modifying Input Parameters Customize the scraping parameters: Country targeting**: Change "country" field in input Search limits**: Adjust "limit_per_input" value Discovery method**: Modify "discover_by" parameter Error handling**: Toggle "include_errors" setting Batch Processing Multiple Profiles To process multiple profiles simultaneously: Modify the input array in the API call Add multiple profile URLs in single request Implement loop logic for processing results Add rate limiting between requests Custom Form Fields Enhance the form with additional inputs: Open "Search by Profile URL" node Add form fields for: Country selection Number of videos to analyze Specific date ranges Custom tags or categories 🚨 Troubleshooting Common Issues & Solutions "Bright Data connection failed" Cause: Invalid API credentials or dataset access Solution: Verify API key in Bright Data dashboard, check dataset permissions "Profile not found or private" Cause: Invalid TikTok URL or private profile Solution: Verify profile URL format, ensure profile is public "Google Sheets permission denied" Cause: Incorrect credentials or sheet permissions Solution: Re-authenticate Google Sheets, check sheet sharing settings "Scraping timeout" Cause: Profile data taking too long to process Solution: Increase wait time or implement longer polling intervals "Invalid dataset ID" Cause: Incorrect or expired dataset configuration Solution: Check Bright Data dashboard for correct dataset ID "Form submission failed" Cause: Webhook configuration issues Solution: Verify webhook URL and form trigger settings Advanced Troubleshooting Check execution logs** in n8n for detailed error messages Test individual nodes** by running them separately Verify data formats** ensure URLs are properly formatted Monitor API limits** check Bright Data usage quotas Add error handling** implement try-catch logic for robust operation 📊 Use Cases & Examples 1. Influencer Marketing Research Goal: Identify and analyze potential influencers for campaigns Research influencers in specific niches Analyze engagement rates and audience size Compare multiple influencers for campaign selection Track influencer growth over time 2. Competitive Analysis Goal: Monitor competitors' TikTok presence and performance Track competitor follower growth Analyze content strategies and engagement Monitor posting frequency and timing Identify trending content themes 3. Social Media Monitoring Goal: Track brand mentions and user-generated content Monitor branded hashtag usage Track brand advocates and micro-influencers Analyze sentiment and engagement patterns Identify trending topics in your industry 4. Market Research Pipeline Goal: Gather social media intelligence for business decisions Analyze target audience behavior Study content preferences and trends Generate reports for stakeholders Support marketing strategy development ⚙ Advanced Configuration Rate Limiting and Performance To optimize for large-scale scraping: Adjust wait times between status checks Implement exponential backoff for retries Add batch processing for multiple profiles Monitor API usage to avoid limits Data Validation and Cleaning Enhance data quality with validation: Add data type validation for numeric fields Implement URL format checking Clean and standardize text fields Add data completeness checks Integration with Business Tools Connect the workflow to your existing systems: CRM Integration**: Update customer records with influencer data Slack Notifications**: Send alerts when new data is available Database Storage**: Store data in PostgreSQL/MySQL for analysis BI Tools**: Connect to Tableau/Power BI for visualization Webhook Integration For real-time updates: Add webhook triggers for immediate profile checks Integrate with external systems via webhooks Create API endpoints for programmatic access Implement authentication for secure access 📈 Performance & Limits Expected Performance Single Profile**: 30-60 seconds average processing time Concurrent Requests**: 5-10 simultaneous (depends on Bright Data plan) Data Accuracy**: 95%+ for public TikTok profiles Success Rate**: 90%+ for accessible profiles Daily Capacity**: 100-1000 profiles (depends on rate limits) Resource Usage Memory**: ~50MB per execution Storage**: Minimal (data stored in Google Sheets) API Calls**: 3-5 Bright Data calls per profile (including status checks) Bandwidth**: ~1-2MB per profile scraped Execution Time**: 1-2 minutes per profile Scaling Considerations Rate Limiting**: Add delays for high-volume scraping Error Handling**: Implement retry logic for failed requests Data Validation**: Add checks for malformed profile data Monitoring**: Track success/failure rates over time Cost Optimization**: Monitor API usage to control costs 🤝 Support & Community Getting Help n8n Community Forum**: community.n8n.io Documentation**: docs.n8n.io Bright Data Support**: Contact through your dashboard GitHub Issues**: Report bugs and feature requests Contributing Share improvements with the community Report issues and suggest enhancements Create variations for specific use cases Document best practices and lessons learned 📋 Quick Setup Checklist Before You Start ☐ n8n instance running (self-hosted or cloud) ☐ Google account with Sheets access ☐ Bright Data account with TikTok dataset access ☐ Valid TikTok profile URLs for testing ☐ 15 minutes for setup Setup Steps ☐ Import Workflow - Copy JSON and import to n8n ☐ Configure Bright Data - Set up API credentials and test ☐ Create Google Sheet - New sheet with proper column structure ☐ Set up Google Sheets credentials - OAuth setup and test ☐ Update workflow settings - Replace sheet ID and API keys ☐ Test with sample profiles - Submit 1-2 URLs and verify results ☐ Activate workflow - Enable form trigger for production use Ready to Use! 🎉 Your form URL: https://your-n8n-instance.com/form/[webhook-id] 🎯 Happy TikTok Scraping! This workflow provides a solid foundation for automated TikTok influencer data collection. Customize it to fit your specific needs and use cases for influencer marketing, competitive analysis, and social media research.
by Ajith joseph
🤖 Create a Telegram Bot with Mistral AI and Conversation Memory A sophisticated Telegram bot that provides AI-powered responses with conversation memory. This template demonstrates how to integrate any AI API service with Telegram, making it easy to swap between different AI providers like OpenAI, Anthropic, Google AI, or any other API-based AI model. 🔧 How it works The workflow creates an intelligent Telegram bot that: 💬 Maintains conversation history for each user 🧠 Provides contextual AI responses using any AI API service 📱 Handles different message types and commands 🔄 Manages chat sessions with clear functionality 🔌 Easily adaptable to any AI provider (OpenAI, Anthropic, Google AI, etc.) ⚙️ Set up steps 📋 Prerequisites 🤖 Telegram Bot Token (from @BotFather) 🔑 AI API Key (from any AI service provider) 🚀 n8n instance with webhook capability 🛠️ Configuration Steps 🤖 Create Telegram Bot Message @BotFather on Telegram Create new bot with /newbot command Save the bot token for credentials setup 🧠 Choose Your AI Provider OpenAI: Get API key from OpenAI platform Anthropic: Sign up for Claude API access Google AI: Get Gemini API key NVIDIA: Access LLaMA models Hugging Face: Use inference API Any other AI API service 🔐 Set up Credentials in n8n Add Telegram API credentials with your bot token Add Bearer Auth/API Key credentials for your chosen AI service Test both connections 🚀 Deploy Workflow Import the workflow JSON Customize the AI API call (see customization section) Activate the workflow Set webhook URL in Telegram bot settings ✨ Features 🚀 Core Functionality 📨 Smart Message Routing**: Automatically categorizes incoming messages (commands, text, non-text) 🧠 Conversation Memory**: Maintains chat history for each user (last 10 messages) 🤖 AI-Powered Responses**: Integrates with any AI API service for intelligent replies ⚡ Command Support**: Built-in /start and /clear commands 📱 Message Types Handled 💬 Text Messages**: Processed through AI model with context 🔧 Commands**: Special handling for bot commands ❌ Non-text Messages**: Polite error message for unsupported content 💾 Memory Management 👤 User-specific chat history storage 🔄 Automatic history trimming (keeps last 10 messages) 🌐 Global state management across workflow executions 🤖 Bot Commands /start 🎯 - Welcome message with bot introduction /clear 🗑️ - Clears conversation history for fresh start Regular text 💬 - Processed by AI with conversation context 🔧 Technical Details 🏗️ Workflow Structure 📡 Telegram Trigger - Receives all incoming messages 🔀 Message Filtering - Routes messages based on type/content 💾 History Management - Maintains conversation context 🧠 AI Processing - Generates intelligent responses 📤 Response Delivery - Sends formatted replies back to user 🤖 AI API Integration (Customizable) Current Example (NVIDIA): Model: mistralai/mistral-nemotron Temperature: 0.6 (balanced creativity) Max tokens: 4096 Response limit: Under 200 words 🔄 Easy to Replace with Any AI Service: OpenAI Example: { "model": "gpt-4", "messages": [...], "temperature": 0.7, "max_tokens": 1000 } Anthropic Claude Example: { "model": "claude-3-sonnet-20240229", "messages": [...], "max_tokens": 1000 } Google Gemini Example: { "contents": [...], "generationConfig": { "temperature": 0.7, "maxOutputTokens": 1000 } } 🛡️ Error Handling ❌ Non-text message detection and appropriate responses 🔧 API failure handling ⚠️ Invalid command processing 🎨 Customization Options 🤖 AI Provider Switching To use a different AI service, modify the "NVIDIA LLaMA Chat Model" node: 📝 Change the URL in HTTP Request node 🔧 Update the request body format in "Prepare API Request" node 🔐 Update authentication method if needed 📊 Adjust response parsing in "Save AI Response to History" node 🧠 AI Behavior 📝 Modify system prompt in "Prepare API Request" node 🌡️ Adjust temperature and response parameters 📏 Change response length limits 🎯 Customize model-specific parameters 💾 Memory Settings 📊 Adjust history length (currently 10 messages) 👤 Modify user identification logic 🗄️ Customize data persistence approach 🎭 Bot Personality 🎉 Update welcome message content ⚠️ Customize error messages and responses ➕ Add new command handlers 💡 Use Cases 🎧 Customer Support**: Automated first-line support with context awareness 📚 Educational Assistant**: Homework help and learning support 👥 Personal AI Companion**: General conversation and assistance 💼 Business Assistant**: FAQ handling and information retrieval 🔬 AI API Testing**: Perfect template for testing different AI services 🚀 Prototype Development**: Quick AI chatbot prototyping 📝 Notes 🌐 Requires active n8n instance for webhook handling 💰 AI API usage may have rate limits and costs (varies by provider) 💾 Bot memory persists across workflow restarts 👥 Supports multiple concurrent users with separate histories 🔄 Template is provider-agnostic - easily switch between AI services 🛠️ Perfect starting point for any AI-powered Telegram bot project 🔧 Popular AI Services You Can Use | Provider | Model Examples | API Endpoint Style | |----------|---------------|-------------------| | 🟢 OpenAI | GPT-4, GPT-3.5 | https://api.openai.com/v1/chat/completions | | 🔵 Anthropic | Claude 3 Opus, Sonnet | https://api.anthropic.com/v1/messages | | 🔴 Google | Gemini Pro, Gemini Flash | https://generativelanguage.googleapis.com/v1beta/models/ | | 🟡 NVIDIA | LLaMA, Mistral | https://integrate.api.nvidia.com/v1/chat/completions | | 🟠 Hugging Face | Various OSS models | https://api-inference.huggingface.co/models/ | | 🟣 Cohere | Command, Generate | https://api.cohere.ai/v1/generate | Simply replace the HTTP Request node configuration to switch providers!
by PollupAI
Who is this for? This workflow is designed for Customer Success Managers (CSM), sales, support, or marketing teams using HubSpot CRM who want to automate customer engagement tracking when new emails arrive. It’s ideal for businesses looking to streamline CRM updates without manual data entry. Problem Solved / Use Case Manually logging email interactions in HubSpot is time-consuming. This workflow automatically parses incoming emails, checks if the sender exists in HubSpot, and either: Creates a new contact + logs the email as an engagement (if the sender is new). Logs the email as an engagement for an existing contact. What This Workflow Does Triggers when a new email arrives in a connected IMAP inbox. Parses the email using AI (OpenAI) to extract structured data. Searches HubSpot for the sender’s email address. Updates HubSpot: Creates a contact (if missing) and logs the email as an engagement. Or logs the engagement for an existing contact. Setup Configure Email Account: Replace the default IMAP node with your email provider HubSpot Credentials: Add your HubSpot API key in the HubSpot nodes. OpenAI Integration: Ensure your OpenAI API key is set for email parsing. Customization Tips Improve AI Prompt**: Modify the OpenAI prompt to extract specific email data (e.g., customer intent). Add Filters**: Exclude auto-replies or spam by adding a filter node. Extend Functionality**: Use the parsed data to trigger follow-up tasks (e.g., Slack alerts, tickets). Need Help? Contact thomas@pollup.net for workflow modifications or help. Discover my other workflows here
by Aashiq
👤 Who’s it for This workflow is for content creators, marketers, educators, or anyone who wants to instantly summarize YouTube videos and repurpose them into different formats (LinkedIn post, tweet, etc.) via a simple Telegram chatbot. ⚙️ How it works This n8n automation listens for messages in Telegram. If the message contains a YouTube link, it: Extracts the video ID Fetches the video transcript using RapidAPI Cleans the transcript of any special characters Sends it to OpenAI to generate a summary If the message is not a link, it simply acts as an AI chatbot using OpenAI with memory support. ✅ Supports follow-up prompts like: “Make it shorter” “Turn this into a LinkedIn post” “Create a tweet thread” 🧑🤝🧑 Multi-User Support This Telegram bot supports multiple users simultaneously. It tracks memory and context separately for each user using Telegram's unique chat_id. ✅ Each user gets personalized AI replies ✅ Follow-up commands work per user ✅ No interference between users 🛠️ Requirements A Telegram bot token (get via @BotFather) An OpenAI API Key (from https://platform.openai.com/account/api-keys) A RapidAPI Key and Host (typically youtube-transcript3.p.rapidapi.com) > 🚨 API keys must be added manually — they are not included in the template. 🧩 How to Set It Up Configure the Telegram Trigger node with your bot token. In the HTTP Request node, set: X-RapidAPI-Key: your RapidAPI key X-RapidAPI-Host: your RapidAPI host URL Add your OpenAI API credentials to the AI Agent node. Use the provided sticky notes for guidance inside the workflow itself. 🎛️ How to Customize Modify AI prompt behavior in the AI Agent node Change the text formatting in the Code node Use a different transcript API if preferred Add commands like make it into a blog post, summarize in bullet points, etc. 📌 Notes All nodes are renamed to reflect their function API credentials are removed for security Includes colored boxes and sticky notes to guide the user Compatible with n8n cloud and self-hosted setups
by Niklas Hatje
Use case When collecting leads via an online form, you often need to manually add those new leads into your Pipedrive CRM. This not only takes a lot of time but is also error-prone. This workflow automates this tedious work for you. What this workflow does The workflow is triggered each time a form is submitted in n8n. It validates the email address using Hunter.io. If the email is valid, the workflow checks for an existing person with that email in Pipedrive. If no existing person is found, it utilizes Clearbit to enrich the person's information. It then verifies if the person's organization already exists in Pipedrive, creating a new organization if necessary. The workflow then registers the person in Pipedrive. Lastly, it creates a lead in Pipedrive using information from the person and organization. Setup This workflow is very quick to set up. Add your Hunter.io, Clearbit and Pipedrive credentials Click the test workflow button Activate the workflow and use the form trigger production URL to collect your leads in a smart way How to adjust it to your needs Exchange the n8n form trigger with your form of choice (Typeform, Google Forms, SurveyMonkey...) Add a filter criteria to only add new leads if they match certain requirements Remove the email check with Hunter.io if you don't own this tool and expect new form submission to have a correct email anyways Add ways to handle invalid emails or existing Persons
by Jakkrapat Ampring
Description Quickly organize your inbox with AI! This simple workflow automatically classifies incoming emails into different categories — like High Priority, Work Related, or Promotions — and applies Gmail labels accordingly. Setup takes less than 2 minutes, and it runs 24/7, helping you stay focused on what matters most without manual sorting. Tools/Services Needed Gmail: To trigger the workflow and label emails. Google Gemini (or any LLM Model): To intelligently classify email content. How It Works Gmail Trigger: Detects every new incoming email. Text Classifier Node: Classifies the email content into predefined categories. Google Gemini Chat Model: Provides the AI-powered understanding behind the classification. Conditional Labeling: If the email is High Priority, label it accordingly. If it’s Work Related (e.g., internal emails), apply the work label. If it’s a Promotion, sort it into the promotions label. Gmail Labeling: Automatically adds the correct label to the email. Setup Instructions Connect your Gmail account to n8n. Connect your Google Gemini (or other LLM) credentials. Customize the categories and labels if needed. Activate the workflow — and that's it! Notes You can easily add more categories (like "Finance," "Newsletters," etc.) by adjusting the classification prompt. Works best with a clean and minimal set of categories to avoid overlap. Can be adapted to work with any other large language model (OpenAI, Claude, etc.) if preferred.
by Sarfaraz Muhammad Sajib
AI-Powered Automated Outreach Scheduling with Gemini, Gmail & Google Sheets Automate your lead generation and outreach process seamlessly using AI, Gmail, and Google Sheets—all within n8n. No complicated setup—just import, activate, and start reaching prospects with personalized messages generated by Google Gemini’s AI model. Quick Setup Import the Workflow Download and import the provided workflow into your n8n instance. Connect Your Accounts Authenticate your Google Sheets account. Connect your Gmail account for sending emails. Prepare the Spreadsheet Use this template to set up your leads and tracking sheet. Configure the Gemini API Obtain your Gemini API key. Here Add it to the Gemini API credentials within n8n. Set Scheduling Preferences Customize the Schedule Trigger node to control when the workflow runs. Edit Email Prompts Update the initial and follow-up email prompts to match your outreach tone and goals. Set Rate Limits Configure the rate limiting settings to comply with Gmail sending limits and avoid spam filters. Activate the Workflow Enable the workflow to begin automated outreach to your leads. Track and Manage Leads Monitor responses and update lead statuses directly in your Google Sheet. How It Works Schedule Trigger:** Automatically starts outreach based on your defined schedule Google Sheets Integration:** Fetches leads and updates their status after outreach Email Validation:** Checks if lead emails are valid before sending Website Scraper:** Gathers info from lead websites to personalize messages Google Gemini AI:** Generates tailored cold outreach messages optimized for high response Gmail Node:** Sends personalized emails directly from your Gmail account Core Features Pull leads automatically from Google Sheets Validate emails to avoid bounces Scrape lead websites for custom messaging context Generate AI-crafted outreach emails with dynamic personalization Send emails on schedule without manual intervention Update lead status to track outreach progress AI Integration Uses Google Gemini AI to create professional, friendly, and engaging outreach emails Dynamic prompt templates tailored to each lead’s company and website content Structured JSON output to easily map subject, greeting, and body content 💡 Usage Examples B2B cold outreach campaigns with personalized emails Automated follow-ups based on lead engagement Lead nurturing with context-aware messaging Sales prospecting workflows integrated into your CRM ✨ Benefits Save hours by automating personalized outreach Increase response rates with AI-optimized messaging Keep lead data organized and updated in Google Sheets Fully scalable and customizable n8n workflow Minimal setup, ready to run out-of-the-box
by L Hùng
Pre-Conditions A Facebook Developer account with an active app. Basic understanding of n8n workflows. Access to a database (optional, for storing tokens). Setup Webhook Activation: Configure the Webhook to receive user requests and process input data. Ensure the Webhook URL is correctly set in your Facebook App settings. Short-Lived Token Retrieval: Use Facebook OAuth to fetch a short-lived token from the authorization code. Long-Lived Token Conversion: Convert the short-lived token into a long-lived token (valid for ~60 days). Page Token Retrieval: Follow the provided instructions to retrieve Page Tokens for posting on managed Facebook Pages. Customizable Scopes: Edit the correctScopes array to include or exclude permissions as needed. Optional Database Storage: Extend the workflow to save tokens to a database instead of displaying them on-screen. Step-by-Step Instructions: Detailed guidance is provided via sticky notes for activating the app, configuring Webhook, and editing parameters like fb_redirect_uri, app_id, and app_secret. Who the Template is For Developers**: Integrating Facebook APIs into their applications. Social Media Managers**: Automating posting and engagement on Facebook Pages. n8n Users**: Looking for a ready-to-use workflow for Facebook Token management. Primary Use Automates Facebook Token retrieval and management. Supports posting to Facebook Pages via Page Tokens. Easily customizable and extendable for specific requirements.
by Joseph
This n8n workflow automates SEO keyword research by querying the Ahrefs API for keyword data and related keyword insights. The enriched data is then processed by an AI agent to format a response and provide valuable SEO recommendations. Perfect for SEO specialists, content marketers, digital agencies, and anyone looking to gain valuable insights into keyword opportunities to boost their rankings. ⚙️ How This Workflow Works This workflow guides you through the entire SEO keyword research process, from entering the initial keyword to receiving detailed insights and related keyword suggestions. 1. 🗣️ User Input (Keyword Query) The user enters a keyword they want to research. This input is captured by the Chat Input Node, ready for analysis. 2. 🤖 AI Agent (Input Verification) The AI Agent reviews the keyword input for any grammatical errors or extra commentary. If necessary, it cleans the input to ensure a seamless query to the API. 3. 🔑 Ahrefs API (Keyword Data Retrieval) The cleaned keyword is sent to the Ahrefs Keyword Tool API. This retrieves a detailed report including metrics like search volume, keyword difficulty, and CPC. 4. 💡 Related Keywords Extraction (Using JavaScript Function) The workflow uses a JavaScript function to extract main keyword data and 10 related keywords data from the Ahrefs response. You can tweak the script to adjust the number of related keywords or the level of detail you want. 5. 🧠 AI Agent (Text Formatting) The aggregated data, including both the main keyword and related keywords, is sent to an AI agent. The AI agent formats the data into a concise, readable format that can be shared with the user. 6. 📨 Final Response The formatted text is delivered to the user with keyword insights, recommendations, and related keyword suggestions. ✅ Smart Retry & Error Handling Each subworkflow includes a fail-safe mechanism to ensure: ✅ Proper error handling for any issues with the API request. 🕒 Failed API requests are retried after a customizable period (e.g., 2 hours or 1 day). 💬 User input validation prevents any incorrect or malformed queries from being processed. 📋 Ahrefs API Setup To use this workflow, you’ll need to set up your Ahrefs API credentials: 🔑 Ahrefs API Sign up for an Ahrefs account and get your key here: Ahrefs Keyword Tool API Once signed up, you'll receive an API key, which you’ll use in the x-rapidapi-key header in n8n. Ensure you check the Ahrefs Keyword Tool API documentation for more details on available parameters. 📥 How to Import This Workflow Copy the json code. Open your n8n instance. Open a new workflow. Paste anywhere inside the workflow. Voila. 🛠️ Customization Options Adjust the number of related keywords extracted (default is 10). Customize the AI agent response formatting or add specific recommendations for users. Modify the JavaScript function to extract different metrics from the Ahrefs API. 🧪 Use Case Example Trying to optimize your blog post around a specific keyword? Query a broad keyword, like “SEO tips”. Get related keyword data and search volume insights. Use the AI agent to provide keyword recommendations and additional topics to target. 💥 Boost your content strategy with fresh keywords and relevant search data!
by Agent Studio
Overview This workflow allows you to trigger custom logic in n8n directly from Retell's Voice Agent using Custom Functions. It captures a POST webhook from Retell every time a Voice Agent reaches a Custom Function node. You can plug in any logic—call an external API, book a meeting, update a CRM, or even return a dynamic response back to the agent. Who is it for For builders using Retell who want to extend Voice Agent functionality with real-time custom workflows or AI-generated responses. Prerequisites Have a Retell AI Account A Retell agent with a Custom Function node in its conversation flow (see template below) Set your n8n webhook URL in the Custom Function configuration (see "How to use it" below) (Optional) Familiarity with Retell's Custom Function docs Start a conversation with the agent (text or voice) Retell Agent Example To get you started, we've prepared a Retell Agent ready to be imported, that includes the call to this template. Import the agent to your Retell workspace (top-right button on your agent's page) You will need to modify the function URL in order to call your own instance. This template is a simple hotel agent that calls the custom function to confirm a booking, passing basic formatted data. How it works Retell sends a webhook to n8n whenever a Custom Function is triggered during a call (or test chat). The webhook includes: Full call context (transcript, call ID, etc.) Parameters defined in the Retell function node You can process this data and return a response string back to the Voice Agent in real-time. How to use it Copy the webhook URL (e.g. https://your-instance.app.n8n.cloud/webhook/hotel-retell-template) Modify the Retell Custom Function webhook URL (see template description for screenshots) Edit the function Modify the URL Modify the logic in the Set node or replace it with your own custom flow Deploy and test: Retell will hit your n8n workflow during the conversation Extension Ideas Call a third-party API to fetch data (e.g. hotel availability, CRM records) Use an LLM node to generate dynamic responses Trigger a parallel automation (Slack message, calendar invite, etc.) 👉 Reach out to us if you're interested in analyzing your Retell Agent conversations.
by Lucía Maio Brioso
🧑💼 Who is this for? If you’re using Notion to manage a database (like saving links, tasks, notes, or anything really), and it’s starting to get messy with duplicate entries, this workflow is for you. It’s especially useful if you want to keep things tidy without doing any manual cleanup. 🧠 What problem is this workflow solving? Notion doesn’t have a built-in way to find or remove duplicates, so you either clean them up manually 😩 or just let them pile up. This workflow automatically finds entries that share the same property (like a URL or title) and archives the extra copies, keeping just one. ⚙️ What this workflow does Pulls all pages from a Notion database. Identifies duplicates based on a property you choose. Archives the duplicate pages (which is like soft-deleting them). Keeps one version of each duplicate group. It includes two optional triggers: Run it every day ⏰ Or trigger it automatically when a new page is added to the database ⚡ 🛠️ Setup Connect your Notion account in n8n. Select your database in the Notion nodes. In the “Format items properly” node, replace "SET YOUR PROPERTY HERE" with a reference to the property you want to use for detecting duplicates. I recommend using the n8n property drag-and-drop feature. Enable whichever trigger you prefer — or both. And that’s it. It runs on its own after that. 🧩 How to customize this workflow to your needs Use a different property for detecting duplicates by updating the Set node. Want to tag duplicates instead of archiving them? Just replace the last Notion node with an update operation. Adjust the schedule to run it hourly, weekly, or whenever suits your setup.
by Jordan Lee
This flexible template scrapes business listings for any industry and location, perfect for sales teams, marketers, and researchers. Good to know Works with any business category (restaurants, contractors, retailers, etc.) Fully customizable search parameters Results automatically organized in Google Sheets Built-in delay ensures scraping completes before data collection How it works Trigger: Manual or scheduled start Apify Configuration: Sets scraping parameters (industry, location, data fields) Scraping Execution: Runs the web scraping job Data Processing: Cleans and structures the raw data Storage: Saves results to your Google Sheets What is Apify? Apify is a webscraping tool, in this workflow the data is scraped from a google maps scraper: https://apify.com/compass/crawler-google-places How to use Apify Small # Lead Generation (Purple) https://apify.com/compass/crawler-google-places Add location and industry to scrape (Apify) Add the number of leads to output (Apify) Copy over the JSON file into N8N Copy & paste API endpoint "Get Run URL" in N8N Apify Large # Lead Generation (Grey) Configure the Manual Trigger When clicking 'Execute workflow' node is ready to use as-is This triggers the entire lead generation process Setup "Start Results (Apify)" Node Get Your Apify API Information Go to Apify.com and create a free account Navigate to Settings → Integrations → API tokens Copy your API token Find the Google Maps scraper actor ID: Configure the HTTP Request (start results) Method: POST URL: Replace "enter apify (get run)" with: https://api.apify.com/v2/acts/nwua9Gu5YrADL7ZDj/runs?token=YOUR_API_TOKEN C. Customize the JSON Body Parameters In the JSON body, modify these key fields: Location & Search: "locationQuery": Change "Toronto" to your target city "searchStringsArray": Change ["barber"] to your business type Examples: ["restaurants"], ["dentists"], ["contractors"] Configure the HTTP Request (start results) Method : Get Url: enter the get dataset URL from Apify Split Out Node Select fields to append in the google sheet Test the Configuration Click Execute workflow to test Check that the Apify job starts successfully Note the job ID returned for the next section This section initiates the scraping process and should complete in 30-60 seconds depending on your lead count. Setup Google Sheets Create a new Google Sheet with these columns: title (business name) address (full address) state (state/province) neighborhood (area/district) phone (contact number) emails (email addresses) Copy your Google Sheets document ID for workflow configuration Requirements Apify account Google Sheets document Google OAuth credentials Customization Options For different use cases: Lead Gen: Get business leads Local SEO: Collect competitor data Market Research: Analyze industry trends Advanced mofications: Add email enrichment Integrate with CRM systems Set up automatic daily runs