Génération de rapports hebdomadaires sur la consommation d'énergie avec API, e-mail et Google Drive
Ceci est unDocument Extraction, Multimodal AIworkflow d'automatisation du domainecontenant 12 nœuds.Utilise principalement des nœuds comme Code, Cron, EmailSend, GoogleDrive, HttpRequest. Générer des rapports hebdomadaires sur la consommation d'énergie avec EnergiDataService, e-mail et Google Drive
- •Informations d'identification Google Drive API
- •Peut nécessiter les informations d'identification d'authentification de l'API cible
Nœuds utilisés (12)
{
"id": "5if9twDNChTpUQFf",
"meta": {
"instanceId": "14e4c77104722ab186539dfea5182e419aecc83d85963fe13f6de862c875ebfa"
},
"name": "Generate Weekly Energy Consumption Reports with API, Email and Google Drive",
"tags": [],
"nodes": [
{
"id": "4827c44f-1995-4cd9-837f-f06c55ce9697",
"name": "Planification hebdomadaire (lundi 8h)",
"type": "n8n-nodes-base.cron",
"position": [
-200,
200
],
"parameters": {
"triggerTimes": {
"item": [
{
"hour": 8,
"mode": "everyWeek",
"weekday": "monday"
}
]
}
},
"typeVersion": 1
},
{
"id": "028bf36b-a75b-474d-a596-dcd8f4db7c20",
"name": "Récupération des données énergétiques",
"type": "n8n-nodes-base.httpRequest",
"position": [
20,
200
],
"parameters": {
"url": "https://api.energidataservice.dk/dataset/ConsumptionDE35Hour",
"options": {}
},
"typeVersion": 1
},
{
"id": "f0fa171b-52b2-4350-8d0f-808117715e30",
"name": "Normalisation des enregistrements",
"type": "n8n-nodes-base.code",
"position": [
240,
200
],
"parameters": {
"jsCode": "const itemlist = $input.first().json.records;\nreturn itemlist.map(r => ({ json: r }));"
},
"typeVersion": 2
},
{
"id": "a47b2980-6da2-4dbc-bb09-d23d4b936d9f",
"name": "Conversion en fichier",
"type": "n8n-nodes-base.convertToFile",
"position": [
460,
200
],
"parameters": {
"options": {}
},
"typeVersion": 1.1
},
{
"id": "613baa2d-3929-4e88-aa65-5303860dcfb4",
"name": "Envoi du rapport hebdomadaire par e-mail",
"type": "n8n-nodes-base.emailSend",
"position": [
680,
100
],
"parameters": {
"text": "Please find attached the latest weekly energy consumption report.",
"options": {},
"subject": "Weekly Energy Consumption Report",
"toEmail": "test@yopmail.com",
"fromEmail": "test@yopmail.com",
"attachments": "=data"
},
"typeVersion": 1
},
{
"id": "588f3a86-3932-499f-b3aa-e60cbc2c8ebd",
"name": "Téléversement du rapport sur le Drive Google",
"type": "n8n-nodes-base.googleDrive",
"position": [
680,
300
],
"parameters": {
"name": "=energy_report_{{ $now.format('yyyy_MM_dd_HH_ii_ss') }}",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "list",
"value": "root",
"cachedResultName": "/ (Root folder)"
}
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "GrSonA33DqizXziW",
"name": "Google Drive account 4"
}
},
"typeVersion": 3
},
{
"id": "7c910c92-a9d4-4a2e-9e91-69d859ea633f",
"name": "Note explicative : Explications des nœuds 1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-240,
40
],
"parameters": {
"width": 160,
"height": 120,
"content": "📝 - **Schedule Weekly (Mon 8AM)**: Trigger every Monday at 8AM."
},
"typeVersion": 1
},
{
"id": "ff3f08c5-430d-4b3e-8ef5-f3f93d32efe7",
"name": "Note explicative : Explications des nœuds 2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-20,
40
],
"parameters": {
"width": 160,
"height": 120,
"content": "📝 - **Fetch Energy Data**: Call EnergiDataService.dk API."
},
"typeVersion": 1
},
{
"id": "1627fcfa-d1f6-40f5-90dd-0352b2a6fb63",
"name": "Note explicative : Explications des nœuds 3",
"type": "n8n-nodes-base.stickyNote",
"position": [
200,
40
],
"parameters": {
"width": 160,
"height": 120,
"content": "📝 - **Normalize Records**: Flatten JSON response (records → items)."
},
"typeVersion": 1
},
{
"id": "48440a87-317b-47e4-808c-b07e6411bdd0",
"name": "Note explicative : Explications des nœuds 4",
"type": "n8n-nodes-base.stickyNote",
"position": [
420,
40
],
"parameters": {
"width": 160,
"height": 120,
"content": "📝 - **Convert to File**: Turn items into a CSV (binary `data`)."
},
"typeVersion": 1
},
{
"id": "dd003fb3-dccc-4e2f-90d4-f9acbdcca301",
"name": "Note explicative : Explications des nœuds 5",
"type": "n8n-nodes-base.stickyNote",
"position": [
660,
-40
],
"parameters": {
"width": 160,
"height": 120,
"content": "📝 - **Email Weekly Report**: Email the CSV file."
},
"typeVersion": 1
},
{
"id": "2f2425e1-86d2-499c-be72-3f42d723385c",
"name": "Note explicative : Explications des nœuds 6",
"type": "n8n-nodes-base.stickyNote",
"position": [
660,
500
],
"parameters": {
"width": 160,
"height": 120,
"content": "📝 - **Upload File to Drive**: Save CSV to Google Drive."
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "c9007e5b-7c88-4384-97bf-12dff0a2672c",
"connections": {
"a47b2980-6da2-4dbc-bb09-d23d4b936d9f": {
"main": [
[
{
"node": "613baa2d-3929-4e88-aa65-5303860dcfb4",
"type": "main",
"index": 0
},
{
"node": "588f3a86-3932-499f-b3aa-e60cbc2c8ebd",
"type": "main",
"index": 0
}
]
]
},
"028bf36b-a75b-474d-a596-dcd8f4db7c20": {
"main": [
[
{
"node": "f0fa171b-52b2-4350-8d0f-808117715e30",
"type": "main",
"index": 0
}
]
]
},
"f0fa171b-52b2-4350-8d0f-808117715e30": {
"main": [
[
{
"node": "a47b2980-6da2-4dbc-bb09-d23d4b936d9f",
"type": "main",
"index": 0
}
]
]
},
"4827c44f-1995-4cd9-837f-f06c55ce9697": {
"main": [
[
{
"node": "028bf36b-a75b-474d-a596-dcd8f4db7c20",
"type": "main",
"index": 0
}
]
]
}
}
}Comment utiliser ce workflow ?
Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.
Dans quelles scénarios ce workflow est-il adapté ?
Intermédiaire - Extraction de documents, IA Multimodale
Est-ce payant ?
Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.
Workflows recommandés
WeblineIndia
@weblineindiaA Leading Software Engineering, Consulting & Outsourcing Services Company in USA & India serving Clients Globally since 1999.
Partager ce workflow