{
  "format": "rpai-station-workflow",
  "version": 1,
  "name": "Practice folder setup",
  "variables": [
    {
      "id": "var-folder",
      "name": "folder",
      "type": "string",
      "value": "~/Documents/Station Academy"
    }
  ],
  "activities": [
    {
      "id": "academy-001",
      "type": "comment",
      "name": "About this workflow",
      "properties": {
        "text": "Station Academy, Level 4. Creates the practice folder and an inbox with harmless test files. Change the variable 'folder' first on Windows."
      }
    },
    {
      "id": "academy-002",
      "type": "file_operation",
      "name": "Make sure the practice folder exists",
      "properties": {
        "operation": "create_folder",
        "sourcePath": "{{folder}}"
      }
    },
    {
      "id": "academy-003",
      "type": "file_operation",
      "name": "Create the inbox folder",
      "properties": {
        "operation": "create_folder",
        "sourcePath": "{{folder}}/inbox"
      }
    },
    {
      "id": "academy-004",
      "type": "write_file",
      "name": "Test note",
      "properties": {
        "filePath": "{{folder}}/inbox/meeting-notes.txt",
        "content": "Notes from the practice meeting.",
        "mode": "overwrite"
      }
    },
    {
      "id": "academy-005",
      "type": "write_file",
      "name": "Test list",
      "properties": {
        "filePath": "{{folder}}/inbox/shopping.txt",
        "content": "paper\npens\nfolders",
        "mode": "overwrite"
      }
    },
    {
      "id": "academy-006",
      "type": "write_file",
      "name": "Test table",
      "properties": {
        "filePath": "{{folder}}/inbox/numbers.csv",
        "content": "Name,Value\nA,1\nB,2",
        "mode": "overwrite"
      }
    },
    {
      "id": "academy-007",
      "type": "write_file",
      "name": "Test data",
      "properties": {
        "filePath": "{{folder}}/inbox/settings.json",
        "content": "{\"theme\": \"dark\"}",
        "mode": "overwrite"
      }
    },
    {
      "id": "academy-008",
      "type": "list_files",
      "name": "What is in the inbox?",
      "properties": {
        "folderPath": "{{folder}}/inbox",
        "filter": "*",
        "saveToVariable": "files"
      }
    },
    {
      "id": "academy-009",
      "type": "list_length",
      "name": "How many files?",
      "properties": {
        "listVariable": "files",
        "saveToVariable": "count"
      }
    },
    {
      "id": "academy-010",
      "type": "log",
      "name": "Report",
      "properties": {
        "message": "The inbox has {{count}} files: {{files}}",
        "level": "info"
      }
    }
  ]
}
