Overview
This node integrates with the BUDHOSP Moph Alert API to send alert messages linked to a Thai national ID number (CID). It is designed to notify individuals by sending custom alert messages associated with their 13-digit citizen ID. This can be useful in healthcare, government notifications, or emergency alert systems where personalized communication is required.
For example, a hospital system could use this node to send appointment reminders or urgent health alerts directly to patients identified by their CID.
Properties
| Name | Meaning |
|---|---|
| หมายเลขบัตรประชาชน (CID) | The 13-digit Thai national ID number of the recipient. Must be exactly 13 digits long. |
| ข้อความแจ้งเตือน | The alert message text to be sent to the recipient. |
Output
The node outputs an array of JSON objects, each representing the result of sending an alert for one input item. Each output object contains:
success: Boolean indicating if the alert was sent successfully.response: The full response from the BUDHOSP Moph Alert API when successful.error: Error message string if sending failed.timestamp: ISO timestamp of when the operation was performed.
No binary data is produced by this node.
Dependencies
- Requires credentials containing:
- Base URL of the BUDHOSP Moph Alert API.
- Bearer token for authorization.
- Optional CSRF token.
- The node uses HTTP POST requests to the
/api/v1/moph/alertendpoint. - Proper configuration of these credentials in n8n is necessary for the node to function.
Troubleshooting
- Invalid CID: The node validates that the CID is exactly 13 numeric characters. If invalid, it throws an error stating the CID must be 13 digits.
- Empty Message: If the alert message is empty or only whitespace, an error is thrown indicating the message cannot be empty.
- API Errors: Any errors returned by the API will be included in the output under the
errorfield if "Continue On Fail" is enabled; otherwise, the node execution stops with the error. - Credential Issues: Missing or incorrect API credentials will cause authentication failures.
To resolve issues:
- Ensure the CID is correctly formatted as a 13-digit number.
- Provide a non-empty alert message.
- Verify API credentials and tokens are valid and have proper permissions.
- Enable "Continue On Fail" to handle partial failures gracefully.
Links and References
- BUDHOSP Moph Alert API Documentation (Note: Replace with actual URL if available)