by Billy Christi
Who is this for? This workflow is perfect for: HR professionals** seeking to automate employee and department management Startups and SMBs** that want an AI-powered HR assistant on Telegram Internal operations teams** that want to simplify onboarding and employee data tracking What problem is this workflow solving? Managing employee databases manually is error-prone and inefficient—especially for growing teams. This workflow solves that by: Enabling natural language-based HR operations directly through Telegram Automating the creation, retrieval, and deletion of employee records in Airtable Dynamically managing related data such as departments and job titles Handling data consistency and linking across relational tables automatically Providing a conversational interface backed by OpenAI for smart decision-making What this workflow does Using Telegram as the interface and Airtable as the backend database, this intelligent HR workflow allows users to: Chat in natural language (e.g. “Show me all employees” or “Create employee: Sarah, Marketing…”) Interpret and route requests via an AI Agent that acts as the orchestrator Query employee, department, and job title data from Airtable Create or update records as needed: Add new departments and job titles automatically if they don’t exist Create new employees and link them to the correct department and job title Delete employees based on ID Respond directly in Telegram, providing user-friendly feedback Setup View & Copy the Airtable base here: 👉 Employee Database Management – Airtable Base Template Telegram Bot: Set up a Telegram bot and connect it to the Telegram Trigger node Airtable: Prepare three Airtable tables: Employees with links to Departments and Job Titles Departments with Name & Description Job Titles with Title & Description Connect your Airtable API key and base/table IDs into the appropriate Airtable nodes Add your OpenAI API key to the AI Agent nodes Deploy both workflows: the main chatbot workflow and the employee creation sub-workflow Test with sample messages like: “Create employee: John Doe, john@company.com, Engineering, Software Engineer” “Remove employee ID rec123xyz” How to customize this workflow to your needs Switch databases**: Replace Airtable with Notion, PostgreSQL, or Google Sheets if desired Enhance security**: Add authentication and validation before allowing deletion Add approval flows**: Integrate Telegram button-based approvals for sensitive actions Multi-language support**: Expand system prompts to support multiple languages Add logging**: Store every user action in a log table for auditability Expand capabilities**: Integrate payroll, time tracking, or Slack notifications Extra Tips This is a two-workflow setup. Make sure the sub-workflow is deployed and accessible from the main agent. Use Simple Memory per chat ID to preserve context across user queries. You can expand the orchestration logic by adding more tools to the main agent—such as “Get active employees only” or “List employees by job title.”
by Melbin Francis
Quick overview This workflow runs a chat-based support agent powered by Groq, records every tool call the agent makes into an n8n Data Table, and appends an audit note that flags any numbers in the final answer that don’t appear in the question, tool inputs, or tool results. How it works Receives a chat message via an n8n Chat trigger and starts/continues a session. Uses a Groq chat model to run an agent that can call a Calculator tool and a demo order lookup tool and returns intermediate tool steps. Converts the agent’s intermediate steps into one log row per tool call, including session ID, tool name, tool input, tool output, and a final-answer excerpt. Audits the final answer by checking whether each number in the response is supported by the question, tool inputs, or tool results, and generates an audit note. Writes the tool-call rows and audit note to an n8n Data Table as a “flight log” for the session. Replies to the user with the agent’s answer plus a short flight-log line listing the tools used and the audit note. Setup Add a Groq API credential and select it in the Groq Chat Model node. Create/select an n8n Data Table for the flight log and map columns for session_id, logged_at, step_index, tool_name, tool_input, observation, final_answer_excerpt, and audit_note. Replace the demo order lookup tool code with your real order-status lookup (or other business tools) while keeping the same tool interface if desired. Requirements A free Groq API key. Groq is the AI service the agent uses to answer. The free tier is plenty. The logging and the number check are ordinary code, so they carry on working whatever model you swap in. n8n Data Tables, which come built into n8n. You need one table to hold the log. There is no outside database or spreadsheet to set up. Nothing else. It ships with two working demo tools, so you can run it once and watch the log fill up before you connect anything of your own. Customization Swap in your own tools. The order lookup is a demo with three made up orders and it says so on the canvas. Replace it with whatever your agent really calls. None of the logging is tied to a particular tool, so anything you add is recorded the same way with no extra wiring. Change the model in the Groq Chat Model node. The log records what the agent did, not which model did it, so nothing further down needs changing. Decide what to do with the log. It is an ordinary table, so you can point a dashboard at it, raise an alert when the audit note names a number, or simply leave it and read it on the day somebody asks. Additional info The problem this solves is a small one that turns up late. An agent gives someone an answer, they act on it, and a week later somebody asks why it said that. Usually there is nothing to look at. The chat has gone, and the agent cannot reliably tell you what it did. This keeps the receipts. After every reply it writes one row for each tool the agent used: which tool ran, what it was given, what came back, and which conversation it belonged to. Six rows means six tool calls, in order. If the agent answered without using any tool at all, that is written down too, and it is often the row you most want to find. It also writes a short audit note. Every number in the answer is checked against what the tools returned, what the tools were asked, and the original question. If a number appears in none of those, the note names it. That is the number the agent did not get from anywhere, and it is the usual shape of a confident wrong answer. The reply the person sees carries the answer plus a one line summary of which tools were used, so they can see what it rests on without opening the table. Be clear about what that check is. It is arithmetic on digits, not judgement. A sentence that is completely made up but contains no numbers will pass without comment. Matching is also loose, so a short number like 2 will nearly always be found somewhere by chance. It is most useful on long specific numbers, which is where invented figures usually show up. Treat the note as something to look at, not a verdict. What it will not do: it does not block, correct or rewrite what the agent said, and it does not judge whether the answer was any good. It records what happened and points at numbers that came from nowhere. A person decides the rest. One thing worth knowing before you rely on it. The log depends on the agent node handing back its intermediate steps, which is a normal built in option and is switched on in the template. If that changes in a future n8n release the log goes empty rather than wrong, and every row would read as though no tool had been used.
by Incrementors
Description Add TikTok video URLs to a Google Sheet and every morning at 8AM the workflow automatically processes each one, skipping cleanly if nothing is queued. WayinVideo summarizes each video, then all summaries are combined and sent to GPT-4o-mini in one call which writes a 5-section daily digest — trend overview, per-video summaries, top 3 content patterns, action recommendations, and trending tags. A formatted Telegram message is sent to your team channel with auto-truncation at 4000 characters, and everything is logged to Google Sheets. Built for social media teams, content agencies, and brand managers who want to track what is trending in their niche every morning without watching hours of videos. What This Workflow Does Stops cleanly when the queue is empty** — An early IF check detects whether there are any pending videos and exits gracefully if there are none — no errors, no failed runs Summarizes each TikTok video via WayinVideo** — Each video URL is submitted to WayinVideo's Summarization API which returns a structured summary, key highlights, and tags Combines all video summaries before writing the digest** — An aggregation step collects every processed video into one combined text block so GPT sees all the content at once Writes a 5-section daily digest in one GPT call** — GPT produces a trend overview, one-line summaries per video, top 3 content patterns, 2–3 action recommendations, and top trending tags Sends a formatted Telegram message with auto-truncation** — The digest is built in Telegram Markdown with section headers and emoji icons, auto-truncated at 4000 characters if it is too long Logs the digest to Google Sheets** — Overview, top patterns, action recommendations, tags, and send status are saved to the Digest Log tab for your records Marks all processed videos in the queue** — Every Video Queue row is updated with Processed status and today's date so the same videos are never processed again Setup Requirements Tools Needed n8n instance (self-hosted or cloud) WayinVideo account with API access OpenAI account with GPT-4o-mini API access Telegram Bot and a team channel or group chat Google Sheets (one spreadsheet with two tabs: Video Queue and Digest Log) Credentials Required WayinVideo API key (pasted into 4. WayinVideo — Submit Summarization and 6. WayinVideo — Get Summary Results) OpenAI API key Telegram Bot credential + Chat ID (used in 14. Telegram — Send Daily Digest) Google Sheets OAuth2 (used in 2. Google Sheets — Read Pending Videos, 15. Google Sheets — Log Digest, and 16. Google Sheets — Mark Videos Processed) > ⚠️ WayinVideo API key appears in 2 steps — replace YOUR_WAYINVIDEO_API_KEY in both 4. WayinVideo — Submit Summarization and 6. WayinVideo — Get Summary Results. Missing either one will cause the workflow to fail. > ⚠️ Google Sheet ID appears in 3 steps — replace YOUR_TREND_SHEET_ID in 2. Google Sheets — Read Pending Videos, 15. Google Sheets — Log Digest, and 16. Google Sheets — Mark Videos Processed. All three must use the same Sheet ID. Estimated Setup Time: 25–30 minutes Step-by-Step Setup Import the workflow — Open n8n → Workflows → Import from JSON → paste the workflow JSON → click Import Get your WayinVideo API key — Log in to your WayinVideo account → go to Account Settings → copy your API key Add your WayinVideo API key to node 4 — Open node 4. WayinVideo — Submit Summarization → find the Authorization header value Bearer YOUR_WAYINVIDEO_API_KEY → replace YOUR_WAYINVIDEO_API_KEY with your actual key Add your WayinVideo API key to node 6 — Open node 6. WayinVideo — Get Summary Results → find the same Authorization header → replace YOUR_WAYINVIDEO_API_KEY with the same key Connect OpenAI — Open node 12. OpenAI — GPT-4o-mini Model → click the credential dropdown → add your OpenAI API key → test the connection Create a Telegram Bot — Open Telegram → search for @BotFather → send /newbot → follow the prompts → copy the Bot Token BotFather gives you Get your Telegram Chat ID — Add your bot to your team channel or group → send a message in the chat → open this URL in a browser replacing YOUR_BOT_TOKEN: https://api.telegram.org/botYOUR_BOT_TOKEN/getUpdates → find the chat.id value in the response — it is a number (negative for groups) Connect Telegram in n8n — Open node 14. Telegram — Send Daily Digest → click the credential dropdown → add a new Telegram credential → paste your Bot Token → replace YOUR_TELEGRAM_CHAT_ID in the Chat ID field with your actual Chat ID Create your Google Sheet — Open a new or existing Google Sheet → add a tab named exactly Video Queue → add these 6 headers: Video URL, Video Title, Niche / Category, Date Added, Status, Processed Date → add your first TikTok URLs in the rows below leaving Status blank Add the Digest Log tab — In the same spreadsheet → add a second tab named exactly Digest Log → add these 9 headers: Digest Date, Niche, Videos Processed, Overview, Top Patterns, Action Recommendations, Top Tags, Telegram Sent, Sent On Get your Google Sheet ID — Open the spreadsheet in a browser → copy the string between /d/ and /edit in the URL — this is your Sheet ID Connect Google Sheets for reading — Open node 2. Google Sheets — Read Pending Videos → replace YOUR_TREND_SHEET_ID with your actual Sheet ID → click the credential dropdown → add Google Sheets OAuth2 → authorize access Connect Google Sheets for logging and marking — Open node 15. Google Sheets — Log Digest → replace YOUR_TREND_SHEET_ID with the same Sheet ID → confirm OAuth2 is selected → repeat the same Sheet ID replacement in node 16. Google Sheets — Mark Videos Processed Activate the workflow — Toggle the workflow to Active — it will run automatically every day at 8AM. To test immediately, click on node 1. Schedule — Every Day 8AM and use the manual Execute option. How It Works (Step by Step) Step 1 — Schedule: Every Day 8AM The workflow fires automatically every day at 8AM using the cron expression 0 8 * * *. It can also be triggered manually at any time using the Execute option in n8n. Step 2 — Google Sheets: Read Pending Videos All rows from your Video Queue tab are read. Each row contains a TikTok video URL, title, niche, and date added. Every row regardless of status is passed forward for the empty queue check. Step 3 — IF: Any Pending Videos Today? This is the empty queue gate. If the total number of rows is greater than zero (YES path), the workflow has videos to process and continues forward. If the sheet is empty or has no rows (NO path), the workflow stops cleanly — no error is thrown and no Telegram message is sent. This prevents the workflow from failing on mornings when no new videos have been added. Step 4 — HTTP: WayinVideo — Submit Summarization Each video URL is submitted to WayinVideo's Summarization API. Each submission returns a task ID for tracking. If multiple videos are in the queue, this step runs once per video sequentially. Step 5 — Wait: 60 Seconds The workflow pauses 60 seconds before the first status check. TikTok videos are typically shorter than webinar recordings so 60 seconds is used here instead of 90. Step 6 — HTTP: WayinVideo — Get Summary Results A GET request checks the summarization results endpoint using the task ID from step 4. It returns the current status and, once complete, the summary text, highlights array, and tags array. Step 7 — IF: Summary Complete? This is the polling gate. If the status equals SUCCEEDED (YES path), the summary is ready and the workflow moves to extraction. If still processing (NO path), the workflow routes to 8. Wait — 30 Seconds Retry which pauses 30 seconds then loops back to step 6 to check again. The retry loop runs automatically until SUCCEEDED. Step 8 — Wait: 30 Seconds Retry When the summary is not yet ready, the workflow waits 30 seconds then returns to step 6 for another check. Step 9 — Code: Extract Summary Per Video The completed summary, highlights array, and tags array are extracted from the WayinVideo response. Highlights are joined as a pipe-separated string and tags as a comma-separated string. The video URL, title, niche, and date added from the sheet row are also packaged. This produces one clean data object per processed video. Step 10 — Code: Aggregate All Summaries After all videos have been processed individually, this step collects all of them together into a single combined text block. Each video's data is formatted as a labeled block — Video N, URL, Summary, Key Highlights, Tags — separated by dashes. The total video count and niche from the first video are also extracted. This single combined output is what GPT receives. Step 11 — AI Agent: Write Daily Digest GPT-4o-mini receives the combined summary block, today's date, the niche being tracked, and the total number of videos. It writes a 300–400 word digest in five labeled sections: DIGEST_OVERVIEW (1–2 sentence trend overview), VIDEO_SUMMARIES (one bullet per video — topic and why it is trending), TOP_PATTERNS (3 bullets of content patterns being used today), ACTION_RECOMMENDATIONS (2–3 specific things the team should create or do), and TOP_TAGS (top 8 tags from today's videos comma-separated). Emojis are kept to section headers only. Step 12 — OpenAI: GPT-4o-mini Model This is the language model powering the digest writing. Step 13 — Code: Format Telegram Message All five labeled sections are extracted from the AI output using regex. A Telegram Markdown message is assembled with section headers, emoji icons, and the niche and video count as a subtitle line. If the full message exceeds 4000 characters (Telegram's limit), it is auto-truncated at 3900 characters with a note that the full version is in the Digest Log sheet. Step 14 — Telegram: Send Daily Digest The formatted Markdown message is sent to your Telegram channel or group chat via the Bot API using your Chat ID. Markdown formatting is enabled so bold text and italics render correctly. Step 15 — Google Sheets: Log Digest One row is appended to your Digest Log tab with all 9 columns: digest date, niche, videos processed count, overview, top patterns, action recommendations, top tags, Telegram Sent set to Yes, and the current timestamp. Step 16 — Google Sheets: Mark Videos Processed Every Video Queue row that was processed today is updated with Status set to Processed and today's date in the Processed Date column. This prevents the same videos from appearing in tomorrow's digest. Key Features ✅ Graceful empty queue handling — The workflow checks whether any videos are queued before doing anything — runs daily without failing on days when nothing is added ✅ Aggregation step before GPT — All per-video summaries are combined into one input so GPT can write cross-video trend analysis rather than analyzing each video in isolation ✅ 5-section digest in one GPT call — Overview, video summaries, content patterns, action recommendations, and tags are all produced together — saving API cost and keeping the digest coherent ✅ Auto-truncation at 4000 characters — Telegram messages have a hard character limit — the workflow handles this automatically and notifies your team to check the sheet for the full version ✅ Separate Digest Log and Video Queue tabs — The two tabs serve different purposes — the queue manages what to process, the log archives every digest sent — both tracked in the same spreadsheet ✅ 60-second initial wait for TikTok videos — Shorter than the 90-second wait used for longer recordings — matched to the typical length of TikTok content ✅ Niche and date context passed to GPT — The system prompt includes today's date and the niche being tracked so the digest feels current and category-specific rather than generic Customisation Options Change the daily run time — In node 1. Schedule — Every Day 8AM, edit the cron expression from 0 8 * * * to a different time — for example 0 7 * * * for 7AM or 0 9 * * 1-5 for weekdays only at 9AM. Add a retry limit to stop infinite polling — Before node 8. Wait — 30 Seconds Retry, add a Set step that increments a poll counter, then add a second IF check to stop after 15 polls and send a Telegram error message instead of looping indefinitely. Track multiple niches in separate sheet tabs — Duplicate the Video Queue tab and name new tabs by niche (e.g. Beauty, Finance, Fitness) — then duplicate the workflow and point each copy to a different tab so your team gets a separate digest per niche. Send the digest to multiple Telegram channels — After node 14. Telegram — Send Daily Digest, duplicate the Telegram step with a different Chat ID to send the same digest to a second channel — for example, a client-facing channel alongside your internal team channel. Add a Slack message alongside the Telegram digest — After node 14. Telegram — Send Daily Digest, add a Slack step that posts the overview section and top tags to a #trends channel so team members who are not on Telegram also receive the key highlights. Troubleshooting Workflow running daily but no digest being sent: The most common cause is an empty Video Queue — if no rows exist in the sheet, step 3 stops the workflow cleanly with no output and no error — this is expected behavior Confirm the workflow is Active and your n8n instance is running at 8AM — self-hosted instances that are off will not fire To test immediately, click on node 1. Schedule — Every Day 8AM and use the manual Execute option WayinVideo API key errors: Confirm YOUR_WAYINVIDEO_API_KEY is replaced in both 4. WayinVideo — Submit Summarization and 6. WayinVideo — Get Summary Results — missing either one causes a 401 error Check the execution log for the specific step that failed — node 4 errors mean the submission failed, node 6 errors mean the polling request failed Confirm your WayinVideo account is active and the key has not expired Polling loop getting stuck: Check that each TikTok URL in the sheet is publicly accessible — private TikTok videos, deleted posts, or region-blocked content will not be processed by WayinVideo Open the execution log of node 6. WayinVideo — Get Summary Results and check the raw response — WayinVideo may have returned FAILED with a specific error If a single video causes the loop to run indefinitely, remove it from the sheet, reactivate the workflow, and resubmit Telegram message not sending: Confirm YOUR_TELEGRAM_CHAT_ID in node 14. Telegram — Send Daily Digest is replaced with your actual Chat ID — group chat IDs are negative numbers (e.g. -1001234567890) Confirm your Telegram Bot credential is connected and the Bot Token is valid — regenerate the token via @BotFather if needed Make sure your bot has been added to the target channel or group and has permission to post messages Google Sheets not logging or marking rows: Confirm YOUR_TREND_SHEET_ID is replaced in all three steps: 2. Google Sheets — Read Pending Videos, 15. Google Sheets — Log Digest, and 16. Google Sheets — Mark Videos Processed Confirm the tab names match exactly: Video Queue and Digest Log — capitalization and spacing must be exact Check that the Google Sheets OAuth2 credential is connected in all three steps — it is easy to authorize in node 2 but forget in nodes 15 and 16 Support Need help setting this up or want a custom version built for your team or agency? 📧 Email: info@incrementors.com 🌐 Website: https://www.incrementors.com/
by Intuz
Quick overview This workflow listens for new Slack messages, runs an OpenAI-powered conflict-intake agent that queries a Google Sheets–backed MCP tools endpoint, replies in the original Slack thread with a preliminary conflict summary, and appends an audit record to a Google Sheets log. How it works Triggers when a new message is posted in the configured Slack channel. Ignores bot or empty messages, then extracts the message text and key Slack metadata (user, channel, timestamp). Builds a unique event key from the Slack channel and timestamp and checks a Google Sheets “ConflictAuditLog” tab to prevent processing the same message twice. Sends the message text to an OpenAI agent, which extracts the prospective client and opposing party and calls a conflict-search MCP endpoint that queries Google Sheets records. Parses the agent’s structured output to determine whether it indicates a potential conflict and routes the message accordingly. Posts a “potential conflict” or “no potential conflict found in searched records” reply back to the original Slack thread. Appends the request and key fields from the Slack reply to the Google Sheets ConflictAuditLog for auditing. Setup Connect Slack credentials, add the Slack app/bot to your target channel, and select the channel in the Slack trigger and thread-reply steps. Connect Google Sheets credentials and ensure the spreadsheet contains the required tabs (ConflictAuditLog, Clients, Matters, Parties, RelatedEntities) with the expected lookup columns (for example, event_key and name/entity_name). Create or update the ConflictAuditLog sheet columns used for deduplication and logging (at minimum event_key, created_at, channel_id, message_ts, request_text, and status). Connect an OpenAI credential and confirm the chat model selection used by the agent. Activate the MCP server workflow (the MCP trigger path is /conflict-tools) and set the MCP Client endpoint URL to your own n8n MCP endpoint. Additional info Connect with us: Website: https://www.intuz.com/n8n-workflow-automation-templates/ Email: getstarted@intuz.com LinkedIn: https://www.linkedin.com/company/intuz Get Started: https://n8n.partnerlinks.io/intuz For Custom Worflow Automation https://www.intuz.com/get-started/
by Checkilo
Quick overview This workflow runs daily to pull Google Search Console performance data, log it to Google Sheets, send a daily SEO digest to Discord with day-over-day deltas, and ping an external heartbeat endpoint; if any step errors, it immediately pings the heartbeat service’s /fail endpoint. How it works Runs every day at 08:00 on a schedule trigger. Queries the Google Search Console Search Analytics API for query-level data from two days ago. Aggregates the results into totals (clicks, impressions, average position) and the top queries. Appends the day’s metrics to Google Sheets and reads the sheet to fetch the previous day’s row for comparison. Calculates percentage changes vs yesterday and sends a formatted SEO digest to Discord, including a warning when clicks drop sharply. Posts a success ping with the key metrics to an external heartbeat service (for example, checkilo or Healthchecks.io) so missing runs can be detected. If any node throws an error, an error-triggered branch posts a /fail ping to the heartbeat service with the error message and failing step. Setup Add a Google OAuth2 credential with the https://www.googleapis.com/auth/webmasters.readonly scope and replace the URL-encoded Search Console property in the Google Search Console API request URL. Add a Google Sheets credential and replace REPLACE_WITH_SHEET_ID, ensuring the target sheet has headers like date, clicks, impressions, avgPosition, and topQueries. Add your Discord webhook credentials (or swap the Discord step for another notification service) and set the destination accordingly. Create a checkilo/Healthchecks.io monitor and replace REPLACE_WITH_YOUR_PING_SLUG in both the success heartbeat URL and the /fail URL. In the workflow settings, set this workflow as the Error Workflow so the error-triggered /fail ping runs when executions fail.
by WeblineIndia
AI-Powered Smart Deal Close Prediction and Salesforce CRM Auto-Update Workflow This workflow acts as an automated, intelligent sales operations assistant. It continuously monitors your Salesforce account for newly updated opportunities, compares them against your historical win data and uses a powerful AI (Groq Llama-3) to predict realistic close dates and win probabilities. If the AI is highly confident in its prediction, it automatically updates the deal in Salesforce. If the AI is uncertain, it emails a manager to review the deal manually. Everything is neatly logged in a Google Spreadsheet for easy tracking. Quick Implementation Steps Connect Credentials: Authenticate your Salesforce, Groq, Gmail and Google Sheets accounts within your n8n account. Prepare the Audit Sheet: Create a new Google Sheet and copy its Document ID into the two Google Sheets nodes. Set the Schedule: Adjust the Schedule Trigger to run at your preferred interval (default is optimized for frequent checks). Activate: Turn on the workflow and watch your pipeline automatically clean itself. What It Does First, the workflow wakes up on a set schedule and looks for two things in Salesforce: a small batch of your recently won deals (to understand what success looks like) and any open opportunities that were modified recently. It filters these to ensure it only spends time on active deals that actually have a dollar amount attached to them. Next, it acts like a data scientist. It grabs the recent task history for each deal and calculates custom metrics—like how fast the deal is moving, how long it has been open and a "Risk Score" based on user engagement. All this data is packaged up and securely sent to a Groq LLM agent. The AI acts as a seasoned sales strategist, weighing these factors to predict a realistic timeline and the actual chance of winning the deal. Finally, the workflow makes a smart decision based on the AI's confidence score. If the AI is 70% or more confident in its assessment, it goes straight into Salesforce and updates the target close date to keep your pipeline accurate. If the confidence is lower, it sends a formatted email via Gmail to alert a sales manager that a deal needs human attention. Regardless of the path taken, every single prediction and action is logged into a Google Sheet for your RevOps team to review. Who It's For Sales Managers & Directors** Who want an unbiased, data-driven view of when deals will actually close, rather than relying on gut feelings. Revenue Operations (RevOps)** Who need accurate pipeline data and want to automate the tedious process of "pipeline scrubbing." CRM Administrators** Who want to reduce the administrative burden on sales reps by automatically updating stagnant close dates. Requirements to use this workflow To use this workflow, you will need n8n account with the following active accounts: Salesforce:** With API access enabled to read opportunities and tasks and update opportunities. Groq:** An API key to access the Llama-3.3-70b AI model. Gmail:** To send the low-confidence alerts. Google Workspace / Sheets:** To maintain the automated audit logs. How It Works & Set Up 1. App Authentication Before doing anything, ensure you have added your credentials for Salesforce (OAuth2), Groq (API Key), Gmail (OAuth2) and Google Sheets (OAuth2) in your n8n environment. 2. Configure the Google Sheet You need a destination for the audit logs. Create a new Google Sheet and ensure it has the following exact column headers in the first row: timestamp opportunity_id opportunity_name stage_name current_amount risk_score risk_label predicted_close_date predicted_win_probability confidence_score reasoning next_best_action action_taken status Open both Google Sheets nodes ("Log Auto-Update Success" and "Log Pending Review") and replace the Document ID with the ID of your newly created sheet. 3. Timing and Lookback Setup The workflow uses a "Set Lookback Timeframe" node to only grab deals modified in the last 5 minutes. If you change your "Run Schedule" to run every hour, you must also update the code in the "Set Lookback Timeframe" node to look back 60 minutes instead of 5, so you don't miss any deals. 4. Review the AI Prompt Open the "AI Deal Timeline Predictor" LangChain node. Review the System Message. If your company has specific sales stages or unique risk factors, you can type them directly into the prompt to make the AI's predictions even smarter for your specific business. How To Customize Nodes Adjusting the Confidence Threshold** Open the check confidence score If node. It is currently set to 70. If you want the AI to be more aggressive with automatic updates, lower this number. If you want more manual reviews, raise it to 80 or 90. Modifying Risk Calculations** The Calculate Deal Risk & Velocity Code node contains JavaScript that assigns risk based on how long a deal has been open and how many tasks are associated with it. You can tweak the numbers in this code to better fit your typical sales cycle length. Changing the Alert System** If you don't use Gmail, you can easily delete the Gmail node and replace it with a Slack or Microsoft Teams node to send the review alerts directly to a sales channel. Add‑ons You can easily extend this workflow to do even more: Push AI Advice to CRM** Add another Salesforce update node to push the AI's next_best_action directly into a custom field on the Opportunity, giving the sales rep instant coaching. Urgent SMS Alerts** Connect a Twilio node alongside the Gmail node to text the VP of Sales if a massive deal (e.g., over $100k) receives a high risk score. Bi-Weekly Summary** Create a separate simple workflow that reads the Google Sheet every Friday and emails a summary of all AI predictions to the executive team. Use Case Examples Automated Pipeline Scrubbing Automatically push out the close dates of neglected deals to the next quarter, ensuring the current quarter's forecast remains mathematically realistic without nagging sales reps. Early Warning System for Stalled Deals Instantly alert managers when a high-value opportunity shows a sudden drop in engagement or task activity, allowing leadership to step in before the deal is lost. Data-Driven Sales Coaching Use the AI's generated reasoning and recommended next steps to help junior account executives figure out how to unblock a complex negotiation. Historical Win-Rate Benchmarking Compare the current active pipeline against what actually won in the past, giving RevOps a clear picture of whether the current pipeline quality is better or worse than the previous quarter. Enforcing CRM Hygiene Identify and flag opportunities that have a 90% probability but haven't had a single phone call or email logged in three weeks. Troubleshooting Guide | Issue | Possible Cause | Solution | | :--- | :--- | :--- | | Workflow isn't processing any deals | Schedule and lookback timeframes don't match or no deals were modified recently. | Ensure the minutes in the Schedule node match the mathematical subtraction in the "Set Lookback Timeframe" node. | | "Invalid JSON returned from AI" error | The LLM ignored instructions and added extra conversational text (like "Here is your data:"). | The workflow already has a "Parse AI Output" cleanup node. If it still fails, adjust the Groq prompt to strictly enforce JSON-only responses. | | Google Sheets node fails to write data | The Google Sheet ID is missing or the column headers in your sheet do not perfectly match the node. | Verify the Document ID. Ensure the headers in your Sheet exactly match the 14 fields listed in the setup instructions above. | | Salesforce API Limit errors | Fetching too much data too frequently. | Increase the interval on your Schedule trigger (e.g., run every 30 minutes instead of 5) to reduce API calls. | | AI Close Dates are completely wrong | The AI lacks context about your specific average sales cycle length. | Edit the AI's System Message prompt to tell it your average sales cycle (e.g., "Our standard enterprise deal takes 90 days to close"). | Need Help? Building dynamic, AI-driven automation workflows can transform your business, but getting the data logic perfectly tuned sometimes requires an expert touch. If you need help setting up this workflow, customizing the custom JavaScript risk scoring, integrating it with a different CRM or building more advanced automation solutions tailored to your unique operations, we are here for you. Reach out to our n8n workflow developers at WeblineIndia to get expert assistance and start maximizing the value of your business process automations today!
by WeblineIndia
Quick overview This workflow manually runs to review Salesforce opportunities listed in Google Sheets, evaluates each deal against sales playbook rules using Google Gemini, updates compliance fields in Salesforce, alerts in Slack for low scores, and logs results back to Google Sheets. How it works Starts manually and loads a list of opportunities from Google Sheets. Processes each row in batches and fetches the latest matching Opportunity record from Salesforce. Adds predefined playbook rules (including a passing score) and combines them with the opportunity data. Checks whether at least two meetings are completed, and if not, auto-generates a non-compliant evaluation without using AI. For opportunities that pass the meeting minimum, sends the opportunity details and rules to Google Gemini to produce a compliance decision, missing steps, score, reason, and risk level, then normalizes the response into structured fields. Updates the Opportunity in Salesforce with compliance status, risk, score, and timestamp, and sends a Slack alert when the compliance score is below 70. For compliant opportunities, writes the final status and compliance metrics back to a Google Sheets results tab (append or update by opportunity_id). Setup Connect credentials for Google Sheets OAuth2, Salesforce OAuth2, Slack OAuth2, and the Google Gemini (PaLM) API. Ensure your input Google Sheet includes the required columns (opportunity_id, stage, meetings_done, demo_done, approval_status, rep_name) and update the spreadsheet and sheet IDs if you use a different file. Verify the Salesforce Opportunity custom fields exist and match the API names used (Compliance_Status__c, Compliance_Risk__c, Compliance_Checked_At__c, Compliance_Score__c). Set the target Slack channel in the Slack message step and adjust the alert threshold or message text if needed. Review and edit the playbook rules and passing_score values to match your sales process before activating the workflow. Additional info How To Customize Nodes Modify Playbook Rules Edit the “Define Playbook Rules” node Adjust rules and passing score based on your process Change AI Evaluation Logic Update the prompt inside “Evaluate Compliance” Customize scoring or decision criteria Adjust Slack Alerts Modify message format in “Send Slack Alert” Change channel ID Update Salesforce Fields Edit field mappings in: “Update Salesforce Compliance Fields” Change Risk Threshold Modify condition in: “Check High Risk Deals” node Add-ons (Extend This Workflow) You can enhance this workflow with: Email notifications for managers Dashboard integration (e.g., BI tools) Auto-task creation in Salesforce for non-compliant deals Weekly compliance summary reports Integration with CRM notes or activity logs Use Case Examples Here are some practical ways to use this workflow: Sales Playbook Enforcement Ensure reps follow required steps before advancing deals Deal Risk Identification Automatically flag risky opportunities early Sales Coaching Identify gaps like missing demos or meetings Pipeline Quality Monitoring Maintain high-quality opportunities in pipeline Compliance Reporting Track historical compliance trends in Google Sheets There can be many more use cases depending on your sales process and business needs. Troubleshooting Guide | Issue | Possible Cause | Solution | |------|--------------|---------| | No data fetched from Google Sheets | Incorrect Sheet ID or permissions | Reconnect Google Sheets and verify access | | Salesforce data not updating | Invalid credentials or field mapping | Check Salesforce API credentials and field IDs | | AI response is empty | API issue or incorrect parsing | Verify Gemini API key and response handling | | Slack alert not sent | Wrong channel ID or permissions | Confirm Slack bot access and channel ID | | Incorrect compliance score | Prompt logic mismatch | Review and update AI prompt logic | | Workflow stops mid-way | Node execution error | Check execution logs in n8n | Need Help? If you need help setting up, customizing or extending this workflow, we’re here to assist. Whether you want to: Tailor this workflow to your sales process Add advanced automations Integrate with more tools Build custom AI-powered workflows Reach out to WeblineIndia to hire n8n workflow developers for expert support and development services. We can help you turn your business processes into fully automated, intelligent workflows.
by WeblineIndia
Facebook Page Comment Moderation Scoreboard → Team Report This workflow automatically monitors Facebook Page comments, analyzes them using AI for intent, toxicity & spam, stores moderation results in a database and sends a clear summary report to Slack and Telegram. This workflow runs every few hours to fetch Facebook Page comments and analyze them using OpenAI. Each comment is classified as positive, neutral or negative, checked for toxicity, spam & abusive language and then stored in Supabase. A simple moderation summary is sent to Slack and Telegram. You receive: Automated Facebook comment moderation AI-based intent, toxicity, and spam detection Database logging of all moderated comments Clean Slack & Telegram summary reports Ideal for teams that want visibility into comment quality without manually reviewing every message. Quick Start – Implementation Steps Import the workflow JSON into n8n. Add your Facebook Page access token to the HTTP Request node. Connect your OpenAI API key for comment analysis. Configure your Supabase table for storing moderation data. Connect Slack and Telegram credentials and choose target channels. Activate the workflow — moderation runs automatically. What It Does This workflow automates Facebook comment moderation by: Running on a scheduled interval (every 6 hours). Fetching recent comments from a Facebook Page. Preparing each comment for AI processing. Sending comments to OpenAI for moderation analysis. Extracting structured moderation data: Comment intent Toxicity score Spam detection Abusive language detection Flagging risky comments based on defined rules. Storing moderation results in Supabase. Generating a summary report. Sending the report to Slack and Telegram. This ensures consistent, repeatable moderation with no manual effort. Who’s It For This workflow is ideal for: Social media teams Community managers Marketing teams Customer support teams Moderation and trust & safety teams Businesses managing high-volume Facebook Pages Anyone wanting AI-assisted comment moderation Requirements to Use This Workflow To run this workflow, you need: n8n instance** (cloud or self-hosted) Facebook Page access token** OpenAI API key** Supabase project and table** Slack workspace** with API access Telegram bot** and chat ID Basic understanding of APIs and JSON (helpful but not required) How It Works Scheduled Trigger – Workflow starts automatically every 6 hours. Fetch Comments – Facebook Page comments are retrieved. Prepare Data – Comments are formatted for processing. AI Moderation – OpenAI analyzes each comment. Normalize Results – AI output is cleaned and standardized. Store Data – Moderation results are saved in Supabase. Aggregate Stats – Summary statistics are calculated. Send Alerts – Reports are sent to Slack and Telegram. Setup Steps Import the workflow JSON into n8n. Open the Fetch Facebook Page Comments node and add: Page ID Access token Connect your OpenAI account in the AI moderation node. Create a Supabase table and map fields correctly. Connect Slack and select a reporting channel. Connect Telegram and set the chat ID. Activate the workflow. How To Customize Nodes Customize Flagging Rules Update the normalization logic to: Change toxicity thresholds Flag only spam or abusive comments Add custom moderation rules Customize Storage You can extend Supabase fields to include: Language AI confidence score Reviewer notes Resolution status Customize Notifications Slack and Telegram messages can include: Emojis Mentions (@channel) Links to Facebook comments Severity labels Add-Ons (Optional Enhancements) You can extend this workflow to: Auto-hide or delete toxic comments Reply automatically to positive comments Detect language and region Generate daily or weekly moderation reports Build dashboards using Supabase or BI tools Add escalation alerts for high-risk comments Track trends over time Use Case Examples 1. Community Moderation Automatically identify harmful or spam comments. 2. Brand Reputation Monitoring Spot negative sentiment early and respond faster. 3. Support Oversight Detect complaints or frustration in comments. 4. Marketing Insights Measure positive vs negative engagement. 5. Compliance & Auditing Keep historical moderation logs in a database. Troubleshooting Guide | Issue | Possible Cause | Solution | |-----|---------------|----------| | No comments fetched | Invalid Facebook token | Refresh token & permissions | | AI output invalid | Prompt formatting issue | Use strict JSON prompt | | Data not saved | Supabase mapping mismatch | Verify table fields | | Slack message missing | Channel or credential error | Recheck Slack config | | Telegram alert fails | Wrong chat ID | Confirm bot permissions | | Workflow not running | Trigger disabled | Enable Cron node | Need Help? If you need help customizing, scaling or extending this workflow — such as advanced moderation logic, dashboards, auto-actions or production hardening, then our n8n workflow development team at WeblineIndia can assist with expert automation solutions.
by Rajeet Nair
Overview This workflow implements an AI-powered incident investigation and root cause analysis system that automatically analyzes operational signals when a system incident occurs. When an incident is triggered via webhook, the workflow gathers operational context including application logs, system metrics, recent deployments, and feature flag changes. These signals are processed to detect error patterns, cluster similar failures, and correlate them with recent system changes. The workflow uses vector embeddings to group similar log messages, allowing it to detect dominant failure patterns across services. It then aligns these failures with contextual events such as deployments, configuration changes, or traffic spikes to identify potential causal relationships. An AI agent analyzes all available evidence and generates structured root cause hypotheses, including confidence scores, supporting evidence, and recommended remediation actions. Finally, the workflow posts a detailed incident report directly to Slack, enabling engineering teams to quickly understand the issue and respond faster. This architecture helps teams reduce mean time to resolution (MTTR) by automating the early stages of incident investigation. How It Works 1. Incident Trigger The workflow begins when an incident alert is received through a webhook endpoint. The webhook payload may include information such as: incident ID severity level timestamp affected service This event starts the automated investigation process. 2. Workflow Configuration A configuration node defines the operational parameters used throughout the workflow, including: Logs API endpoint Metrics API endpoint Deployments API endpoint Feature flags API endpoint Time window for analysis Slack channel for incident notifications This allows the workflow to be easily adapted to different observability stacks. 3. Incident Context Collection The workflow collects system context from multiple sources: application logs infrastructure or service metrics recent deployments active feature flags Gathering this information provides the signals required to understand what happened before and during the incident. 4. Log Normalization and Denoising Raw logs are processed to remove low-value entries such as debug or informational messages. The workflow extracts structured error information including: timestamps log severity services involved request or session IDs error messages and stack traces This step ensures that only relevant failure signals are analyzed. 5. Failure Pattern Clustering Error messages are converted into embeddings using OpenAI. The workflow stores these embeddings in an in-memory vector store to group similar log messages together. This clustering step identifies dominant failure patterns that may appear across multiple sessions or services. 6. Failure Pattern Analysis Clustered log data is analyzed to detect recurring error types and dominant failure clusters. The workflow calculates statistics such as: total error volume most common error types error distribution across clusters dominant failure patterns These insights help highlight the primary issues affecting the system. 7. Event Correlation Analysis Failure patterns are then aligned with contextual events such as: deployments configuration changes traffic spikes The workflow calculates correlation scores based on temporal proximity and assigns likelihood scores to potential causes. This allows the system to identify events that may have triggered the incident. 8. AI Root Cause Analysis An AI agent analyzes the collected signals and generates structured root cause hypotheses. The agent considers: error clusters deployment timing configuration changes traffic patterns system metrics The output includes: multiple root cause hypotheses confidence scores supporting evidence recommended remediation actions 9. Incident Ticket Creation The final analysis is formatted into a structured incident report and posted to Slack. The Slack message contains: incident metadata root cause hypotheses confidence scores evidence recommended actions affected services This enables engineers to quickly review the investigation results and take action. Setup Instructions 1. Configure Observability APIs Update the Workflow Configuration node with API endpoints for: Logs API Metrics API Deployments API Feature Flags API These APIs should return JSON responses containing recent operational data. 2. Configure OpenAI Credentials Add OpenAI credentials for: OpenAI Embeddings OpenAI Chat Model These are used for log clustering and root cause analysis. 3. Configure Slack Integration Add Slack credentials and specify the Slack channel ID in the configuration node. Incident reports will be posted automatically to this channel. 4. Configure the Incident Trigger Deploy the webhook endpoint generated by the Incident Trigger node. Your monitoring or alerting system (PagerDuty, Grafana, Datadog, etc.) can call this webhook when incidents occur. 5. Activate the Workflow Once configured, activate the workflow in n8n. When incidents are triggered, the workflow will automatically run the investigation pipeline and generate a Slack incident report. Use Cases Automated Incident Investigation Automatically analyze operational signals when alerts are triggered to identify possible causes. AI-Assisted Site Reliability Engineering Provide engineers with AI-generated root cause hypotheses and investigation insights. Deployment Impact Detection Detect whether a recent deployment or configuration change caused a system failure. Observability Signal Correlation Combine logs, metrics, and system events to produce a unified incident analysis. Faster Incident Response Reduce mean time to resolution (MTTR) by automating the early stages of incident debugging. Requirements n8n with LangChain nodes enabled OpenAI API credentials Slack credentials APIs for retrieving: system logs service metrics deployment history feature flag status
by SpaGreen Creative
WhatsApp Number Verify & Confirmation System with Rapiwa API and Google Sheets Who is this for? This n8n workflow makes it easy to verify WhatsApp numbers submitted through a form. When someone fills out the form, the automation kicks in—capturing the data via a webhook, checking the WhatsApp number using the Rapiwa API, and sending a confirmation message if the number is valid. All submissions, whether verified or not, are logged into a Google Sheet with a clear status. It’s a great solution for businesses, marketers, or developers who need a reliable way to verify leads, manage event signups, or onboard customers using WhatsApp. How it works? This n8n automation listens for form submissions via a webhook, validates the provided WhatsApp number using the Rapiwa API, sends a confirmation message if the number is verified, and then appends the submission data to a Google Sheet, marking each entry as verified or unverified. Features Webhook Trigger**: Captures form submissions via HTTP POST Data Cleaning**: Formats and sanitizes the WhatsApp number Rapiwa API Integration**: Checks if the number is registered on WhatsApp Conditional Messaging**: Sends confirmation messages only to verified WhatsApp users Google Sheets Integration**: Appends all submissions with a validity status Auto Timestamping**: Adds the submission date in YYYY-MM-DD format Throttling Support**: Built-in delay to avoid hitting API or sheet rate limits Separation of Verified/Unverified**: Distinct handling for both types of entries Nodes Used in the Workflow Webhook** Format Webhook Response Data** (Code) Loop Over Items** (Split In Batches) Cleane Number** (Code) check valid whatsapp number** (HTTP Request) If** (Conditional) Send Message Using Rapiwa** verified append row in sheet** (Google Sheets) unverified append row in sheet** (Google Sheets) Wait1** How to set up? Webhook Add a Webhook node to the canvas. Set HTTP Method to POST. Copy the Webhook URL path (/a9b6a936-e5f2-4xxxxxxxxxe0a970d5). In your frontend form or app, make a POST request to: The request body should include: { "business_name": "ABC Corp", "location": "New York", "whatsapp": "+1 234-567-8901", "email": "user@example.com", "name": "John Doe" } Format Webhook Response Data Add a Code node after the Webhook node. Use this JavaScript code: const result = $input.all().map(item => { const body = item.json.body || {}; const submitted_date = new Date().toISOString().split('T')[0]; return { business_name: body.business_name, location: body.location, whatsapp: body.whatsapp, email: body.email, name: body.name, submitted_date: submitted_date }; }); return result; Loop Over Items Insert a SplitInBatches node after the data formatting. Set the Batch Size to a reasonable number (e.g. 1 or 10). This is useful for processing multiple submissions at once, especially if your webhook receives arrays of entries. Note: If you expect only one submission at a time, it still helps future-proof your workflow. Cleane Number Add a Code node named Cleane Number. Paste the following JavaScript: const items = $input.all(); const updatedItems = items.map((item) => { const waNo = item?.json["whatsapp"]; const waNoStr = typeof waNo === 'string' ? waNo : (waNo !== undefined && waNo !== null ? String(waNo) : ""); const cleanedNumber = waNoStr.replace(/\D/g, ""); item.json["whatsapp"] = cleanedNumber; return item; }); return updatedItems; Check WhatsApp Number using Rapiwa Add an HTTP Request node. Set: Method: POST URL: https://app.rapiwa.com/api/verify-whatsapp Add authentication: Type: HTTP Bearer Credentials: Select or create Rapiwa token In Body Parameters, add: number: ={{ $json.whatsapp }} This API call checks if the WhatsApp number exists and is valid. Expected Output: { "success": true, "data": { "number": "+88017XXXXXXXX", "exists": true, "jid": "88017XXXXXXXXXXXXX", "message": "✅ Number is on WhatsApp" } } Conditional If Check Add an If node after the Rapiwa validation. Configure the condition: Left Value: ={{ $json.data.exists }} Operation: true If true → valid number → go to messaging and append as "verified". If false → go to unverified sheet directly. Note: This step branches the flow based on the WhatsApp verification result. Send WhatsApp Message (Rapiwa) Add an HTTP Request node under the TRUE branch of the If node. Set: Method: POST URL: https://app.rapiwa.com/api/send-message Authentication: Type: HTTP Bearer Use same Rapiwa token Body Parameters: number: ={{ $json.data.phone }} message_type: text message: Hi {{ $('Cleane Number').item.json.name }}, Thanks! Your form has been submitted successfully. This sends a confirmation message via WhatsApp to the verified number. Google Sheets – Verified Data Add a Google Sheets node under the TRUE branch (after the message is sent). Set: Operation: Append Document ID: Choose your connected Google Sheet Sheet Name: Set to your active sheet (e.g., Sheet1) Column Mapping: Business Name: ={{ $('Cleane Number').item.json.business_name }} Location: ={{ $('Cleane Number').item.json.location }} WhatsApp Number: ={{ $('Cleane Number').item.json.whatsapp }} Email : ={{ $('Cleane Number').item.json.email }} Name: ={{ $('Cleane Number').item.json.name }} Date: ={{ $('Cleane Number').item.json.submitted_date }} validity: verified Use OAuth2 Google Sheets credentials for access. Note: Make sure the sheet has matching column headers. Google Sheets – Unverified Data Add a Google Sheets node under the FALSE branch of the If node. Use the same settings as the verified node, but set: validity: unverified This stores entries with unverified WhatsApp numbers in the same Google Sheet. Wait Node Add a Wait node after both Google Sheets nodes. Set Wait Time: Value: 2 seconds This delay prevents API throttling and adds buffer time before processing the next item in the batch. Google Sheet Column Reference A Google Sheet formatted like this ➤ Sample Sheet | Business Name | Location | WhatsApp Number | Email | Name | validity | Date | |---------------------|--------------------|------------------|----------------------|------------------|------------|------------| | SpaGreen Creative | Dhaka, Bangladesh | 8801322827799| contact@spagreen.net | Abdul Mannan | unverified | 2025-09-14 | | SpaGreen Creative | Bagladesh | 8801322827799| contact@spagreen.net| Abdul Mannan | verified | 2025-09-14 | > Note: The Email column includes a trailing space. Ensure your column headers match exactly to prevent data misalignment. How to customize the workflow Modify confirmation message with your brand tone Add input validation for missing or malformed fields Route unverified submissions to a separate spreadsheet or alert channel Add Slack or email notifications on new verified entries Notes & Warnings Ensure your Google Sheets credential has access to the target sheet Rapiwa requires an active subscription for API access Monitor Rapiwa API limits and adjust wait time as needed Keep your webhook URL protected to avoid misuse Support & Community WhatsApp Support: Chat Now Discord: Join SpaGreen Community Facebook Group: SpaGreen Support Website: spagreen.net Developer Portfolio: Codecanyon SpaGreen
by David Olusola
How It Works – Data Deduplication in n8n This tutorial demonstrates how to remove duplicate records from a dataset using JavaScript logic inside n8n's Code nodes. It simulates real-world data cleaning by generating sample user data with intentional duplicates (based on email addresses) and walks you through the process of deduplication step-by-step. The process includes: Creating Sample Data with duplicates. Filtering Out Duplicates using filter() and findIndex() based on email. Displaying Cleaned Results with simple statistics for before-and-after comparison. This is ideal for scenarios like CRM imports, ETL processes, and general data hygiene. ⚙️ Set-Up Steps 🔹 Step 1: Manual Trigger Node: When clicking 'Test workflow' Purpose: Initiates the workflow manually for testing. 🔹 Step 2: Generate Sample Data Node: Create Sample Data (Code node) What it does: Creates 6 users, including 2 intentional duplicates (by email). Outputs data as usersJson with metadata (totalCount, message). Mimics real-world messy datasets. 🔹 Step 3: Deduplicate the Data Node: Deduplicate Users (Code node) What it does: Parses usersJson. Uses .filter() + .findIndex() to keep only the first instance of each email. Logs total, unique, and removed counts. Outputs clean user list as separate items. 🔹 Step 4: Display Results Node: Display Results (Code node) What it does: Outputs structured summary: Unique users Status Timestamp Prepares results for review or downstream use. 📈 Sample Output Original count: 6 users Deduplicated count: 4 users Duplicates removed: 2 users 🎯 Learning Objectives You'll learn how to: Use .filter() and .findIndex() in n8n Code nodes Clean JSON data within workflows Create simple, effective deduplication pipelines Output structured summaries for reporting or integration 🧠Best Practices Validate input format (e.g., JSON schema) Handle null or missing fields gracefully Use logging for visibility Add error handling for production use Use pagination/chunking for large datasets
by Cheng Siong Chin
How It Works This workflow automates property registration verification, fraud detection, and blockchain-based compliance tracking by systematically assessing fraud risk, validating transactions, ensuring data immutability through cryptographic hashing, and recording property records on the blockchain. It ingests property registration data, applies GPT-4–driven fraud analysis with risk scoring, and verifies transaction legitimacy against regulatory and contractual criteria. The system generates cryptographic hashes for property and lease records, validates compliance requirements using AI-based analysis, queries the blockchain for verification, logs transactions on-chain, stores audit records in structured sheets, and securely archives all supporting documentation. Designed for real estate firms, legal practices, and property management companies, it enables transparent verification, fraud mitigation, and tamper-resistant compliance tracking across the property lifecycle. Setup Steps Configure property data source and set up OpenAI GPT-4 for fraud detection and compliance. Connect blockchain network credentials and configure hash generation parameters. Set up Google Sheets for audit logging and configure blockchain verification queries. Define fraud risk thresholds, compliance criteria, and transaction validation rules. Prerequisites Property registration data source; OpenAI API key; blockchain network access Use Cases Real estate firms automating fraud checks on property transactions; Customization Adjust fraud detection criteria and risk thresholds, modify blockchain network selection. Benefits Eliminates manual fraud detection, prevents title fraud and forgery