{
  "name": "Large Deal Alert — Salesforce → Slack",
  "nodes": [
    {
      "parameters": {
        "triggerOn": "opportunityCreated"
      },
      "id": "salesforce-trigger",
      "name": "Salesforce Trigger",
      "type": "n8n-nodes-base.salesforceTrigger",
      "typeVersion": 1,
      "position": [0, 0],
      "credentials": {
        "salesforceOAuth2Api": {
          "id": "credential-id",
          "name": "Salesforce OAuth2"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "number": [
            {
              "value1": "={{ $json.Amount }}",
              "operation": "larger",
              "value2": 50000
            }
          ]
        }
      },
      "id": "check-amount",
      "name": "Amount > $50K?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [220, 0]
    },
    {
      "parameters": {
        "resource": "account",
        "operation": "get",
        "accountId": "={{ $('Salesforce Trigger').first().json.AccountId }}"
      },
      "id": "get-account",
      "name": "Get Account",
      "type": "n8n-nodes-base.salesforce",
      "typeVersion": 1,
      "position": [440, 0],
      "credentials": {
        "salesforceOAuth2Api": {
          "id": "credential-id",
          "name": "Salesforce OAuth2"
        }
      }
    },
    {
      "parameters": {
        "select": "channel",
        "channelId": {
          "__rl": true,
          "value": "executive-deals",
          "mode": "name"
        },
        "messageType": "block",
        "blocksUi": "={\n  \"blocks\": [\n    {\n      \"type\": \"section\",\n      \"text\": {\n        \"type\": \"mrkdwn\",\n        \"text\": \":dart: *New Large Opportunity Created*\\n*\" + $('Salesforce Trigger').first().json.Name + \"*\\nAmount: *$\" + parseFloat($('Salesforce Trigger').first().json.Amount).toLocaleString() + \"*\\nStage: \" + $('Salesforce Trigger').first().json.StageName + \"\\nAccount: \" + $('Get Account').first().json.Name\n      }\n    },\n    {\n      \"type\": \"context\",\n      \"elements\": [\n        {\n          \"type\": \"mrkdwn\",\n          \"text\": \"<https://your-org.lightning.force.com/lightning/r/Opportunity/\" + $('Salesforce Trigger').first().json.Id + \"/view|View in Salesforce>\"\n        }\n      ]\n    }\n  ]\n}",
        "otherOptions": {
          "unfurl_links": false
        }
      },
      "id": "post-to-slack",
      "name": "Post to Slack",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.3,
      "position": [660, 0],
      "credentials": {
        "slackApi": {
          "id": "credential-id",
          "name": "Slack API"
        }
      }
    }
  ],
  "connections": {
    "Salesforce Trigger": {
      "main": [
        [
          {
            "node": "Amount > $50K?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Amount > $50K?": {
      "main": [
        [
          {
            "node": "Get Account",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Get Account": {
      "main": [
        [
          {
            "node": "Post to Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "tags": [],
  "triggerCount": 0,
  "active": false,
  "meta": {
    "instanceId": "",
    "templateId": "revi-sf-large-deal-alert"
  }
}
