{
  "id": "ht07n5MKzkMkr0g5",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Turn Google Tasks into n8n Plans with Slack Approval & Archiving",
  "tags": [],
  "nodes": [
    {
      "id": "aad94e2a-96f8-454b-a1cf-087875e5df44",
      "name": "Filter Processed",
      "type": "n8n-nodes-base.filter",
      "position": [
        640,
        560
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "2f1ec5e1-b0d0-4a06-a5e2-39e7f1c7f178",
              "operator": {
                "type": "string",
                "operation": "notContains"
              },
              "leftValue": "={{ $json.notes }}",
              "rightValue": "\u2705 Processed"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "693cb7f7-177c-4909-93e5-604b5954aadf",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -272,
        336
      ],
      "parameters": {
        "width": 400,
        "height": 476,
        "content": "## How it works\nThis workflow acts as your personal n8n consultant. It takes simple ideas from your Google Tasks, uses AI to research and design a full n8n workflow, and sends the implementation plan to Slack.\n\n## Setup steps\n1. **Google Tasks:** Create a new list (e.g., \"n8n Ideas\").\n2. **Get New Ideas Node:** Select the list you created.\n3. **Mark as Notified Node:** Select the same list.\n4. **Credentials:** Connect your Google Tasks, OpenAI, and Slack accounts.\n\n## Customization\nYou can change the AI prompt to focus on specific tools or coding languages."
      },
      "typeVersion": 1
    },
    {
      "id": "0e155638-d7a7-44fe-9f59-451ffd77eab7",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        144,
        336
      ],
      "parameters": {
        "color": 7,
        "width": 652,
        "height": 480,
        "content": "## 1. Fetch & Filter\nGet tasks and ignore already processed ones."
      },
      "typeVersion": 1
    },
    {
      "id": "848ea55a-4863-4353-bb3e-c9f2c8bd1885",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        816,
        336
      ],
      "parameters": {
        "color": 7,
        "width": 580,
        "height": 480,
        "content": "## 2. AI Consulting\nAI designs the plan. If rejected, it regenerates."
      },
      "typeVersion": 1
    },
    {
      "id": "b84d8f68-5504-42d5-8709-6da83fb110ae",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1408,
        336
      ],
      "parameters": {
        "color": 7,
        "width": 896,
        "height": 480,
        "content": "## 3. Review & Archive. \nApprove to save to Sheets, or Regenerate to try again."
      },
      "typeVersion": 1
    },
    {
      "id": "32566a09-e9c3-4be7-8f10-5834dc679b71",
      "name": "Get New Ideas",
      "type": "n8n-nodes-base.googleTasks",
      "position": [
        416,
        560
      ],
      "parameters": {
        "task": "=example",
        "limit": 5,
        "operation": "getAll",
        "additionalFields": {}
      },
      "credentials": {
        "googleTasksOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "072f82f5-ea75-4e20-b06f-9c51afba4870",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        192,
        560
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 9
            }
          ]
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "a31cf7da-a62b-4990-8a78-9e4a818b52e1",
      "name": "Mark as Notified",
      "type": "n8n-nodes-base.googleTasks",
      "position": [
        2112,
        608
      ],
      "parameters": {
        "task": "=example",
        "taskId": "={{ $('Iterate Ideas').item.json.id }}",
        "operation": "update",
        "updateFields": {
          "notes": "\u2705 Processed"
        }
      },
      "credentials": {
        "googleTasksOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "ef48eac7-2392-464f-8efd-2770cd191bed",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1104,
        656
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o",
          "cachedResultName": "gpt-4o"
        },
        "options": {
          "textFormat": {
            "textOptions": {
              "type": "json_object"
            }
          }
        },
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "d17cf5d2-2502-4154-bc6b-81047f1cf719",
      "name": "Archive to Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1888,
        432
      ],
      "parameters": {
        "columns": {
          "value": {
            "Status": "Approved",
            "Date Added": "={{ $now }}",
            "Idea Title": "={{ $('Iterate Ideas').item.json.title }}",
            "Alternatives": "={{ $('AI Solution Architect').item.json.output.alternatives }}",
            "Key Challenges": "={{ $('AI Solution Architect').item.json.output.challenges }}",
            "Source Task ID": "={{ $('Iterate Ideas').item.json.id }}",
            "Improvement Ideas": "={{ $('AI Solution Architect').item.json.output.improvements }}",
            "Recommended Nodes": "={{ $('AI Solution Architect').item.json.output.nodes }}"
          },
          "schema": [
            {
              "id": "Date Added",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Date Added",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Idea Title",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Idea Title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Recommended Nodes",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Recommended Nodes",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Key Challenges",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Key Challenges",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Improvement Ideas",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Improvement Ideas",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Alternatives",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Alternatives",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Source Task ID",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Source Task ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "id",
          "value": "=sheet"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "=example"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "b3416203-aceb-4b10-95a2-fd256377301d",
      "name": "Is Approved?",
      "type": "n8n-nodes-base.if",
      "position": [
        1664,
        432
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "710e9b52-c78b-4b6a-8114-9ee7231d162c",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $json.data.approved }}",
              "rightValue": false
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "ed9afe67-c859-41c9-b1d6-366c76da128e",
      "name": "Slack \u2014 Review & Approve",
      "type": "n8n-nodes-base.slack",
      "position": [
        1440,
        432
      ],
      "parameters": {
        "select": "channel",
        "message": "={{ $json.output.slack_message }}",
        "options": {},
        "channelId": {
          "__rl": true,
          "mode": "id",
          "value": "=example"
        },
        "operation": "sendAndWait",
        "authentication": "oAuth2",
        "approvalOptions": {
          "values": {
            "approvalType": "double",
            "disapproveLabel": "Regenerate"
          }
        }
      },
      "credentials": {
        "slackOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "6ab91039-8d29-43bf-a005-f27ec4ce9375",
      "name": "Parse JSON",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1232,
        656
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"title\": \"Refined Title of the Idea\",\n  \"nodes\": \"List of recommended nodes from Trigger to Action. Explain the flow clearly.\",\n  \"challenges\": \"Potential technical difficulties, API limits, or authentication pitfalls.\",\n  \"improvements\": \"Ideas to make the workflow more robust (e.g., error handling) or valuable.\",\n  \"alternatives\": \"Alternative approaches using lateral thinking.\",\n  \"slack_message\": \"A fully formatted message using Slack mrkdwn syntax. It should include the Title, Nodes, and Challenges in a readable layout for a human to review.\"\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "dba458bc-82bd-4fcf-a8dd-3c0b0f705151",
      "name": "AI Solution Architect",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1088,
        432
      ],
      "parameters": {
        "text": "=You are an expert n8n Solution Architect.\nPlease analyze the user's idea and provide a concrete n8n workflow construction plan.\n\nUser Idea: {{ $('Iterate Ideas').item.json.title }}\n\n### Instructions\n1. Analyze the technical requirements, API needs, and logic flow.\n2. Output your response in **strictly valid JSON format**.\n3. Do not include markdown formatting (like ```json) outside the JSON object.\n\n### JSON Structure & Content Requirements\n{\n  \"title\": \"Refined Title of the Idea\",\n  \"nodes\": \"List of recommended nodes from Trigger to Action. Explain the flow clearly.\",\n  \"challenges\": \"Potential technical difficulties, API limits, or authentication pitfalls.\",\n  \"improvements\": \"Ideas to make the workflow more robust (e.g., error handling) or valuable.\",\n  \"alternatives\": \"Alternative approaches using lateral thinking.\",\n  \"slack_message\": \"A fully formatted message using Slack mrkdwn syntax. It MUST include the following sections with bold headers:\\n1. Idea Title\\n2. Recommended Node Configuration\\n3. Implementation Difficulties\\n4. Ideas for Improvement\\n5. Alternative Ideas\\n\\nEnsure the layout is easy to read for a human reviewer.\"\n}",
        "options": {},
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3
    },
    {
      "id": "8f5da8b0-e716-4811-8143-312657aa2f6a",
      "name": "Iterate Ideas",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        864,
        560
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "513d2a9f-065a-4f1f-9cbd-193f1db2945e",
  "connections": {
    "Parse JSON": {
      "ai_outputParser": [
        [
          {
            "node": "AI Solution Architect",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Is Approved?": {
      "main": [
        [
          {
            "node": "Archive to Sheets",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "AI Solution Architect",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get New Ideas": {
      "main": [
        [
          {
            "node": "Filter Processed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Iterate Ideas": {
      "main": [
        [],
        [
          {
            "node": "AI Solution Architect",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Processed": {
      "main": [
        [
          {
            "node": "Iterate Ideas",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mark as Notified": {
      "main": [
        [
          {
            "node": "Iterate Ideas",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get New Ideas",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Archive to Sheets": {
      "main": [
        [
          {
            "node": "Mark as Notified",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Solution Architect",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "AI Solution Architect": {
      "main": [
        [
          {
            "node": "Slack \u2014 Review & Approve",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Slack \u2014 Review & Approve": {
      "main": [
        [
          {
            "node": "Is Approved?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}