Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Publishing a Template Message

Updated on 2024-04-19 GMT+08:00

Scenarios

Message templates contain fixed message content. If you need to send the same or similar messages multiple times, you can create a message template for quick message sending.

You can create different templates for different protocols using the same template name so that each type of subscribers can receive customized messages. Templates contain variables as the placeholders to represent changeable content that you can replace with your own message content. Note that you must create a template whose Protocol is Default, or the system will prevent you from publishing messages using this template name.

When you are creating messages using a template, select a template name. The system will list all variables in the following protocol sequence: Default, Email, HTTP, and HTTPS. The same variables are listed only once even if they are used in multiple protocols, and the protocols they support are listed after each variable. Specify content for each variable in the message template, and SMN replaces them with the content you entered. If you do not enter any content for a variable, the system will treat it as empty when sending messages.

SMN tries to match different types of subscribers to the template protocols. If there is no template for a specified protocol, SMN will use the default template to send messages to subscribers of that protocol.

This section describes how to publish messages using a template. For more details about message templates, see Message Template Management.

Prerequisites

Subscribers in the topic must have confirmed the subscription, or they will not be able to receive any messages.

Creating a Message Template

  1. Log in to the management console.
  2. Click on the upper left to select the desired region and project.
  3. Select Simple Message Notification under Application.

    The SMN console is displayed.

  4. In the navigation pane, choose Message Templates.

  5. In the upper right corner, click Create Message Template. For details, see Creating a Message Template in Message Template Management.
    For example, the template information is as follows:
    • Template Name: tem_001
    • Protocol: Default
    • Content: The Arts and Crafts Exposition will be held from {startdate} through {enddate}. We sincerely invite you to join us.

Publishing a Template Message

  1. Log in to the management console.
  2. Click on the upper left to select the desired region and project.
  3. Under Application, select Simple Message Notification.

    The SMN console is displayed.

  4. In the navigation pane, choose Topics.

    The Topics page is displayed.

  5. In the topic list, locate the topic that you need to publish a message to and click Publish Message in the Operation column.
  6. Configure the required parameters. (The topic name is provided by default and cannot be changed.)

    Select Template for Message Format. Then, manually type the template content in the Message box or click Generate Template Message to generate it automatically. The message content cannot be left blank nor exceed 256 KB.

    • If you choose to manually type the template message, see "Template Message Format" in Simple Message Notification User Guide for detailed requirements.
    • If you choose to automatically generate the template message, proceed with 7 through 10.
  7. Click Generate Template Message.
  8. Select a template name, for example, tem_001, and enter values for the variables.

    The system replaces the variables with the message content you specified. The protocols configured in the template are displayed after each variable. Only the Default protocol is specified in tem_001. Therefore, all confirmed subscribers in the topic will receive the message content in the default template.

  9. Click the Preview tab, and click Message Preview to preview the message.

    In this example, the message generated is The Arts and Crafts Exposition will be held from February 10 through February 21. We sincerely invite you to join us..

  10. Click OK.

    The message that is generated contains the template name and variables.

  11. Click OK.

    SMN delivers your message to all subscription endpoints. For details about messages for different protocols, see section "Messages of Different Protocols" in Simple Message Notification User Guide.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback