{
  "name": "Tidy Desktop screenshots",
  "version": 1,
  "nodes": [
    {
      "localID": 0,
      "typeID": "trigger.directory_changed",
      "customName": "Desktop",
      "isDisabled": false,
      "x": 60.0,
      "y": 110.0,
      "config": {
        "watchPath": "~/Desktop",
        "recursive": false,
        "eventTypes": "created",
        "waitForCloudDownload": true,
        "customArgs": {}
      }
    },
    {
      "localID": 1,
      "typeID": "condition.compare",
      "customName": "Screenshot?",
      "isDisabled": false,
      "x": 380.0,
      "y": 110.0,
      "config": {
        "rules": [
          {
            "field": "fileName",
            "operator": "starts_with",
            "value": "Screenshot",
            "negate": false
          },
          {
            "field": "fileType",
            "operator": "equals",
            "value": "Images",
            "negate": false
          }
        ],
        "logic": "and",
        "caseInsensitive": true,
        "field": "",
        "operator": "equals",
        "value": ""
      }
    },
    {
      "localID": 2,
      "typeID": "transformer.extract_text_ocr",
      "customName": "Extract Text (OCR)",
      "isDisabled": false,
      "x": 700.0,
      "y": 110.0,
      "config": {
        "imagePath": "{{filePath}}",
        "recognitionLevel": "accurate",
        "usesLanguageCorrection": true,
        "outputKey": "extractedText"
      }
    },
    {
      "localID": 3,
      "typeID": "ai.prompt",
      "customName": "Name it",
      "isDisabled": false,
      "x": 1020.0,
      "y": 110.0,
      "config": {
        "prompt": "Below is the text visible in a screenshot. Write a short file name that says what the screenshot shows: 3 to 6 words, the app or website first if you can tell which one it is. No date, no file extension. If there is no readable text, answer with the single word screenshot.\n\nText on screen:\n{{extractedText}}",
        "systemPrompt": "",
        "imagePath": "",
        "provider": "",
        "model": "",
        "temperature": 0.2,
        "maxTokens": 0,
        "outputSchema": "{\"type\": \"object\", \"required\": [\"name\"], \"properties\": {\"name\": {\"type\": \"string\", \"description\": \"3 to 6 words saying what the screenshot shows. No date, no file extension.\"}}}"
      }
    },
    {
      "localID": 4,
      "typeID": "action.rename_file",
      "customName": "Rename File",
      "isDisabled": false,
      "x": 1340.0,
      "y": 110.0,
      "config": {
        "newName": "{{result.name}}.{{fileExtension}}",
        "overwrite": false,
        "allowFolders": false,
        "operations": [
          {
            "id": "slug",
            "kind": "slugify",
            "params": {
              "style": "kebab"
            }
          },
          {
            "id": "date",
            "kind": "addDate",
            "params": {
              "source": "created",
              "format": "iso",
              "placement": "start",
              "separator": "-"
            }
          }
        ]
      }
    },
    {
      "localID": 5,
      "typeID": "action.move_file",
      "customName": "Move File",
      "isDisabled": false,
      "x": 1660.0,
      "y": 110.0,
      "config": {
        "destination": "~/Pictures/Screenshots/",
        "mode": "move",
        "overwrite": false,
        "createDirectories": true,
        "allowFolders": false
      }
    },
    {
      "localID": 6,
      "typeID": "note",
      "customName": "Spot section",
      "isDisabled": false,
      "x": 20.0,
      "y": 30.0,
      "config": {
        "backdrop": true,
        "color": "#64B5F6",
        "text": "Spot a screenshot",
        "_width": 620.0,
        "_height": 240.0
      }
    },
    {
      "localID": 7,
      "typeID": "note",
      "customName": "Name section",
      "isDisabled": false,
      "x": 660.0,
      "y": 30.0,
      "config": {
        "backdrop": true,
        "color": "#BA68C8",
        "text": "Read it and name it",
        "_width": 620.0,
        "_height": 240.0
      }
    },
    {
      "localID": 8,
      "typeID": "note",
      "customName": "File section",
      "isDisabled": false,
      "x": 1300.0,
      "y": 30.0,
      "config": {
        "backdrop": true,
        "color": "#81C784",
        "text": "File it",
        "_width": 620.0,
        "_height": 240.0
      }
    }
  ],
  "connections": [
    {
      "sourceLocalID": 0,
      "sourcePortID": "outlet_output",
      "targetLocalID": 1,
      "targetPortID": "inlet_input"
    },
    {
      "sourceLocalID": 1,
      "sourcePortID": "outlet_yes",
      "targetLocalID": 2,
      "targetPortID": "inlet_input"
    },
    {
      "sourceLocalID": 2,
      "sourcePortID": "outlet_output",
      "targetLocalID": 3,
      "targetPortID": "inlet_input"
    },
    {
      "sourceLocalID": 3,
      "sourcePortID": "outlet_result",
      "targetLocalID": 4,
      "targetPortID": "inlet_input"
    },
    {
      "sourceLocalID": 4,
      "sourcePortID": "outlet_output",
      "targetLocalID": 5,
      "targetPortID": "inlet_input"
    }
  ],
  "background": {
    "type": "image",
    "ref": {
      "type": "bundled",
      "id": "graphite"
    },
    "fit": "cover"
  }
}
