← Plain + Telegram integrations

Promote a Chat Member with Telegram API on Thread Status Changed from Plain API

Pipedream makes it easy to connect APIs for Telegram, Plain and 2,500+ other apps remarkably fast.

Trigger workflow on
Thread Status Changed from the Plain API
Next, do this
Promote a Chat Member with the Telegram API
No credit card required
Intro to Pipedream
Watch us build a workflow
Watch us build a workflow
8 min
Watch now ➜

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

Adyen logo
Appcues logo
Bandwidth logo
Checkr logo
ChartMogul logo
Dataminr logo
Gopuff logo
Gorgias logo
LinkedIn logo
Logitech logo
Replicated logo
Rudderstack logo
SAS logo
Scale AI logo
Webflow logo
Warner Bros. logo
Adyen logo
Appcues logo
Bandwidth logo
Checkr logo
ChartMogul logo
Dataminr logo
Gopuff logo
Gorgias logo
LinkedIn logo
Logitech logo
Replicated logo
Rudderstack logo
SAS logo
Scale AI logo
Webflow logo
Warner Bros. logo

Developers Pipedream

Getting Started

This integration creates a workflow with a Plain trigger and Telegram 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 Thread Status Changed trigger
    1. Connect your Plain account
  3. Configure the Promote a Chat Member action
    1. Connect your Telegram account
    2. Configure Chat ID
    3. Optional- Configure User ID
    4. Optional- Configure Set if the Administrator Can Change Info
    5. Optional- Configure Set if the Administrator Can Create Channel Posts
    6. Optional- Configure Set if the Administrator Can Edit Messages
    7. Optional- Configure Set if the Administrator Can Delete Messages
    8. Optional- Configure Set if the Administrator Can Invite Users
    9. Optional- Configure Set if the Administrator Can Restrict Members
    10. Optional- Configure Set if the Administrator Can Pin Messages
    11. Optional- Configure Set if the Administrator Can Promote Members
  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 thread's status is transitioned.
Version:0.0.1
Key:plain-thread-status-transitioned

Plain Overview

The Plain API provides functionality for automating customer support tasks, such as managing conversations, customers, and team inboxes. Within Pipedream, you can leverage these features to create custom workflows that respond to events from your app or external services, triggering actions in Plain. By integrating the Plain API with Pipedream, you can enhance customer support efficiency, streamline communication, and keep customer data synchronized across platforms.

Trigger Code

import common from "../common/base-webhook.mjs";
import sampleEmit from "./test-event.mjs";

export default {
  ...common,
  key: "plain-thread-status-transitioned",
  name: "Thread Status Changed",
  description: "Emit new event when a thread's status is transitioned.",
  version: "0.0.1",
  type: "source",
  dedupe: "unique",
  methods: {
    ...common.methods,
    getEventType() {
      return "thread.thread_status_transitioned";
    },
    getSummary({ payload }) {
      return `Thread Status Transitioned ID ${payload.thread.id}`;
    },
  },
  sampleEmit,
};

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
PlainplainappThis component uses the Plain app.
N/Adb$.service.dbThis component uses $.service.db to maintain state between executions.
N/Ahttp$.interface.httpThis component uses $.interface.http to generate a unique URL when the component is first instantiated. Each request to the URL will trigger the run() method of the component.

Trigger Authentication

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

To get an API key, follow the following instructions: https://www.plain.com/docs/api-reference/graphql/authentication

About Plain

Customer support for modern tools. Fast, flexible and extendable.

Action

Description:Use this method to promote or demote a user in a supergroup or a channel. [See the docs](https://core.telegram.org/bots/api#promotechatmember) for more information
Version:0.0.5
Key:telegram_bot_api-promote-chat-member

Telegram Overview

The Telegram Bot API allows you to build bots that can interact with users on the Telegram platform. Using Pipedream, you can automate messaging, handle commands, and trigger actions based on conversations or alerts. Pipedream's serverless execution model enables you to create complex workflows involving Telegram messages without managing any infrastructure. With Pipedream's integration, you can process inbound messages, send outbound notifications, and connect the Telegram Bot API with numerous other services to create powerful automation solutions.

Action Code

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

export default {
  key: "telegram_bot_api-promote-chat-member",
  name: "Promote a Chat Member",
  description: "Use this method to promote or demote a user in a supergroup or a channel. [See the docs](https://core.telegram.org/bots/api#promotechatmember) for more information",
  version: "0.0.5",
  type: "action",
  props: {
    telegramBotApi,
    chatId: {
      propDefinition: [
        telegramBotApi,
        "chatId",
      ],
    },
    userId: {
      propDefinition: [
        telegramBotApi,
        "userId",
      ],
    },
    can_change_info: {
      type: "boolean",
      label: "Set if the Administrator Can Change Info",
      description: "Pass True, if the administrator can change chat title, photo and other settings.",
      optional: true,
    },
    can_post_messages: {
      type: "boolean",
      label: "Set if the Administrator Can Create Channel Posts",
      description: "Pass True, if the administrator can create channel posts [channels only].",
      optional: true,
    },
    can_edit_messages: {
      type: "boolean",
      label: "Set if the Administrator Can Edit Messages",
      description: "Pass True, if the administrator can edit messages of other users and can pin messages [channels only].",
      optional: true,
    },
    can_delete_messages: {
      type: "boolean",
      label: "Set if the Administrator Can Delete Messages",
      description: "Pass True, if the administrator can delete messages of other users [channels only].",
      optional: true,
    },
    can_invite_users: {
      type: "boolean",
      label: "Set if the Administrator Can Invite Users",
      description: "Pass True, if the administrator can invite new users to the chat.",
      optional: true,
    },
    can_restrict_members: {
      type: "boolean",
      label: "Set if the Administrator Can Restrict Members",
      description: "Pass True, if the administrator can restrict, ban or unban chat members.",
      optional: true,
    },
    can_pin_messages: {
      type: "boolean",
      label: "Set if the Administrator Can Pin Messages",
      description: "Pass True, if the administrator can pin messages [supergroups only].",
      optional: true,
    },
    can_promote_members: {
      type: "boolean",
      label: "Set if the Administrator Can Promote Members",
      description: "Pass True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by them).",
      optional: true,
    },
  },
  async run({ $ }) {
    const resp = await this.telegramBotApi.promoteChatMember(this.chatId, this.userId, {
      can_change_info: this.can_change_info,
      can_post_messages: this.can_post_messages,
      can_edit_messages: this.can_edit_messages,
      can_delete_messages: this.can_delete_messages,
      can_invite_users: this.can_invite_users,
      can_restrict_members: this.can_restrict_members,
      can_pin_messages: this.can_pin_messages,
      can_promote_members: this.can_promote_members,
    });
    $.export("$summary", `Successfully promoted the user, "${this.userId}", in 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
TelegramtelegramBotApiappThis component uses the Telegram 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.

User IDuserIdstring

Enter the unique identifier of the target user.

Set if the Administrator Can Change Infocan_change_infoboolean

Pass True, if the administrator can change chat title, photo and other settings.

Set if the Administrator Can Create Channel Postscan_post_messagesboolean

Pass True, if the administrator can create channel posts [channels only].

Set if the Administrator Can Edit Messagescan_edit_messagesboolean

Pass True, if the administrator can edit messages of other users and can pin messages [channels only].

Set if the Administrator Can Delete Messagescan_delete_messagesboolean

Pass True, if the administrator can delete messages of other users [channels only].

Set if the Administrator Can Invite Userscan_invite_usersboolean

Pass True, if the administrator can invite new users to the chat.

Set if the Administrator Can Restrict Memberscan_restrict_membersboolean

Pass True, if the administrator can restrict, ban or unban chat members.

Set if the Administrator Can Pin Messagescan_pin_messagesboolean

Pass True, if the administrator can pin messages [supergroups only].

Set if the Administrator Can Promote Memberscan_promote_membersboolean

Pass True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by them).

Action Authentication

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

About Telegram

Telegram, is a cloud-based, cross-platform, encrypted instant messaging (IM) service.

More Ways to Connect Telegram + Plain

Create Thread with Plain API on New Channel Updates (Instant) from Telegram Bot API
Telegram + Plain
 
Try it
Add Customer to Group with Plain API on New Channel Updates (Instant) from Telegram Bot API
Telegram + Plain
 
Try it
Create Thread with Plain API on New Message Updates (Instant) from Telegram Bot API
Telegram + Plain
 
Try it
Add Customer to Group with Plain API on New Message Updates (Instant) from Telegram Bot API
Telegram + Plain
 
Try it
Create Thread with Plain API on New Bot Command Received (Instant) from Telegram Bot API
Telegram + Plain
 
Try it
Customer Created from the Plain API

Emit new event when a customer is created.

 
Try it
Customer Deleted from the Plain API

Emit new event when a customer is deleted.

 
Try it
Customer Updated from the Plain API

Emit new event when a customer is updated.

 
Try it
Email Received from the Plain API

Emit new event when an email is received.

 
Try it
Email Sent from the Plain API

Emit new event when an email is sent.

 
Try it
Add Customer to Group with the Plain API

Adds a customer to a customer group. See the documentation

 
Try it
Create Customer Event with the Plain API

Creates an event with a customer. See the documentation

 
Try it
Create Thread with the Plain API

Creates a new thread with a given customer. See the documentation

 
Try it
Upsert Customer with the Plain API

Creates or updates customer with customer details. See the documentation

 
Try it
Create Chat Invite Link with the Telegram API

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

 
Try it

Explore Other Apps

1
-
24
of
2,500+
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.
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.
Pipedream Utils
Pipedream Utils
Utility functions to use within your Pipedream workflows
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 models like ChatGPT, DALL-E, and Whisper.
Premium
Salesforce
Salesforce
Cloud-based customer relationship management (CRM) platform that helps businesses manage sales, marketing, customer support, and other business activities, ultimately aiming to improve customer relationships and streamline operations.
Premium
HubSpot
HubSpot
HubSpot's CRM platform contains the marketing, sales, service, operations, and website-building software you need to grow your business.
Premium
Zoho CRM
Zoho CRM
Zoho CRM is an online Sales CRM software that manages your sales, marketing, and support in one CRM platform.
Premium
Stripe
Stripe
Stripe powers online and in-person payment processing and financial solutions for businesses of all sizes.
Shopify
Shopify
Shopify is a complete commerce platform that lets anyone start, manage, and grow a business. You can use Shopify to build an online store, manage sales, market to customers, and accept payments in digital and physical locations.
Premium
WooCommerce
WooCommerce
WooCommerce is the open-source ecommerce platform for WordPress.
Premium
Snowflake
Snowflake
A data warehouse built for the cloud
Premium
MongoDB
MongoDB
MongoDB is an open source NoSQL database management program.
Supabase
Supabase
Supabase is an open source Firebase alternative.
MySQL
MySQL
MySQL is an open-source relational database management system.
PostgreSQL
PostgreSQL
PostgreSQL is a free and open-source relational database management system emphasizing extensibility and SQL compliance.
Premium
AWS
AWS
Amazon Web Services (AWS) offers reliable, scalable, and inexpensive cloud computing services.
Premium
Twilio SendGrid
Twilio SendGrid
Send marketing and transactional email through the Twilio SendGrid platform with the Email API, proprietary mail transfer agent, and infrastructure for scalable delivery.
Amazon SES
Amazon SES
Amazon SES is a cloud-based email service provider that can integrate into any application for high volume email automation
Premium
Klaviyo
Klaviyo
Email Marketing and SMS Marketing Platform
Premium
Zendesk
Zendesk
Zendesk is award-winning customer service software trusted by 200K+ customers. Make customers happy via text, mobile, phone, email, live chat, social media.
Premium
ServiceNow
ServiceNow
The smarter way to workflow
Notion
Notion
Notion is a new tool that blends your everyday work apps into one. It's the all-in-one workspace for you and your team.
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.