{
  "id": "BrAg7iFY7zDtl2GG",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Monitor and Report FAQ Freshness from Notion to Google Sheets and Slack",
  "tags": [],
  "nodes": [
    {
      "id": "f713da24-f233-423f-b3a3-e947d8cb1b0a",
      "name": "Sticky Note - Workflow Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        304,
        -288
      ],
      "parameters": {
        "width": 451,
        "height": 572,
        "content": "## \ud83d\udccb FAQ Freshness Monitor\n\n### How it works\nThis workflow keeps your FAQ documentation fresh by checking when each FAQ in your Notion database was last updated. It runs every Monday morning, calculates which entries are older than 30 days, and updates a Google Sheet with the results. If any FAQs are overdue, a Slack alert goes out to your chosen channel. This helps the team stay on top of content maintenance without manual checks.\n\n### Setup steps\n1. Connect your Notion, Google Sheets, and Slack accounts in n8n.\n2. In Notion, share your FAQ database with the n8n integration and note the database ID.\n3. Create a Google Sheet with the headers listed in this workflow.\n4. Add your sheet ID and Slack channel ID as environment variables.\n5. Adjust the schedule time if needed (default is Monday, 10 AM).\n6. Run once manually to confirm everything\u2019s flowing correctly.\n7. Enable the workflow and let it handle the weekly checks automatically.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "a2ecc6fc-568b-4205-81e1-6225e0beb3bd",
      "name": "Sticky Note - Schedule",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        880,
        -48
      ],
      "parameters": {
        "color": 2,
        "width": 524,
        "height": 412,
        "content": "## Data Source & Trigger \n\nThis section controls when and where data comes from.\n- The Schedule Trigger starts the workflow automatically every Monday at 10 AM.\n- The Notion node connects to your FAQ database and pulls all records for analysis.\nTip: Make sure your Notion integration has access and the database ID is set correctly.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "91cad904-4314-4c45-a0c4-6767286cde91",
      "name": "Sticky Note - Notion Setup",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1904,
        -176
      ],
      "parameters": {
        "color": 2,
        "width": 380,
        "height": 528,
        "content": "## Overdue Detection & Message Prep\n\n\nThis section filters out FAQs that haven\u2019t been updated in the last 30 days.\n- The IF node checks the SLA status (OVERDUE).\n- The Set and Aggregate nodes format all overdue items into a single message array for Slack.\nYou can adjust the filter logic or add extra criteria (like severity).\n"
      },
      "typeVersion": 1
    },
    {
      "id": "3c441289-f71a-430f-8bbb-688deb47b5d3",
      "name": "Sticky Note - Data Transform",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1424,
        -96
      ],
      "parameters": {
        "color": 2,
        "width": 460,
        "height": 460,
        "content": "## Data Processing & Storage\n\n\nHere, the workflow transforms the Notion data and syncs it with Google Sheets.\n- The Set node maps FAQ fields (title, last edited, severity, etc.).\n- The Sheets node appends or updates rows in your sheet, using \u201cTitle\u201d as the match key.\nYou can tweak this mapping if your Notion field names differ.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "f2e189c6-239c-43d0-b917-1685d8671649",
      "name": "Sticky Note - No Overdue Path",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2320,
        -240
      ],
      "parameters": {
        "color": 2,
        "width": 444,
        "height": 612,
        "content": "## Alerts & Communication\n\n\nFinally, the workflow sends the summary message to Slack.\n- If there are overdue FAQs, a detailed message is sent to the configured channel.\n- Optionally, you can add a small \u201cAll Clear\u201d message node for cases with no overdue items.\nTip: Test this manually once to confirm Slack permissions and formatting.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "052b2071-c955-4222-827e-9a2fb27b92b2",
      "name": "Fetch FAQs from Notion",
      "type": "n8n-nodes-base.notion",
      "position": [
        1248,
        192
      ],
      "parameters": {
        "options": {},
        "resource": "databasePage",
        "operation": "getAll",
        "returnAll": true,
        "databaseId": {
          "__rl": true,
          "mode": "id",
          "value": "="
        }
      },
      "credentials": {
        "notionApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "99028a08-2156-4f39-bd98-8dbe88587a65",
      "name": "Compute SLA Data",
      "type": "n8n-nodes-base.set",
      "position": [
        1472,
        192
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
              "name": "Title",
              "type": "string",
              "value": "={{ $json.name }}"
            },
            {
              "id": "c3d4e5f6-a7b8-4c9d-0e1f-2a3b4c5d6e7f",
              "name": "lastEdited",
              "type": "string",
              "value": "={{ $json.property_created_at.start }}"
            },
            {
              "id": "e5f6a7b8-c9d0-4e1f-2a3b-4c5d6e7f8a9b",
              "name": "slaStatus",
              "type": "string",
              "value": "={{ $json.property_status }}"
            },
            {
              "id": "f6a7b8c9-d0e1-4f2a-3b4c-5d6e7f8a9b0c",
              "name": "pageUrl",
              "type": "string",
              "value": "={{ $json.url }}"
            },
            {
              "id": "057fbd3f-9cd0-4420-a81f-d63b7d1c9ed5",
              "name": "Severity",
              "type": "string",
              "value": "={{ $json.property_severity }}"
            },
            {
              "id": "537c4ea9-f48e-433d-b0a0-099942ca0593",
              "name": "Suggested Action",
              "type": "string",
              "value": "={{ $json.property_suggested_action }}"
            },
            {
              "id": "33c00238-5f07-4950-aad4-d95a75bb7af7",
              "name": "Error Category",
              "type": "string",
              "value": "={{ $json.property_error_category }}"
            },
            {
              "id": "85aa9ccf-300a-45c1-8768-0789c028f074",
              "name": "url",
              "type": "string",
              "value": "={{ $json.url }}"
            },
            {
              "id": "a7171eb4-54dc-45c5-bed4-8872bf7d8022",
              "name": "Source URL",
              "type": "string",
              "value": "={{ $json.property_source_url }}"
            },
            {
              "id": "e5effafa-0f0b-446b-8a40-e1b83cce20bb",
              "name": "Repository",
              "type": "string",
              "value": "={{ $json.property_repository }}"
            },
            {
              "id": "4120ffb6-587e-4782-9fb6-ee3874d54e3c",
              "name": "Root Cause",
              "type": "string",
              "value": "={{ $json.property_root_cause }}"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "d7da8735-fcff-49f8-b4e3-cef0efa662c2",
      "name": "Update Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1696,
        192
      ],
      "parameters": {
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "",
          "cachedResultName": ""
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "="
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.4
    },
    {
      "id": "422fc2e2-8edb-4453-b621-1c1c90c42d4f",
      "name": "Filter Overdue FAQs",
      "type": "n8n-nodes-base.if",
      "position": [
        1920,
        192
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "f7a8b9c0-d1e2-4f3a-4b5c-6d7e8f9a0b1c",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.slaStatus }}",
              "rightValue": "OVERDUE"
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "425cc75f-df89-46af-8b6e-00b87fd558a6",
      "name": "Format Overdue Message",
      "type": "n8n-nodes-base.set",
      "position": [
        2144,
        192
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "a9b0c1d2-e3f4-4a5b-6c7d-8e9f0a1b2c3d",
              "name": "overdueList",
              "type": "string",
              "value": "=Title:- {{ $json.Title }} \n\nRepository:- {{ $json.Repository }}\n\nSuggested Action:- {{ $json['Suggested Action'] }} \n\nView FAQ:- {{ $json.pageUrl }} \n\nSeverity:- {{ $json.Severity }}"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "4f46e259-e668-4b4f-868d-84a2b52a7c98",
      "name": "Aggregate Overdue FAQs",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        2368,
        192
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "6f9d8e85-2e46-40b2-a667-7ab78eebd83a",
      "name": "Send Slack Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        2592,
        192
      ],
      "parameters": {
        "text": "=:warning: *FAQ Freshness Alert - Overdue Items Detected*  \n\nThe following FAQs have exceeded the 30-day freshness SLA and need review and is Overdue:\n\n{{ $json.data[0].overdueList }}\n\n_Please update these FAQs to ensure documentation accuracy.",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "id",
          "value": "="
        },
        "otherOptions": {
          "mrkdwn": true
        }
      },
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "27a43e2d-a1b4-443d-87d6-a9fa3bc53674",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        1024,
        192
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "weeks",
              "triggerAtDay": [
                1
              ],
              "triggerAtHour": 10
            }
          ]
        }
      },
      "typeVersion": 1.2
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "da931943-a122-40c8-93d7-6baa0733d8aa",
  "connections": {
    "Compute SLA Data": {
      "main": [
        [
          {
            "node": "Update Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Fetch FAQs from Notion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Overdue FAQs": {
      "main": [
        [
          {
            "node": "Format Overdue Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Google Sheets": {
      "main": [
        [
          {
            "node": "Filter Overdue FAQs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Overdue FAQs": {
      "main": [
        [
          {
            "node": "Send Slack Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch FAQs from Notion": {
      "main": [
        [
          {
            "node": "Compute SLA Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Overdue Message": {
      "main": [
        [
          {
            "node": "Aggregate Overdue FAQs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}