{
  "name": "Spotify",
  "nodes": [
    {
      "parameters": {
        "method": "POST",
        "url": "http://192.168.2.8/api/custom",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "name",
              "value": "Spotify"
            }
          ]
        },
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "text",
              "value": "={{ $json.item.name }} -  {{ $json.item.album.artists[0].name }}"
            },
            {
              "name": "icon",
              "value": "21651"
            }
          ]
        },
        "options": {
          "response": {
            "response": {
              "responseFormat": "text",
              "outputPropertyName": "="
            }
          }
        }
      },
      "id": "da253c0e-f3b6-4c2b-a279-c3efabdd2793",
      "name": "Send to Clock",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 3,
      "position": [
        740,
        380
      ]
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "seconds",
              "secondsInterval": 10
            }
          ]
        }
      },
      "id": "12bbdc64-ce93-4d0a-a946-8edfc8b05f76",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.1,
      "position": [
        -380,
        500
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "http://192.168.2.8/api/custom",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "name",
              "value": "spotify"
            }
          ]
        },
        "options": {}
      },
      "id": "baf9d07e-ab9f-4532-a25b-a9595235e013",
      "name": "Remove App",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 3,
      "position": [
        640,
        580
      ]
    },
    {
      "parameters": {
        "operation": "currentlyPlaying"
      },
      "id": "2ae2f20d-c770-4e23-b3d4-c3f5638805f0",
      "name": "Spotify1",
      "type": "n8n-nodes-base.spotify",
      "typeVersion": 1,
      "position": [
        60,
        580
      ],
      "credentials": {
        "spotifyOAuth2Api": {
          "id": "evgwzWj9sCYeBTSL",
          "name": "Spotify account"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{ $json.is_playing }}",
              "operation": "contains",
              "value2": "true"
            }
          ]
        },
        "combineOperation": "any"
      },
      "id": "0dd678a3-b6be-4e35-a992-495161b28044",
      "name": "IF",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        280,
        500
      ]
    }
  ],
  "pinData": {},
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Spotify1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Spotify1": {
      "main": [
        [
          {
            "node": "IF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF": {
      "main": [
        [
          {
            "node": "Send to Clock",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Remove App",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "68074d27-ee76-4c9f-bbbe-c12def80e024",
  "id": "e65LpdUF7gKuXA4u",
  "meta": {
    "instanceId": "5c32c45e60d14b4e4149013c802c84e7e3b16fa433df9f299cb0fed77b8f9434"
  },
  "tags": []
}