Overview
The "发送消息" (Send Message) operation of the "消息" (Message) resource in this custom n8n node allows users to send custom messages through the POPO OpenPlatform OA API. This node is useful for automating message delivery workflows, such as sending notifications, alerts, or updates to users via the POPO platform.
Common scenarios:
- Sending text or template-based messages to users.
- Automating customer support responses.
- Broadcasting announcements to groups or individuals.
Practical example:
You can use this node to automatically notify a user when a new ticket is created in your helpdesk system by configuring the message body accordingly.
Properties
| Name | Type | Meaning |
|---|---|---|
| 文件ID | String | The file ID to download. (Not required for sending a message; relevant for downloads) |
| 文件消息ID | String | The message ID to recall. (Not required for sending a message; relevant for recalls) |
| Body | JSON | The body of the request to send. Should contain the message payload (recipient, type, content, etc.). Example: json<br>{<br> "touser": "OPENID",<br> "msgtype": "text",<br> "text": {<br> "content": "Hello World"<br> }<br>} |
Note: For the "发送消息" operation, only the Body property is required and relevant.
Output
The output will be an array of JSON objects representing the response from the POPO OpenPlatform OA API after attempting to send the message. The exact structure depends on the API's response, but typically includes status codes, message IDs, and any error information if applicable.
Example output:
[
{
"errcode": 0,
"errmsg": "ok",
"msgid": "123456789"
}
]
If the API returns binary data (not typical for sending messages), it will be summarized as a binary field in the output.
Dependencies
- External Service: Requires access to the POPO OpenPlatform OA API.
- API Credentials: You must configure the
popoOpenPlatformOAApicredentials in n8n. - Environment: No special environment variables are required beyond standard n8n credential setup.
Troubleshooting
Common issues:
- Missing or invalid credentials: Ensure that the
popoOpenPlatformOAApicredentials are correctly set up in n8n. - Malformed Body property: The Body must be valid JSON matching the expected format of the POPO API. Invalid JSON or missing required fields may result in errors.
- API errors: If the API returns an error code (e.g., non-zero
errcode), check theerrmsgfield in the output for details.
Common error messages:
"Invalid credentials": Check your API key and secret."400 Bad Request"or similar: Review the Body property for correct structure and required fields."User not found": Ensure thetouservalue in the Body is correct.