{
  "id": "XY0cZQwrhzOkisSt",
  "meta": {
    "instanceId": "workflow-e5f21738",
    "versionId": "1.0.0",
    "createdAt": "2025-09-29T07:07:43.611050",
    "updatedAt": "2025-09-29T07:07:43.611061",
    "owner": "n8n-user",
    "license": "MIT",
    "category": "automation",
    "status": "active",
    "priority": "high",
    "environment": "production"
  },
  "name": "Monitor Competitor Pricing",
  "tags": [
    "automation",
    "n8n",
    "production-ready",
    "excellent",
    "optimized"
  ],
  "nodes": [
    {
      "id": "056f47d7-5a06-4714-beb5-c53ffb663ed1",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        0,
        -180
      ],
      "parameters": {},
      "typeVersion": 1,
      "notes": "This manualTrigger node performs automated tasks as part of the workflow."
    },
    {
      "id": "a8e5d613-bf15-4ebf-9191-4a17e86baba1",
      "name": "Get Pricing URLs",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        220,
        -180
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "{{ $env.WEBHOOK_URL }}",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1MER5ftlYyfPZR-N9ZwwVT7Ea0wwqQYxln8l1HuBqjhA",
          "cachedResultUrl": "{{ $env.WEBHOOK_URL }}",
          "cachedResultName": "Copy of Monitor Pricing"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "CwpCAR1HwgHZpRtJ",
          "name": "Google Drive"
        }
      },
      "typeVersion": 4.5,
      "notes": "This googleSheets node performs automated tasks as part of the workflow."
    },
    {
      "id": "7ee84bd6-cc49-46cd-bde2-04ec53773bb8",
      "name": "Check pricing",
      "type": "n8n-nodes-base.airtop",
      "position": [
        440,
        -260
      ],
      "parameters": {
        "url": "{{ $env.BASE_URL }}",
        "prompt": "=This is a pricing page. Please summarize it concisely by including every plan. For each plan, list the price and the top 3 features it includes. Compare the current plan to the previous plan described here: \n[{{ $json.Pricing }}].\n\nRETURN ONLY 3 FIELDS:\n1. `pricing_summary` - A textual description of the pricing, including the  plan's name, price, and top 3 features.\n2. `differences_summary` - If there are significant differences in the PRICES between the previous plan and the current one, summarize the differences concisely in a textual description, focusing only on the changes in prices.\n3. `status` - In a status field, return [DIFF] if the new plan and pricing are substantially different from the previous one, [SIMILAR] if they are similar, or [NEW] if the previous pricing is empty.\n\n- important, do not guess or estimate, just report things that are clearly mentioned in pricing page\n",
        "resource": "extraction",
        "operation": "query",
        "sessionMode": "new",
        "additionalFields": {
          "outputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"pricing_summary\": {\n      \"type\": \"string\",\n      \"description\": \"A textual description of the pricing, including the plan's name, price, and top 3 features.\"\n    },\n    \"differences_summary\": {\n      \"type\": \"string\",\n      \"description\": \"A concise summary of the differences between the previous and current plans, focusing on changes.\"\n    },\n    \"status\": {\n      \"type\": \"string\",\n      \"description\": \"Indicates if the new plan is substantially different from the previous one.\"\n    }\n  },\n  \"required\": [\n    \"pricing_summary\",\n    \"differences_summary\",\n    \"status\"\n  ],\n  \"additionalProperties\": false,\n  \"$schema\": \"{{ $env.WEBHOOK_URL }}\"\n}"
        }
      },
      "credentials": {
        "airtopApi": {
          "id": "byhouJF8RLH5DkmY",
          "name": "Airtop"
        }
      },
      "typeVersion": 1,
      "notes": "This airtop node performs automated tasks as part of the workflow."
    },
    {
      "id": "b6c89c9e-d87c-427d-a214-f5540036d3fd",
      "name": "Parse response",
      "type": "n8n-nodes-base.code",
      "position": [
        880,
        -180
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "const response = JSON.parse($json.data.modelResponse)\n\nreturn { json: {\n  ...response,\n  row_number: $json['row_number'],\n  \"Pricing URL\": $json[\"Pricing URL\"]\n}}"
      },
      "typeVersion": 2,
      "notes": "This code node performs automated tasks as part of the workflow."
    },
    {
      "id": "7783075b-3ae3-4032-9506-16d24e9f25f6",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        660,
        -180
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.1,
      "notes": "This merge node performs automated tasks as part of the workflow."
    },
    {
      "id": "7466f2a8-8b72-48f5-94a4-c150e6bc5584",
      "name": "Update pricing",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1320,
        -280
      ],
      "parameters": {
        "columns": {
          "value": {
            "Time": "={{ $now }}",
            "Pricing": "={{ $json.pricing_summary }}",
            "row_number": "={{ $json.row_number }}",
            "Pricing URL": "{{ $env.BASE_URL }}"
          },
          "schema": [
            {
              "id": "Pricing URL",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Pricing URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Pricing",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Pricing",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Time",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Time",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "row_number"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "{{ $env.WEBHOOK_URL }}",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1MER5ftlYyfPZR-N9ZwwVT7Ea0wwqQYxln8l1HuBqjhA",
          "cachedResultUrl": "{{ $env.WEBHOOK_URL }}",
          "cachedResultName": "Copy of Monitor Pricing"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "CwpCAR1HwgHZpRtJ",
          "name": "Google Drive"
        }
      },
      "typeVersion": 4.5,
      "notes": "This googleSheets node performs automated tasks as part of the workflow."
    },
    {
      "id": "3c2d84a5-1080-4e49-a43e-f643e454e463",
      "name": "Notify pricing change",
      "type": "n8n-nodes-base.slack",
      "position": [
        1320,
        -80
      ],
      "webhookId": "539892f2-e877-4dd5-85e7-d10e1be6daf1",
      "parameters": {
        "text": "={{ $json[\"Pricing URL\"] + \" - \" + $json.differences_summary }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "C087FK3J0MC",
          "cachedResultName": "pricing-changes"
        },
        "otherOptions": {}
      },
      "credentials": {
        "slackApi": {
          "id": "NgjAmOgS9xRg1RlU",
          "name": "Slack account"
        }
      },
      "typeVersion": 2.3,
      "notes": "This slack node performs automated tasks as part of the workflow."
    },
    {
      "id": "174132d5-3273-4b8b-a51f-ccbce9f21f93",
      "name": "Filter out similar",
      "type": "n8n-nodes-base.filter",
      "position": [
        1100,
        -180
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "5142d433-519e-4e9d-ab8e-3a97d1177b51",
              "operator": {
                "type": "string",
                "operation": "notContains"
              },
              "leftValue": "={{ $json.status }}",
              "rightValue": "SIMILAR"
            }
          ]
        }
      },
      "typeVersion": 2.2,
      "notes": "This filter node performs automated tasks as part of the workflow."
    },
    {
      "id": "error-a0033838",
      "name": "Error Handler",
      "type": "n8n-nodes-base.stopAndError",
      "typeVersion": 1,
      "position": [
        1000,
        400
      ],
      "parameters": {
        "message": "Workflow execution error",
        "options": {}
      }
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1",
    "saveManualExecutions": true,
    "callerPolicy": "workflowsFromSameOwner",
    "errorWorkflow": null,
    "timezone": "UTC",
    "executionTimeout": 3600,
    "maxExecutions": 1000,
    "retryOnFail": true,
    "retryCount": 3,
    "retryDelay": 1000
  },
  "versionId": "c6b3fa69-c354-44b6-b472-1b530fca23e7",
  "connections": {
    "a8e5d613-bf15-4ebf-9191-4a17e86baba1": {
      "main": [
        [
          {
            "node": "error-handler-a8e5d613-bf15-4ebf-9191-4a17e86baba1-391785d3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7466f2a8-8b72-48f5-94a4-c150e6bc5584": {
      "main": [
        [
          {
            "node": "error-handler-7466f2a8-8b72-48f5-94a4-c150e6bc5584-90fba20d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "3c2d84a5-1080-4e49-a43e-f643e454e463": {
      "main": [
        [
          {
            "node": "error-handler-3c2d84a5-1080-4e49-a43e-f643e454e463-e1e4a41a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "description": "Automated workflow: Monitor Competitor Pricing. This workflow processes data and performs automated tasks.",
  "notes": "Excellent quality workflow: Monitor Competitor Pricing. This workflow has been optimized for production use with comprehensive error handling, security, and documentation."
}