datadrivenconstruction/n8n-pto-pipeline
Create n8n workflow for daily task assignment from PTO engineer to foreman via Telegram bot with status reporting.
npx skills add https://github.com/datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction --skill n8n-pto-pipeline
Daily work planning in construction involves:
Automated n8n pipeline connecting Google Sheets task lists with Telegram bots for real-time task distribution and status collection.
┌─────────────────┐ ┌─────────────┐ ┌─────────────────┐
│ Google Sheets │───>│ n8n │───>│ Telegram Bot │
│ (Task List) │ │ Pipeline │ │ (To Foreman) │
└─────────────────┘ └─────────────┘ └─────────────────┘
▲ │ │
│ │ ▼
│ ┌──────┴──────┐ ┌───────────┐
└──────────────│ Status │<─────│ Foreman │
│ Update │ │ Response │
└─────────────┘ └───────────┘
{
"nodes": [
{
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"parameters": {
"rule": {
"interval": [
{"field": "hours", "hoursInterval": 24}
]
},
"triggerTimes": {"item": [{"hour": 8, "minute": 0}]}
}
}
]
}
{
"name": "Get Today Tasks",
"type": "n8n-nodes-base.googleSheets",
"parameters": {
"operation": "read",
"sheetId": "YOUR_SHEET_ID",
"range": "Tasks!A:F",
"options": {}
}
}
// Filter tasks for specific foreman based on chat_id
const chatId = $node["Telegram Trigger"].json["message"]["chat"]["id"];
const tasks = $input.all();
return tasks.filter(task =>
task.json.foreman_chat_id === chatId.toString()
);
// Format task message
const tasks = $input.all();
let message = "📋 *Задачи на сегодня:*\n\n";
tasks.forEach((task, index) => {
message += `*${index + 1}. ${task.json.task_name}*\n`;
message += ` 📍 Участок: ${task.json.location}\n`;
message += ` ⏰ Срок: ${task.json.deadline}\n`;
message += ` 📝 ${task.json.description}\n\n`;
});
message += "\n_Ответьте на это сообщение статусом:_\n";
message += "✅ выполнил\n❌ не выполнил + причина";
return [{json: {message}}];
// Parse foreman response and update status
const message = $node["Telegram Trigger"].json["message"]["text"];
const replyTo = $node["Telegram Trigger"].json["message"]["reply_to_message"];
let status = "в работе";
let comment = "";
if (message.toLowerCase().includes("выполнил")) {
status = "выполнено";
} else if (message.toLowerCase().includes("не выполнил")) {
status = "не выполнено";
comment = message.replace(/не выполнил/i, "").trim();
}
return [{
json: {
task_id: replyTo.message_id,
status: status,
comment: comment,
updated_at: new Date().toISOString()
}
}];
Tasks Sheet:
| Column | Description |
|--------|-------------|
| task_id | Unique task identifier |
| task_name | Task title |
| description | Detailed description |
| location | Work location |
| deadline | Due date/time |
| foreman_chat_id | Telegram chat ID of assigned foreman |
| status | Current status |
| comment | Foreman comment |
Foremen Sheet:
| Column | Description |
|--------|-------------|
| name | Foreman name |
| chat_id | Telegram chat ID |
| registered_at | Registration timestamp |
npx n8n --tunnel
npx n8n --tunnel
Take datadrivenconstruction/n8n-pto-pipeline from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference npx.
Without those the skill loads but fails at the first command.