Automated Package Cleanup and Notification
detail.loadingPreview
Cleans up old 'TRANSPORTE-RECEBIDO' packages from a database and sends Telegram notifications for two different systems.
About This Workflow
This workflow is designed to automate the cleanup of outdated package data in a MySQL database. It targets records with the status 'TRANSPORTE-RECEBIDO' and the module 'pacoteProduto' that are older than one month. The cleanup process is executed twice, targeting two different database credentials (PPM and OBJ). After the cleanup, Telegram notifications are sent to a specific chat ID, indicating the completion of the operation for each system.
Key Features
- Scheduled Execution: Triggered by a cron job to run daily at 8 AM.
- Database Cleanup: Utilizes MySQL queries to remove old package records.
- Dual Database Support: Connects to two separate MySQL databases (PPM and OBJ) for cleanup.
- Conditional Deletion: Only deletes records older than one month.
- Telegram Notifications: Sends confirmation messages to a Telegram chat upon successful cleanup for each database.
- Manual Trigger: Includes a manual trigger for on-demand execution.
- Webhook Integration: Listens for a webhook to trigger the cleanup process.
How To Use
- Cron Node: Configure the
Cronnode to schedule the workflow. The current configuration triggers it daily at 8 AM. - Manual Trigger Node: The
On clicking 'execute'node allows for manual execution. Enable this node to test the workflow. - Webhook Node: The
Webhooknode listens for incoming requests on the/limparPacotespath. This can be used to trigger the workflow from external systems. - MySQL Nodes:
limpaPacoteCliente0connects to thePPMMySQL database and executes the cleanup query.limparPacoteCliente1connects to theOBJMySQL database and executes the same cleanup query.
- Telegram Nodes:
Telegramsends a notification to the specifiedchatIdafterlimpaPacoteCliente0is executed.Telegram1sends a notification to the samechatIdafterlimparPacoteCliente1is executed.
Connections:
- The
CronandWebhooknodes trigger bothlimpaPacoteCliente0andlimparPacoteCliente1nodes. limpaPacoteCliente0is connected toTelegram.limparPacoteCliente1is connected toTelegram1.
Apps Used
Workflow JSON
{
"id": "c5f181dc-c4fd-483a-b48a-0ffd7ee6b38b",
"name": "Automated Package Cleanup and Notification",
"nodes": 20,
"category": "Data Management",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: c5f181dc-c4fd...
About the Author
SaaS_Connector
Integration Guru
Connecting CRM, Notion, and Slack to automate your life.
Statistics
Related Workflows
Discover more workflows you might like
CSV to MySQL Data Ingestion
Reads a CSV file and inserts its data into a MySQL database.
FileMaker Data Entry and Update
Workflow to create a record in FileMaker, then edit it with additional data.
Dynamically Create Airtable Tables for Webflow Form Submissions
Automatically create dedicated Airtable tables for each Webflow form and log submissions.