Introduction
In the previous lesson, you successfully engineered the operational backbone of the onboarding system by dynamically generating a project plan based on a client's service package. Your Processor workflow now populates a Project Task Tracker sheet, transitioning the client's state to TASKS_ASSIGNED.
This lesson addresses the next critical step in automated project management: closing the feedback loop. Your objective is to implement status tracking that triggers notifications to stakeholders upon task completion.
You will build a separate, event-driven workflow that monitors the Project Task Tracker in real-time. When a team member updates a task's status to Completed, your system will instantly send a notification to a designated Slack channel. This provides immediate visibility into project velocity, eliminates manual status updates, and embodies the "act-and-inform" principle of a mature automation system.
To achieve this, we will use a webhook-based architecture, which is vastly more efficient and responsive than scheduled polling, aligning with the production-ready standards we are targeting.
1. The Real-Time Monitoring Architecture
A professional system reacts to events as they happen. Instead of repeatedly asking "Is anything done yet?" (polling), we will configure the Google Sheet to tell us the moment a task is completed.
This architecture consists of three parts:
- Google Apps Script: A small piece of JavaScript attached to your
Project Task Trackersheet. It runs automatically on every edit. onEdit(e)Trigger: The script's function that captures the edit event, including what was changed and where.- n8n Webhook: A unique URL that the Apps Script calls, sending the edit event data to your n8n workflow for processing.
The workflow you'll build will receive this data, filter it to act only on relevant status changes, and then execute the notification. This is a classic Trigger -> Transform -> Notify (TTN) pattern.
Google Sheets to Slack n8n - Lets Viz
The article 'Connect Google Sheets to Slack with n8n' from Lets Viz provides an excellent overview of this architecture. Read the introduction and the 'Architecture at a Glance' section to solidify your mental model of the system you are about to build.
Focus on the sections 'What You’ll Build' and 'Architecture at a Glance'. Note the TTN model mentioned (Trigger → Transform → Notify). This is the core pattern for this lesson.
This diagram illustrates a similar conditional notification pattern. A trigger event is evaluated, and based on the outcome, a notification is dispatched to the relevant stakeholder.

2. Implementing the Google Sheet Webhook Trigger
To begin, you need to equip your Project Task Tracker sheet with the Apps Script that will fire the webhook.
The video segment below provides a direct, practical walkthrough of this exact process. You have seen this before, and now you will apply it to your new tracker sheet.
Google Sheets on Autopilot: 11 Insane n8n Automation Hacks
To implement the real-time trigger, watch this segment from Jono Catliff's 'Google Sheets on Autopilot' video. It details how to set up an n8n webhook and connect it to a Google Sheet using an Apps Script trigger.
Watch the section from 07:00 to 12:08. Follow the steps precisely: create the webhook in n8n, paste the URL into the provided Apps Script, and configure the 'onEdit' trigger in your Google Sheet's Apps Script editor. Pay attention to the HTTP Method being set to 'POST'.
Use the following Google Apps Script. This is a standard script that sends the details of any cell edit to your n8n webhook.
function onEdit(e) {
var webhookUrl = "YOUR_N8N_WEBHOOK_URL"; // PASTE YOUR TEST WEBHOOK URL HERE
// Get information about the edited cell
var range = e.range;
var sheet = range.getSheet();
var sheetName = sheet.getName();
var row = range.getRow();
var column = range.getColumn();
var value = e.value;
var oldValue = e.oldValue;
// Get all values from the edited row
var rowValues = sheet.getRange(row, 1, 1, sheet.getLastColumn()).getValues()[0];
var headers = sheet.getRange(1, 1, 1, sheet.getLastColumn()).getValues()[0];
// Create a JSON payload
var payload = {
'sheetName': sheetName,
'range': range.getA1Notation(),
'row': row,
'column': column,
'value': value,
'oldValue': oldValue,
'rowValues': rowValues,
'headers': headers
};
// Set options for the HTTP request
var options = {
'method': 'post',
'contentType': 'application/json',
'payload': JSON.stringify(payload)
};
// Send the request
UrlFetchApp.fetch(webhookUrl, options);
}
Practical Task: Build the Status Notification Workflow
You will now create a new, dedicated workflow to handle these real-time status updates.
Scenario: A project manager updates the Status of a task in the Project Task Tracker from In Progress to Completed. The system must immediately send a formatted message to the #project-updates Slack channel.
Phase 1: Configure the Sheet and Workflow Trigger
- Create a New Workflow: In n8n, create a new workflow named
Project Status Monitor. - Add Webhook Node: Add a
Webhooknode. Copy the Test URL. - Update
Project Task Tracker:- Add two new columns to your
Project Task Trackersheet:Status(Column H) andNotificationSent(Column I). - Populate the
Statuscolumn for your existing tasks withNot Started.
- Add two new columns to your
- Implement Apps Script:
- Open your
Project Task Trackersheet, go toExtensions>Apps Script. - Paste the provided JavaScript code.
- Replace
YOUR_N8N_WEBHOOK_URLwith your n8n Test URL. - Save the script.
- Go to the
Triggerstab (clock icon), clickAdd Trigger, and configure it to run theonEditfunction from the spreadsheet on theOn editevent type. Save the trigger.
- Open your
Phase 2: Implement Filtering and Notification Logic
-
Test the Trigger: In n8n, click
Listen for Test Event. Go to your Google Sheet and change theStatusof one task toCompleted. The webhook node should receive the data. Inspect the JSON to understand its structure. -
Add an
IFNode:- Name it
Is Task Completed?. - Add two conditions that must both be true (
AND):- Condition 1 (Check Column): The edited column must be the
Statuscolumn (Column H, which is index 8).- Value 1:
{{ $json.body.column }} - Operation:
Number->Equal - Value 2:
8
- Value 1:
- Condition 2 (Check Value): The new value of the cell must be
Completed.- Value 1:
{{ $json.body.value }} - Operation:
String->Equal - Value 2:
Completed
- Value 1:
- Condition 1 (Check Column): The edited column must be the
The following video segment demonstrates this exact filtering technique.
- Name it
Google Sheets on Autopilot: 11 Insane n8n Automation Hacks
To correctly configure your IF node, review this segment from 'Google Sheets on Autopilot'. It shows how to filter incoming webhook data based on the edited column and its new value.
Watch from 14:01 to 18:49. The video uses a 'Filter' node, which functions identically to an 'IF' node for this purpose. Adapt the logic shown to match your column index (8) and desired status ('Completed').
-
Add a
SetNode (Prepare Notification):- Connect this to the
trueoutput of theIFnode. - Name it
Compose Slack Message. - This node will transform the raw row data into structured variables for your message. The
rowValuesarray from the webhook contains the data. - Create the following String values, mapping them from the
rowValuesarray (remember arrays are 0-indexed):projectName:{{ $json.body.rowValues[2] }}taskName:{{ $json.body.rowValues[3] }}assignedTo:{{ $json.body.rowValues[5] }}
- Create another String value named
messageand use Slack'smrkdwnto format it::white_check_mark: *Task Completed* *Project:* {{ $('Compose Slack Message').item.json.projectName }} *Task:* {{ $('Compose Slack Message').item.json.taskName }} *Assigned To:* {{ $('Compose Slack Message').item.json.assignedTo }}
- Connect this to the
-
Add a
SlackNode:- Connect it after the
Setnode. - Create or use existing Slack API credentials.
- Channel: Enter the name of a test channel, e.g.,
#project-updates. - Text: Use an expression to pull in your formatted message:
{{ $('Compose Slack Message').item.json.message }}.
- Connect it after the
Phase 3: Ensure Idempotency
To prevent sending a notification every time something in a "Completed" row is edited, we will add a flag.
-
Modify
IFNode: Add a thirdANDcondition to yourIs Task Completed?node:- Condition 3 (Check Notification Status): Check if the
NotificationSentcolumn (Column I, index 8) is empty orFALSE.- Value 1:
{{ $json.body.rowValues[8] }} - Operation:
Is Empty
- Value 1:
- Condition 3 (Check Notification Status): Check if the
-
Add
Google SheetsNode (Update Flag):- Connect this node after the
Slacknode. - Operation:
Update Row. - Sheet ID: Select your
Project Task Trackersheet. - Row Number: Use the row number from the webhook:
{{ $json.body.row }}. - Columns to Update:
NotificationSent:TRUE
- Connect this node after the
This pattern is a hallmark of robust systems. The article below reinforces this concept of using a "Processed" flag.
Google Sheets to Slack n8n - Lets Viz
This article from Lets Viz describes the exact idempotency pattern you are implementing. Reading this will confirm why this is a critical step for production-ready workflows.
Review 'Step 2: Add Google Sheets Node', focusing on 'B) Change tracking with a “Processed” flag'. Then, review 'Step 8: Mark as Sent (Idempotency)'. This validates the pattern of checking a flag before acting and updating it after.
Deliverables
- The complete JSON of your
Project Status Monitorworkflow. - A screenshot of a notification message successfully posted to your Slack test channel.
Evaluation Criteria
- Real-Time Trigger: The Apps Script and n8n webhook are correctly configured and trigger on edit.
- Conditional Logic: The
IFnode correctly filters events based on the column, value, and idempotency flag. - Correct Data Handling: The
Setnode correctly extracts data from the webhook payload and formats a professional notification. - Successful Notification: The Slack node successfully sends the formatted message to the specified channel.
- Idempotency: The workflow correctly updates the
NotificationSentflag in the Google Sheet to prevent duplicate notifications.
Conclusion
You have now built an event-driven, real-time monitoring and notification system. This workflow effectively closes the loop on task management, providing automated, instantaneous progress updates. This is a significant step up from batch-oriented, scheduled processes and demonstrates your ability to architect responsive, efficient systems.
Key Takeaways:
- Event-Driven Architecture: Using webhooks for real-time triggers is a superior pattern to polling for both performance and user experience.
- Defensive Filtering: Always assume your trigger will fire for irrelevant events. Robust
IFconditions are your primary defense against unwanted workflow executions. - The Flag Pattern for Idempotency: Checking and setting a "processed" flag is a fundamental technique to prevent duplicate actions, especially in notification systems.
- Separation of Concerns: The
Project Status Monitoris a distinct workflow with a single responsibility, making the overall system easier to debug, maintain, and scale.
Preview of the Next Lesson:
With task generation and status monitoring now fully automated and robust, we will circle back to ensure the very first step of our client interaction is equally resilient. In the final lesson of this module, you will "Apply automatic retry mechanisms to critical communication steps, such as sending welcome emails," completing your production-grade Client Onboarding System.