Template design

更新时间:
复制 MD 格式

Telegram templates let you predefine message content to improve sending efficiency. Once saved, a template can be sent immediately without further review.

Prerequisites

  1. A bot must be connected. For instructions, see Bot management.

  2. The following steps are performed on the Template Design page. To access this page, go to the Chat App Message Service console, navigate to the Channel Management page, and click the Channel ID of the relevant Telegram channel.

Create a template

  1. On the Add page, click Add.

  2. In the dialog box, enter the template information and click OK.

    The template is created and its edit page opens automatically.

Design template content

  1. On the Edit page, find the template that you want to modify and click Edit.

  2. Follow the on-screen instructions to design the content for your chosen content type.

  3. Click Save.

Configure template buttons

On the template edit page, select the Add Button configuration module to add action buttons to the template. Multiple buttons can be added, and each button can be deleted.

Basic configuration

  • Button Name: Enter the name displayed on the button, up to 64 characters.

  • Action: Select the action type for the button. The following three types are supported:

    • Website Button: Opens the specified URL when clicked.

    • Mini App: Opens a Mini App when clicked.

    • Postback Button: Triggers a postback event when clicked.

Website Button / Mini App configuration

When the action is set to Website Button or Mini App, the following configuration options are displayed:

  • URL: Enter the target URL, up to 1,024 characters. Supports variable insertion.

Postback Button configuration

When the action is set to Postback Button, the following configuration options are displayed:

  • Event Type: Select how the postback event is handled:

    • Open Message: Opens the specified message template when the button is clicked.

    • Callback Data: Sends the configured value when the button is clicked.

      • Callback Data: Enter the value returned to the system, up to 64 bytes.

  • When Open Message is selected, select a message template without variables through the template selection dialog (supports searching by template name). The prompt reads: "Select a message template with no variables."

Delete a button

Each configured button has a delete option next to it. Click to remove the button.

Delete a template

Important

Deleted templates cannot be recovered. This action might disrupt messages in transit or cause errors with scheduled sending. Before proceeding, confirm that the template is not in use.

  1. On the Delete page, find the template that you want to delete and click Delete.

  2. In the confirmation dialog box, click OK.