n8n-daily-report
Automate daily construction report generation using n8n workflow automation.
What this skill does
# n8n Daily Report Automation
## Business Case
Daily reports are critical but time-consuming. This n8n workflow automates collection of site data from multiple sources and generates formatted daily reports.
## Workflow Overview
```
[Site Data Sources] → [n8n Webhook] → [Data Processing] → [Report Generation] → [Distribution]
```
## n8n Workflow Configuration
### 1. Trigger Node: Schedule + Webhook
```json
{
"nodes": [
{
"name": "Daily Schedule",
"type": "n8n-nodes-base.scheduleTrigger",
"parameters": {
"rule": {
"interval": [{"field": "cronExpression", "expression": "0 17 * * 1-5"}]
}
}
},
{
"name": "Webhook Input",
"type": "n8n-nodes-base.webhook",
"parameters": {
"httpMethod": "POST",
"path": "daily-report-data"
}
}
]
}
```
### 2. Data Collection Nodes
```json
{
"nodes": [
{
"name": "Get Weather Data",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"url": "https://api.openweathermap.org/data/2.5/weather",
"qs": {
"lat": "={{$json.site_lat}}",
"lon": "={{$json.site_lon}}",
"appid": "={{$env.WEATHER_API_KEY}}"
}
}
},
{
"name": "Get Site Photos",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"url": "={{$env.PROCORE_API}}/projects/{{$json.project_id}}/images",
"authentication": "oAuth2"
}
},
{
"name": "Get Labor Data",
"type": "n8n-nodes-base.spreadsheetFile",
"parameters": {
"operation": "read",
"fileFormat": "xlsx"
}
}
]
}
```
### 3. Data Processing
```json
{
"name": "Process Report Data",
"type": "n8n-nodes-base.code",
"parameters": {
"jsCode": "const items = $input.all();\n\nconst weather = items[0].json;\nconst photos = items[1].json;\nconst labor = items[2].json;\n\nconst report = {\n date: new Date().toISOString().split('T')[0],\n project: $('Webhook Input').first().json.project_name,\n weather: {\n condition: weather.weather[0].main,\n temp_high: Math.round(weather.main.temp_max - 273.15),\n temp_low: Math.round(weather.main.temp_min - 273.15)\n },\n labor_summary: {\n total_workers: labor.reduce((sum, l) => sum + l.workers, 0),\n total_hours: labor.reduce((sum, l) => sum + l.hours, 0)\n },\n photo_count: photos.length\n};\n\nreturn [{json: report}];"
}
}
```
### 4. Report Generation
```json
{
"name": "Generate PDF Report",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "POST",
"url": "={{$env.PDF_SERVICE_URL}}/generate",
"body": {
"template": "daily_report",
"data": "={{$json}}"
}
}
}
```
### 5. Distribution
```json
{
"nodes": [
{
"name": "Send Email",
"type": "n8n-nodes-base.emailSend",
"parameters": {
"toEmail": "={{$json.distribution_list}}",
"subject": "Daily Report - {{$json.project}} - {{$json.date}}",
"attachments": "={{$node['Generate PDF Report'].json.file}}"
}
},
{
"name": "Upload to SharePoint",
"type": "n8n-nodes-base.microsoftSharePoint",
"parameters": {
"operation": "upload",
"siteId": "={{$env.SHAREPOINT_SITE}}",
"folderId": "/Daily Reports/{{$json.date}}"
}
}
]
}
```
## Python Helper Functions
```python
import requests
from datetime import date
def trigger_daily_report(project_data: dict, webhook_url: str):
"""Trigger n8n daily report workflow."""
payload = {
"project_id": project_data['id'],
"project_name": project_data['name'],
"site_lat": project_data['latitude'],
"site_lon": project_data['longitude'],
"distribution_list": project_data['stakeholder_emails']
}
response = requests.post(webhook_url, json=payload)
return response.status_code == 200
def format_labor_data(labor_entries: list) -> list:
"""Format labor data for n8n processing."""
formatted = []
for entry in labor_entries:
formatted.append({
'trade': entry['trade'],
'company': entry['company'],
'workers': entry['worker_count'],
'hours': entry['total_hours'],
'activities': entry.get('activities', [])
})
return formatted
```
## Quick Start
1. Import workflow to n8n
2. Configure environment variables:
- `WEATHER_API_KEY`
- `PROCORE_API`
- `PDF_SERVICE_URL`
- `SHAREPOINT_SITE`
3. Set schedule trigger for desired time
4. Configure email distribution list
## Resources
- **n8n Documentation**: https://docs.n8n.io
- **DDC Book**: Chapter 4.2 - Workflow Automation
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.