Overview
The "发送模板消息" (Send Template Message) operation of the "消息" (Message) resource in this custom n8n node allows you to send a template-based message through the POPO OpenPlatform OA API. This is useful for automating notifications, alerts, or standardized communications to users or groups within the POPO platform. Typical scenarios include sending appointment reminders, status updates, or any structured message that follows a predefined template.
Practical Example:
You could use this node in an n8n workflow to automatically notify a user when a new support ticket is created, using a message template that includes dynamic content such as the ticket number and description.
Properties
| Name | Type | Meaning |
|---|---|---|
| 文件ID | String | The file ID to download. (Not required for sending template messages) |
| 文件消息ID | String | The message ID to recall. (Not required for sending template messages) |
| Body | JSON | The body of the request to send. Should contain the template message details, including recipient (touser), message type (msgtype), and the actual message content. Required |
Output
- The output is a JSON object (or array of objects) representing the response from the POPO OpenPlatform OA API after attempting to send the template message.
- The structure of the output will depend on the API's response, but typically includes fields such as status codes, message IDs, or error information if applicable.
Example Output:
[
{
"errcode": 0,
"errmsg": "ok",
"msgid": "123456789"
}
]
Note: The actual fields may vary based on the API's implementation.
Dependencies
- External Service: Requires access to the POPO OpenPlatform OA API.
- API Credentials: You must configure the
popoOpenPlatformOAApicredentials in n8n for authentication. - Environment: No special environment variables are mentioned, but network access to the POPO API endpoint is necessary.
Troubleshooting
Common Issues:
- Missing or Invalid Credentials: If the API credentials are not set up correctly in n8n, requests will fail with authentication errors.
- Malformed Body Property: If the
Bodyproperty is not valid JSON or does not match the expected template format, the API may return an error. - Network Errors: Connectivity issues between n8n and the POPO API can cause failures.
Common Error Messages:
"Invalid credential"or similar: Check your API key and credential configuration in n8n."Invalid body format": Ensure theBodyfield contains valid JSON matching the template requirements."User not found"or"touser invalid": Verify the recipient's identifier in your message body.
How to Resolve:
- Double-check all required fields, especially the
Body. - Validate your JSON before submitting.
- Ensure your credentials are correct and have sufficient permissions.
Links and References
- n8n Documentation: Custom Nodes
- POPO OpenPlatform OA API documentation (if available; check with your service provider)