{
  "name": "Celebrate Every Closed-Won Freshsales Deal in Email",
  "nodes": [
    {
      "name": "Freshsales — Deal Won",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "parameters": {
        "method": "POST",
        "url": "https://api.example.com/replace-with-real-endpoint",
        "sendBody": true,
        "options": {}
      },
      "notes": "Freshsales has no dedicated n8n node — use an HTTP Request to the Freshsales API. Trigger on the Closed-Won stage.",
      "position": [
        260,
        300
      ]
    },
    {
      "name": "Deal Details",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3,
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "1090",
              "name": "deal_name",
              "value": "={{ $json.properties.dealname }}",
              "type": "string"
            },
            {
              "id": "1091",
              "name": "amount",
              "value": "={{ $json.properties.amount }}",
              "type": "string"
            },
            {
              "id": "1092",
              "name": "owner",
              "value": "={{ $json.properties.owner }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "notes": "",
      "position": [
        500,
        300
      ]
    },
    {
      "name": "Send Email",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 2,
      "parameters": {
        "subject": "=🎉 Deal won: {{ $json.deal_name }} — {{ $json.amount }} ({{",
        "text": "={{ $json.summary }}"
      },
      "notes": "Add SMTP credentials (or swap for the Gmail node).",
      "position": [
        740,
        300
      ]
    },
    {
      "name": "Respond / Finish",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "parameters": {},
      "notes": "End of flow — extend with extra steps as needed.",
      "position": [
        980,
        300
      ]
    }
  ],
  "connections": {
    "Freshsales — Deal Won": {
      "main": [
        [
          {
            "node": "Deal Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Deal Details": {
      "main": [
        [
          {
            "node": "Send Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Email": {
      "main": [
        [
          {
            "node": "Respond / Finish",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
