Send inline image attchment in Node-RED pushover message
The documentation for the node red pushover node for using attachments was not very detailed, only "Buffer containing image".
Follow these simple steps in a "function" node to add an image attachment as buffered data.
- Convert your image to base64, https://www.base64-image.de/
- Remove initial metadata from base64, e.g:
data:image/webp;base64,
- Set attachment data:
var attachmentBase64 = "<string from step 2>"
-
Add this to the function node where you format your pushover message:
msg.attachment = Buffer.from(attachmentBase64, 'utf8');
Comments
Post a Comment