← New Relic + Telegram Bot integrations

Delete a Message with Telegram Bot API on New Deployment from New Relic API

Pipedream makes it easy to connect APIs for Telegram Bot, New Relic and 1400+ other apps remarkably fast.

Trigger workflow on
New Deployment from the New Relic API
Next, do this
Delete a Message with the Telegram Bot API
No credit card required
Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜

Trusted by 500,000+ developers from startups to Fortune 500 companies

Adyen logo
Brex logo
Carta logo
Checkr logo
Chameleon logo
DevRev logo
LinkedIn logo
Netflix logo
New Relic logo
OnDeck logo
Replicated logo
Scale AI logo
Teamwork logo
Warner Bros. logo
Xendit logo

Developers Pipedream

Getting Started

This integration creates a workflow with a New Relic trigger and Telegram Bot action. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Select this integration
  2. Configure the New Deployment trigger
    1. Connect your New Relic account
    2. Configure Polling interval
    3. Select a Application ID
  3. Configure the Delete a Message action
    1. Connect your Telegram Bot account
    2. Configure Chat ID
    3. Configure Message ID
  4. Deploy the workflow
  5. Send a test event to validate your setup
  6. Turn on the trigger

Details

This integration uses pre-built, source-available components from Pipedream's GitHub repo. These components are developed by Pipedream and the community, and verified and maintained by Pipedream.

To contribute an update to an existing component or create a new component, create a PR on GitHub. If you're new to Pipedream component development, you can start with quickstarts for trigger span and action development, and then review the component API reference.

Trigger

Description:Emit new event when a new deployment is created.
Version:0.0.2
Key:new_relic-new-deployment-event

New Relic Overview

New Relic's API enables you to do the following:

  • Automate your New Relic account and data
  • Retrieve data from New Relic for use in other tools
  • Build New Relic-powered tools and applications

Here are some examples of what you can build using the New Relic API:

  • A custom dashboard to display the data that matters most to you
  • An alerting system that notifies you when your app is experiencing problems
  • A tool to help you track your New Relic bill and usage
  • An application that integrates with New Relic to provide additional data or
    functionality

Trigger Code

import app from "../../new_relic.app.mjs";
import common from "../../common/common-sources.mjs";

export default {
  dedupe: "unique",
  type: "source",
  key: "new_relic-new-deployment-event",
  name: "New Deployment",
  description: "Emit new event when a new deployment is created.",
  version: "0.0.2",
  props: {
    ...common.props,
    application: {
      propDefinition: [
        app,
        "application",
      ],
    },
  },
  methods: {
    _setLastEmittedDeploy(deployment) {
      this.db.set("lastEmittedDeploy", deployment);
    },
    _getLastEmittedDeploy() {
      return this.db.get("lastEmittedDeploy");
    },
    getMeta({
      id,
      revision,
      timestamp,
    }) {
      return {
        id,
        summary: revision,
        ts: new Date(timestamp),
      };
    },
  },
  async run () {
    const deployments = await this.app.listDeployments(this.application);
    const toEmitEvents = [];
    const prevRequestFirstItem = this._getLastEmittedDeploy();
    for (const deployment of deployments) {
      if (prevRequestFirstItem == deployment.id) {
        break;
      }
      toEmitEvents.unshift(deployment);
    }
    this._setLastEmittedDeploy(deployments[0].id);

    for (const deployment of toEmitEvents) {
      this.$emit(deployment, this.getMeta(deployment));
    }
  },
};

Trigger Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI and CLI.
LabelPropTypeDescription
New RelicappappThis component uses the New Relic app.
N/Adb$.service.dbThis component uses $.service.db to maintain state between executions.
Polling intervaltimer$.interface.timer

How often to poll the New Relic for new events

Application IDapplicationintegerSelect a value from the drop down menu.

Trigger Authentication

New Relic uses API keys for authentication. When you connect your New Relic account, Pipedream securely stores the keys so you can easily authenticate to New Relic APIs in both code and no-code steps.

New Relic API calls require an API key in the call header. The API key uniquely identifies your account and authorizes access to your account data. Find your API key in your account settings > integrations > api key.

About New Relic

Real-time performance insights into your software, infrastructure & customer experience

Action

Description:Deletes a message. [See the docs](https://core.telegram.org/bots/api#deletemessage) for more information
Version:0.0.4
Key:telegram_bot_api-delete-message

Telegram Bot Overview

With the Telegram Bot API, you can build bots that perform a variety of tasks,
including:

  • Sending and receiving messages
  • Social networking
  • Content management
  • File sharing
  • Location sharing
  • Bot administration
  • And more!

Action Code

import telegramBotApi from "../../telegram_bot_api.app.mjs";

export default {
  key: "telegram_bot_api-delete-message",
  name: "Delete a Message",
  description: "Deletes a message. [See the docs](https://core.telegram.org/bots/api#deletemessage) for more information",
  version: "0.0.4",
  type: "action",
  props: {
    telegramBotApi,
    chatId: {
      propDefinition: [
        telegramBotApi,
        "chatId",
      ],
    },
    messageId: {
      propDefinition: [
        telegramBotApi,
        "messageId",
      ],
    },
  },
  async run({ $ }) {
    const resp = await this.telegramBotApi.deleteMessage(this.chatId, this.messageId);
    $.export("$summary", `Successfully deleted the message from chat, "${this.chatId}"`);
    return resp;
  },
};

Action Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI.

LabelPropTypeDescription
Telegram BottelegramBotApiappThis component uses the Telegram Bot app.
Chat IDchatIdstring

Enter the unique identifier for the target chat (e.g. 1035597319) or username of the target public chat (in the format @channelusername or @supergroupusername). For example, if the group's public link is t.me/mygroup, the username is @mygroup.

Message IDmessageIdstring

Enter the message ID.

Action Authentication

Telegram Bot uses API keys for authentication. When you connect your Telegram Bot account, Pipedream securely stores the keys so you can easily authenticate to Telegram Bot APIs in both code and no-code steps.

To use the Telegram Bot API, you must first create a new bot by chatting with the BotFather.


Telegram Bot how to

After you create your bot, copy the bot token and add it below.

About Telegram Bot

Telegram is a cloud-based instant messaging and voice over IP service

More Ways to Connect Telegram Bot + New Relic

Delete a Message with Telegram Bot API on New Alert from New Relic API
New Relic + Telegram Bot
 
Try it
Edit a Text Message with Telegram Bot API on New Alert from New Relic API
New Relic + Telegram Bot
 
Try it
Forward a Message with Telegram Bot API on New Alert from New Relic API
New Relic + Telegram Bot
 
Try it
Get the Number of Members in a Chat with Telegram Bot API on New Alert from New Relic API
New Relic + Telegram Bot
 
Try it
Kick a Chat Member with Telegram Bot API on New Alert from New Relic API
New Relic + Telegram Bot
 
Try it
New Alert from the New Relic API

Emit new event when a new alert is created.

 
Try it
New Deployment from the New Relic API

Emit new event when a new deployment is created.

 
Try it
New Bot Command Received (Instant) from the Telegram Bot API

Emit new event each time a Telegram Bot command is received.

 
Try it
New Channel Updates (Instant) from the Telegram Bot API

Emit new event each time a channel post is created or updated.

 
Try it
New Message Updates (Instant) from the Telegram Bot API

Emit new event each time a Telegram message is created or updated.

 
Try it
New Deployment with the New Relic API

Create a new deployment mark. See the docs here

 
Try it
Create Chat Invite Link with the Telegram Bot API

Create an additional invite link for a chat, See the docs for more information

 
Try it
Delete a Message with the Telegram Bot API

Deletes a message. See the docs for more information

 
Try it
Edit a Media Message with the Telegram Bot API

Edits photo or video messages. See the docs for more information

 
Try it
Edit a Text Message with the Telegram Bot API

Edits text or game messages. See the docs for more information

 
Try it

Explore Other Apps

1
-
12
of
1400+
apps by most popular

HTTP / Webhook
HTTP / Webhook
Get a unique URL where you can send HTTP or webhook requests
Node
Node
Anything you can do with Node.js, you can do in a Pipedream workflow. This includes using most of npm's 400,000+ packages.
Schedule
Schedule
Trigger workflows on an interval or cron schedule.
Beta
Python
Python
Anything you can do in Python can be done in a Pipedream Workflow. This includes using any of the 350,000+ PyPi packages available in your Python powered workflows.
Beta
Data Stores
Data Stores
Use Pipedream Data Stores to manage state throughout your workflows.
Telegram Bot
Telegram Bot
Telegram is a cloud-based instant messaging and voice over IP service
OpenAI (ChatGPT)
OpenAI (ChatGPT)
OpenAI is an AI research and deployment company with the mission to ensure that artificial general intelligence benefits all of humanity. They are the makers of popular apps like ChatGPT and DALL·E 2.
Google Sheets
Google Sheets
With Google Sheets, you can create, edit, and collaborate wherever you are
Discord
Discord
Use this app to create a Discord source that emits messages from your guild to a Pipedream workflow.
GitHub
GitHub
Where the world builds software. Millions of developers and companies build, ship, and maintain their software on GitHub—the largest and most advanced development platform in the world.
Formatting
Formatting
Pre-built actions to make formatting and manipulating data within your workflows easier.
Slack
Slack
Slack is a channel-based messaging platform. With Slack, people can work together more effectively, connect all their software tools and services, and find the information they need to do their best work — all within a secure, enterprise-grade environment.