receive telegram events and telegram and google drive
Configured with Gmail, Google Drive, Google Sheets, Switch, and additional nodes. Review the connections and setup before adapting this template.
Node categories in this workflow
- Trigger
- Routing
- Code
- Messaging
- Transform
- Files / media
- Data store
Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.
Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.
How it works
The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.
| Node | Category | Type | Operation |
|---|---|---|---|
| Telegram Trigger | Trigger | Telegram Trigger | See node parameters |
| Check State | Routing | Switch | See node parameters |
| Clear State | Code | Code | See node parameters |
| addGPS | Messaging | Telegram | See node parameters |
| Welcome Message | Messaging | Telegram | See node parameters |
| Command? | Routing | If | See node parameters |
| Store GPS Location | Transform | Edit Fields | See node parameters |
| addGPS result | Messaging | Telegram | See node parameters |
| addShipmentNumber | Messaging | Telegram | See node parameters |
| Shipment Number | Transform | Edit Fields | See node parameters |
| addShipmentNumber result | Messaging | Telegram | See node parameters |
| Store Shipment | Code | Code | See node parameters |
| Store GPS | Code | Code | See node parameters |
| Load Workspace Data | Code | Code | See node parameters |
| waitingShipmentNumber | Code | Code | See node parameters |
| waitingGPS | Code | Code | See node parameters |
| Instructions | Messaging | Telegram | See node parameters |
| waitingPhoto | Code | Code | See node parameters |
| Waiting Conditions | Code | Code | See node parameters |
| addPhoto result | Messaging | Telegram | See node parameters |
| sendPhoto | Messaging | Telegram | See node parameters |
| Upload Picture | Files / media | Google Drive | See node parameters |
| Save Public Image Link | Code | Code | See node parameters |
| Confirmation Driver | Messaging | Telegram | See node parameters |
| Distribution Team Confirmation | Messaging | Gmail | See node parameters |
| Extract FileName | Transform | Edit Fields | See node parameters |
| Store fileName | Code | Code | See node parameters |
| Get Picture | Messaging | Telegram | file |
| Share Picture | Files / media | Google Drive | share |
| Initiate Workflow Data | Code | Code | See node parameters |
| Switch Command | Routing | Switch | See node parameters |
| Load Delivery Information | Data store | Google Sheets | append |
Setup
- Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
- Connect your own credentials through n8n’s credential store. Replace
REPLACE_WITH_*values with your resource identifiers. - Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
- Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.
Requirements
An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.
Credential types declared in the source
None declared. HTTP requests and Code nodes may still need configuration.
Workflow notes
5. Do you need more details?
5. Do you need more details?
Find a step-by-step guide in this tutorial 🎥 Watch My Tutorial
3. Driver's Input Collection Block
3. Driver's Input Collection Block
Based on the state flag value, the workflow process the input expected from the driver.
The waiting conditions code node is filtering the request based on the workplace state variable value
- If the value is waitingXXX: the output from the driver is processed, a value is recorded in a code node and a confirmation message is sent to the driver (including the next command to follow)
- If the value does not start with waiting: a message with instructions is sent to the driver
How to setup?
- Telegram Message Nodes: set up your telegram bot credentials Learn more about the Telegram Message Node
- Google Drive Nodes:
- Add your Google Drive API credentials to access your drive
- Select the folder using the list, an URL or an ID
- Select the sheet in which the vocabulary list is stored Learn more about the Google Drive Node
2. Driver's Input Command Block
2. Driver's Input Command Block
The switch command tunnels the flow based on the command:
- The code nodes named waitingXXX are storing a state flag to wait for the user input
- Telegram Message Nodes are asking users for the expected input
If the command is /sendConfirmation:
- A proof of delivery is sent to the logistics team by the Gmail Node
- Shipment information are recorded in the Google Sheet
- A confirmation is sent to the driver by the Telegram Node
How to setup?
- Telegram Message Nodes: set up your telegram bot credentials Learn more about the Telegram Message Node
- Send Email with Gmail Node: set up the node to send the confirmation to the delivery team
Learn more about the Gmail Email Node
- Add the email of the recipient To
- Add your Gmail API credentials
- Change the Send Name
Initiate Workflow Data
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.
0. Initiate Workplace Static Data
0. Initiate Workplace Static Data
Run it once before activating the workflow to initialize workspace data that will be used to store state flags and outputs from users.
How to setup?
- Code Node: do not change anything, just run it Learn more about the code node
1. Workflow Trigger with Telegram Message
1. Workflow Trigger with Telegram Message
The 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.
How to setup?
- Telegram Trigger Node: set up your telegram bot credentials Learn more about the Telegram Trigger Node
receive telegram events and telegram and google drive
receive telegram events and telegram and google drive
Purpose and structure
This folder contains the receive telegram events and telegram and google drive workflow. Its executable nodes use code, gmail, googleDrive, googleSheets, if, set, switch, telegram, telegramTrigger. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.
Setup
Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.
Entry points
Telegram Trigger
Verification
Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.
Attribution
https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Telegram/0789_Telegram_Code_Create_Triggered.json MIT; preserve source notices.