{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "64b58417-5539-44ed-8d7a-c8a2cb42e336",
      "name": "Workflow Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1152,
        464
      ],
      "parameters": {
        "width": 380,
        "height": 748,
        "content": "### How it works\n\nThis workflow automatically generates daily standup summaries from your Trello boards using Gemini AI. Every business day, it:\n\n1. Fetches cards updated/created today from your specified Trello board\n2. Formats the activity data (new cards, moves, comments)\n3. Uses Gemini AI to generate a human-readable standup summary with highlights and blockers\n4. Posts the summary to Slack and emails team leads\n5. Logs metrics to Google Sheets for tracking\n6. Sends alerts for overdue cards\n\n### Setup steps\n\n1. Connect your Trello, Slack, Gmail, and Google Sheets accounts\n2. Get a Gemini API key from Google AI Studio\n3. Set your board ID, Slack channel, and team email addresses in the configuration nodes\n4. Adjust the schedule timing in the trigger (default: 5 PM weekdays)\n5. Test with a manual execution first\n\n### Customization\n\nModify the Gemini prompt to change summary style, adjust the overdue threshold, or add custom Slack formatting. You can also extend this to multiple boards by duplicating the Trello nodes."
      },
      "typeVersion": 1
    },
    {
      "id": "bad9dc11-1d64-41b7-b999-fb48b3c315a3",
      "name": "Trello Section",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -752,
        464
      ],
      "parameters": {
        "color": 7,
        "width": 916,
        "height": 564,
        "content": "## Trello data collection\nFetch today's card updates and new cards from your specified board"
      },
      "typeVersion": 1
    },
    {
      "id": "99090a30-45ae-41e3-9fee-4bae3cb016c5",
      "name": "AI Processing Section",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        176,
        464
      ],
      "parameters": {
        "color": 7,
        "width": 528,
        "height": 564,
        "content": "## AI analysis\nGemini processes the data and generates human-readable summary"
      },
      "typeVersion": 1
    },
    {
      "id": "22cf93db-8d8b-47b3-82d9-61f4dc47fffd",
      "name": "Distribution Section",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        720,
        464
      ],
      "parameters": {
        "color": 7,
        "width": 752,
        "height": 564,
        "content": "## Distribution & logging\nSend summary to Slack, email leads, and log metrics to Sheets"
      },
      "typeVersion": 1
    },
    {
      "id": "b40d853f-38f6-4a53-a570-2f44ac55ed15",
      "name": "Alert Section",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1488,
        464
      ],
      "parameters": {
        "color": 7,
        "width": 512,
        "height": 564,
        "content": "## Overdue alerts\nCheck for overdue cards and send alerts if found"
      },
      "typeVersion": 1
    },
    {
      "id": "0ea837b7-1d35-4040-becb-9360e3f8d4c6",
      "name": "Daily Standup Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -688,
        640
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "fb54813d-2930-4a81-bd7f-ade7f16da43c",
      "name": "Configuration Settings",
      "type": "n8n-nodes-base.set",
      "position": [
        -448,
        640
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3.4
    },
    {
      "id": "1f7bff82-2a06-4362-8453-620c0bbcfcd2",
      "name": "Get Updated Cards Today",
      "type": "n8n-nodes-base.trello",
      "position": [
        -208,
        640
      ],
      "parameters": {
        "operation": "getAll"
      },
      "typeVersion": 1
    },
    {
      "id": "e2847c55-e941-48ab-a321-ba407191ee80",
      "name": "Get New Cards Today",
      "type": "n8n-nodes-base.trello",
      "position": [
        -208,
        848
      ],
      "parameters": {
        "operation": "getAll"
      },
      "typeVersion": 1
    },
    {
      "id": "848d38fc-3e68-4a8e-aea2-c3c680d51aa0",
      "name": "Format Card Activity",
      "type": "n8n-nodes-base.code",
      "position": [
        16,
        640
      ],
      "parameters": {
        "jsCode": "// Process and combine Trello data\nconst config = $input.first();\nconst updatedCards = $input.item(1);\nconst newCards = $input.item(2);\n\nconst activity = {\n  date: config.json.todayDate,\n  boardId: config.json.boardId,\n  updatedCards: updatedCards.json,\n  newCards: newCards.json,\n  summary: {\n    totalUpdated: updatedCards.json.length,\n    totalNew: newCards.json.length,\n    overdue: 0\n  }\n};\n\n// Count overdue cards (due date passed)\nconst today = new Date();\nactivity.overdue = [...updatedCards.json, ...newCards.json]\n  .filter(card => {\n    if (!card.due) return false;\n    return new Date(card.due) < today;\n  });\n\nactivity.summary.overdue = activity.overdue.length;\n\n// Format for AI\nconst formattedData = {\n  date: activity.date,\n  stats: activity.summary,\n  newCards: activity.newCards.map(card => ({\n    name: card.name,\n    list: card.list?.name || 'Unknown',\n    url: card.shortUrl\n  })),\n  updatedCards: activity.updatedCards.map(card => ({\n    name: card.name,\n    list: card.list?.name || 'Unknown',\n    url: card.shortUrl,\n    lastActivity: card.dateLastActivity\n  })),\n  overdueCards: activity.overdue.map(card => ({\n    name: card.name,\n    due: card.due,\n    url: card.shortUrl\n  }))\n};\n\nreturn { json: formattedData };"
      },
      "typeVersion": 2
    },
    {
      "id": "fb09a510-6bc7-416d-a958-d59813f8e2a9",
      "name": "Generate AI Summary",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        272,
        640
      ],
      "parameters": {
        "url": "https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent",
        "options": {},
        "sendBody": true,
        "contentType": "application/json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "typeVersion": 4.2
    },
    {
      "id": "e8540eb3-286a-41a0-b777-a2ba649073f6",
      "name": "Parse AI Response",
      "type": "n8n-nodes-base.set",
      "position": [
        512,
        640
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3.4
    },
    {
      "id": "a682d08b-1076-4ad5-ac1f-6099518b27ff",
      "name": "Post to Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        800,
        640
      ],
      "parameters": {
        "operation": "postToChannel"
      },
      "typeVersion": 2.1
    },
    {
      "id": "b2a508d4-6699-447e-bf4c-9f3b0c8d9b1a",
      "name": "Email Team Leads",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1056,
        640
      ],
      "parameters": {
        "sendTo": "={{ $('Configuration Settings').item(0).json.teamEmails }}",
        "message": "=Daily Standup Summary\\n\\n{{ $json.summary }}\\n\\nView board: https://trello.com/b/{{ $json.boardId }}",
        "options": {},
        "subject": "Daily Standup Summary - {{ $json.date }}"
      },
      "typeVersion": 2.1
    },
    {
      "id": "c0f3bf63-02c1-4845-b35f-348627323a0e",
      "name": "Log to Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1312,
        640
      ],
      "parameters": {
        "operation": "appendRow",
        "documentId": "={{ $('Configuration Settings').item(0).json.sheetsId }}"
      },
      "typeVersion": 4.4
    },
    {
      "id": "e286c6ff-19f6-46c5-85ec-fda1727ae39d",
      "name": "Check Overdue Items",
      "type": "n8n-nodes-base.if",
      "position": [
        1536,
        640
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "boolean": [
            {
              "value1": "={{ $json.hasOverdue }}",
              "value2": true
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "22bf8c9b-80e8-493e-8284-f1cf426975db",
      "name": "Send Overdue Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        1776,
        624
      ],
      "parameters": {
        "operation": "postToChannel"
      },
      "typeVersion": 2.1
    }
  ],
  "connections": {
    "Log to Sheets": {
      "main": [
        [
          {
            "node": "Check Overdue Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post to Slack": {
      "main": [
        [
          {
            "node": "Email Team Leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email Team Leads": {
      "main": [
        [
          {
            "node": "Log to Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse AI Response": {
      "main": [
        [
          {
            "node": "Post to Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Overdue Items": {
      "main": [
        [
          {
            "node": "Send Overdue Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate AI Summary": {
      "main": [
        [
          {
            "node": "Parse AI Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get New Cards Today": {
      "main": [
        [
          {
            "node": "Format Card Activity",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Card Activity": {
      "main": [
        [
          {
            "node": "Generate AI Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Daily Standup Trigger": {
      "main": [
        [
          {
            "node": "Configuration Settings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Configuration Settings": {
      "main": [
        [
          {
            "node": "Get Updated Cards Today",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get New Cards Today",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Updated Cards Today": {
      "main": [
        [
          {
            "node": "Format Card Activity",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}