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.

  1. Convert your image to base64,  https://www.base64-image.de/
  2. Remove initial metadata from base64, e.g:
    data:image/webp;base64,
  3.  Set attachment data:
    var attachmentBase64 = "<string from step 2>"
  4. Add this to the function node where you format your pushover message:
    msg.attachment = Buffer.from(attachmentBase64, 'utf8');

Comments

Popular posts from this blog

Annke C800 / I91BD still image URL