Hey! I'm Samir, a Supply Chain Engineer and Data Scientist from Paris founder of LogiGreen Consulting. We design tools to help small and medium businesses in improving their logistics processes using data analytics and automation.
Let's use N8N to make supply chains more efficient and sustainable Supply Chains!
Ten szablon workflow jest przeznaczony dla operacji logistycznych, które nie mogą polegać na systemie zarządzania transportem (TMS) do rejestrowania potwierdzeń dostaw.
Ten workflow wykorzystuje bota Telegram do automatycznego powiadamiania zespołów logistycznych przez e-mail o dostarczeniu przesyłki.
Kierowcy (wyposażeni w smartfony) mogą rejestrować swoje przybycie z wszystkimi niezbędnymi informacjami potrzebnymi do dokładnego planowania dystrybucji.
Wyobraźmy sobie kierowcę ciężarówki, który dociera do celu; może on skontaktować się z botem, aby uzyskać instrukcje dotyczące rejestracji dostawy.
E-mail jest następnie automatycznie wysyłany przez workflow N8N, zawierający wszystkie zebrane informacje oraz zdjęcie przesyłki.
Postępuj zgodnie z notatkami, aby skonfigurować parametry w każdym węźle i przygotować się do usprawnienia operacji logistycznych!
Szczegółowe kroki zostały opisane w krótkim tutorialu.
Ta automatyzacja może być wykorzystana w różnych scenariuszach logistycznych, takich jak:
Ten workflow został stworzony z N8N 1.82.1
Zgłoszono: 17 marca 2025.
{{ $json.gpsLatitude }}
nLong: {{ $json.gpsLongitude }}
nn🖼️ Shipment Photo: n📷 View Image","chatId":"={{ $('Telegram Trigger').item.json.message.chat.id }}","additionalFields":{"parse_mode":"HTML","appendAttribution":false}},"notesInFlow":true,"typeVersion":1.2},{"id":"d5adfbeb-cbdb-461f-9709-6458a29e8fb8","name":"Distribution Team Confirmation","type":"n8n-nodes-base.gmail","position":[-1800,620],"webhookId":"85e72ad7-effa-4445-911b-90e5f13efa41","parameters":{"sendTo":"logigreenbot@logistics.com","message":"=Shipment Number: {{ $json.shipmentNumber }}
nn📍 Delivery Location:
nLat: {{ $json.gpsLatitude }}
nLong: {{ $json.gpsLongitude }}
n
⏳ Delivery Time: {{ $json.deliveryTime }}
nn🖼️ Shipment Photo:
nn
✅ This shipment has been successfully delivered by {{ $('Switch Command').item.json.message.chat.first_name }} (Driver ID: {{ $('Switch Command').item.json.message.chat.username }}).
n","options":{"senderName":"LogiGreenTrack Solution","appendAttribution":false},"subject":"=Delivery Confirmation: {{ $json.shipmentNumber }}"},"notesInFlow":true,"typeVersion":2.1},{"id":"963417b3-7e35-43dc-b303-c7445333aa5b","name":"Extract FileName","type":"n8n-nodes-base.set","position":[-2100,2020],"parameters":{"options":{},"assignments":{"assignments":[{"id":"ebee599b-f2d8-4b64-b8a5-eac8bdd698bb","name":"fileName","type":"string","value":"={{ $binary.data.fileName }}"}]}},"notesInFlow":true,"typeVersion":3.4},{"id":"d85cf18b-825e-4ab8-a9b0-fef63cb66ad8","name":"Store fileName","type":"n8n-nodes-base.code","position":[-1920,2020],"parameters":{"jsCode":"let workflowData = $getWorkflowStaticData('global');nworkflowData.fileName = $input.first().json.fileNamenreturn $json;n"},"typeVersion":2},{"id":"1ef71e46-4e1e-4707-99fc-41daa724a396","name":"Get Picture","type":"n8n-nodes-base.telegram","position":[-2320,1840],"webhookId":"09e9f612-0040-416a-8cbe-51d041d17436","parameters":{"fileId":"={{ $('Telegram Trigger').item.json.message.photo[3].file_id }}","resource":"file"},"typeVersion":1.2},{"id":"9f0159ae-0236-470e-8935-d5991292ad63","name":"Share Picture","type":"n8n-nodes-base.googleDrive","position":[-1960,1840],"parameters":{"fileId":{"__rl":true,"mode":"id","value":"={{ $json.id }}"},"options":{},"operation":"share","permissionsUi":{"permissionsValues":{"role":"reader","type":"anyone","allowFileDiscovery":true}}},"typeVersion":3},{"id":"66189707-157d-4f0d-b0b9-4b88d1fbc725","name":"Initiate Workflow Data","type":"n8n-nodes-base.code","notes":"You only need to run the initialization step once per workflow, regardless of the number of Telegram chat IDs. The initialization creates the telegramStates object within the global static data of the workflow. Once that object exists, the workflow will use it to store the state for any chat ID.","position":[-3500,-80],"parameters":{"jsCode":"let workflowStaticData = $getWorkflowStaticData('global');nif (!workflowStaticData.telegramStates) {n workflowStaticData.telegramStates = {}; n}nreturn workflowStaticData;"},"notesInFlow":false,"typeVersion":2},{"id":"7db890fb-9fe2-4148-b01a-f01d3c4e5d89","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-3560,-300],"parameters":{"width":440,"height":380,"content":"### 0. Initiate Workplace Static DatanRun it **once** before activating the workflow to initialize workspace data that will be used to **store state flags** and **outputs from users**.nn#### How to setup?n- **Code Node:** do not change anything, just run itn [Learn more about the code node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.code)n"},"typeVersion":1},{"id":"f01fb87a-1a24-4e0c-a769-9b5da7a402d2","name":"Switch Command","type":"n8n-nodes-base.switch","position":[-2620,220],"parameters":{"rules":{"values":[{"outputKey":"1","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"f2c10700-113d-4062-8c00-af59ccbe3b6f","operator":{"type":"string","operation":"equals"},"leftValue":"={{ $json.message.text }}","rightValue":"/addShipment"}]},"renameOutput":true},{"outputKey":"2","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"d09b6282-e9f8-4e43-b3db-9edae88cd634","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.message.text }}","rightValue":"/addGPS"}]},"renameOutput":true},{"outputKey":"3","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"2637a054-0892-411c-b659-b878219a26ab","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.message.text }}","rightValue":"/sendPhoto"}]},"renameOutput":true},{"outputKey":"4","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"5f3223e6-da0a-4056-8843-7778cf9de0a7","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.message.text }}","rightValue":"/sendConfirmation"}]},"renameOutput":true}]},"options":{"fallbackOutput":"extra"}},"notesInFlow":true,"typeVersion":3.2},{"id":"2e121b11-0302-4be5-bc67-629ab6ea50b3","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-3060,-300],"parameters":{"color":7,"width":620,"height":740,"content":"### 1. Workflow Trigger with Telegram MessagenThe workflow is triggered by a user message. The second is checking if the message is a command (starting with "/") to route it to the proper block.nn#### How to setup?n- **Telegram Trigger Node:** set up your telegram bot credentialsn[Learn more about the Telegram Trigger Node](https://docs.n8n.io/integrations/builtin/trigger-nodes/n8n-nodes-base.telegramtrigger/)n"},"typeVersion":1},{"id":"3898ff6c-b127-4fdf-91b5-dd79c2906f05","name":"Load Delivery Information","type":"n8n-nodes-base.googleSheets","position":[-2060,560],"parameters":{"columns":{"value":{"recordTime":"={{ $now }}","gpsLatitude":"={{ $json.gpsLatitude }}","cargoPicture":"={{ $json.publicImageLink }}","deliveryTime":"={{ $json.deliveryTime }}","gpsLongitude":"={{ $json.gpsLongitude }}","shipmentNumber":"={{ $json.shipmentNumber }}"},"schema":[{"id":"shipmentNumber","type":"string","display":true,"required":false,"displayName":"shipmentNumber","defaultMatch":false,"canBeUsedToMatch":true},{"id":"recordTime","type":"string","display":true,"required":false,"displayName":"recordTime","defaultMatch":false,"canBeUsedToMatch":true},{"id":"gpsLatitude","type":"string","display":true,"required":false,"displayName":"gpsLatitude","defaultMatch":false,"canBeUsedToMatch":true},{"id":"gpsLongitude","type":"string","display":true,"required":false,"displayName":"gpsLongitude","defaultMatch":false,"canBeUsedToMatch":true},{"id":"cargoPicture","type":"string","display":true,"required":false,"displayName":"cargoPicture","defaultMatch":false,"canBeUsedToMatch":true},{"id":"deliveryTime","type":"string","display":true,"required":false,"displayName":"deliveryTime","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"append","sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/