Securely Delete Dialogflow Intents via Telegram Command - n8n Workflow

Use this secure n8n workflow to remotely delete Dialogflow Intents using specific commands sent via Telegram. This powerful automation leverages the HTTP Request n8n node for API interaction.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Ideal User Profile

AI/Chatbot Developers managing Dialogflow agents who need a quick, remote way to remove outdated intents.
n8n Automation Specialists looking for practical, real-world n8n templates combining chat services and API management.
Users who require a high level of security and authorization before critical actions are performed in their production environment.
Anyone interested in integrating security checks (like user ID validation) within an n8n workflow.

Overview

Managing AI agents often requires rapid deployment and deletion of conversational intents. This sophisticated n8n workflow provides a secure, remote mechanism for deleting specific Dialogflow Intents using a simple command sent via Telegram.

The value of this n8n automation lies in its security layers. It starts with the Telegram n8n trigger and immediately enforces two critical checks: validating the sender's Telegram ID (ensuring only authorized personnel can proceed) and validating the exact command keyword (ensuring intentional execution).

If the checks pass, the n8n workflow uses the power of the HTTP Request n8n node to interact directly with the Google Dialogflow API, fetching the intent name before deleting it and confirming the success back to the user via Telegram. This robust pattern serves as an excellent example of highly secure and functional n8n templates for operational management.

How it Works

This n8n workflow follows a strict security and execution path:


  1. Trigger & Listen: The n8n workflow is started by the Telegram Trigger n8n node, which listens for any incoming messages.

  2. User Authentication: The User validation by ID If n8n node checks if the ID of the incoming message sender matches a predefined authorized user ID (via an expression like ={{ TelegramuserID }}). Unauthorized users are notified and the workflow stops.

  3. Keyword Verification: If the user is authorized, the Keyword validation If n8n node checks if the message text is the exact delete command ("delete" in this example).

  4. Handle Invalid Command: If the command is invalid, an error message is sent back via Telegram, stopping the dangerous action.

  5. Fetch Intent Name: If both security gates pass, an HTTP Request n8n node (HTTP Request GET NAME) executes a GET request against the Dialogflow API to retrieve the displayName of the intent about to be deleted. This information is crucial for the confirmation message.

  6. Delay: A simulated delay Wait n8n node pauses the flow for one second, ensuring smooth sequential operation.

  7. Intent Deletion: A second HTTP Request n8n node (HTTP Request ELIMINAR) performs a secure DELETE operation targeting the specific Dialogflow Intent URL, removing the resource.

  8. Confirmation: Finally, the Confirmation message Telegram n8n node informs the authorized user that the intent, identified by its display name, has been successfully removed. This entire sequence showcases efficient use of the n8n node library for secure DevOps.

Installation Guide

To deploy and use this secure n8n workflow, follow these steps:


  1. Import: Copy the provided n8n workflow JSON and import it into your n8n instance.

  2. Telegram Setup: Create or use an existing Telegram Bot Token. Configure the Telegram Trigger n8n node and the downstream Telegram n8n nodes with this credential.

  3. Google API Credentials: Set up a Google API credential in n8n with permissions to interact with the Dialogflow API (this uses the predefinedCredentialType authentication).

  4. Workflow Configuration:

User Validation: In the User validation by ID If n8n node, replace {{ TelegramuserID }} with the actual Telegram User ID of the person authorized to perform deletions.
Dialogflow Intent URL: Analyze the two HTTP Request n8n nodes (GET NAME and ELIMINAR). They contain hardcoded URLs referencing a specific project ID and a specific Intent ID. You must update both URLs to match the project and intent you wish to target. This is essential for the n8n node to interact correctly with your Dialogflow instance.

  1. Activation: Once configured, activate the n8n workflow to make the Telegram n8n trigger operational.

Node Details

Detailed n8n Node Breakdown

Telegram Trigger (n8n trigger): The starting point of the n8n workflow. It monitors for new messages, specifically listening for message updates to initiate the secure deletion process.
User validation by ID (If n8n node): Implements the first security check. It compares the incoming message sender's ID ($json.message.from.id) against a security variable to ensure only permitted users can proceed.
Keyword validation (If n8n node): The second security layer. Checks if the message text exactly matches the required deletion command ("delete").
HTTP Request GET NAME (n8n node): Uses a GET method with Google API authentication to query the Dialogflow API. Its purpose is solely to fetch the displayName of the target intent before deletion, enhancing user feedback.
simulated delay (Wait n8n node): A utility n8n node that pauses the n8n workflow for 1 second, ensuring smooth transition between fetching the name and executing the deletion command.
HTTP Request ELIMINAR (n8n node): The core action n8n node. It executes a critical DELETE request using Google API authentication to remove the specified Dialogflow Intent.


  • Confirmation message (Telegram n8n node): Sends a final confirmation message back to the user, utilizing data outputted by the HTTP Request GET NAME n8n node to confirm which specific intent was removed.

Related n8n Workflows

Free

Nodes: 6 Nodes
Updated: December 26 2025
View all
Created by

Soy un apasionado de la tecnología. Me entusiasma el desarrollo y la implementación de chatbots y automatizaciones. Disfruto simplificando procesos y mejorando la experiencia del usuario.

Featured*