Send a message via pushbullet with an image

I’m trying to get home assistant (docker) to send a message to my Android phone with pushbullet.
The message works correctly but I also want to include an image and that is the part that doesn’t work.

The image is correctly saved in the config directory with this action

service: camera.snapshot
metadata: {}
data:
filename: /config/snapshot.jpg
target:
entity_id: camera.doorbell_fluent

and this action sends a message but without the image attached.

service: notify.pushbullet
metadata: {}
data:
message: Ding dong
title: Doorbell
data:
image: /config/snapshot.jpg

I would be grateful if someone could point me in the right direction to solve this problem.

Thanks.

try changing image: to file:

im presuming you have all the indents right… but I can’t tell because the code in your post isn’t formatted. for better help, please format the code using the </> button

1 Like

I get this error changing image to file

Error running action

Unknown error

service: notify.pushbullet
metadata: {}
data:
  message: Ding dong
  title: Doorbell
  data:
    file: /config/snapshot.jpg

Is the file path added to your allowlist? are you sure that’s the right full path?

Further investigation reveals that sending an image via pushbullet is a 2 stage process. Uploading, then sending.
All the advice online is several years out of date so I assume that pushbullet is not used much these days.
Home assistant docs give very clear information on how to send an image in Telegram, and it works reliably.
I have now got a working solution and given up on pushbullet, but thanks very much for you advice.

Can you post the final config that worked?

Actually, I figured it out with pushbullet. What held me up appeared to be folder access. I put the screenshot in the www folder and it worked after that.

Do you mind posting your automation yaml that sends the image via pushbullet?

alias: P1S Comeplte
description: ""
triggers:
  - entity_id:
      - sensor.p1s_print_status
    from: running
    to: finish
    trigger: state
conditions: []
actions:
  - type: turn_on
    device_id: someStuff
    entity_id: someStuff
    domain: light
  - delay:
      hours: 0
      minutes: 0
      seconds: 5
      milliseconds: 0
  - action: camera.snapshot
    metadata: {}
    data:
      filename: /config/www/p1s.jpg
    target:
      entity_id: camera.p1s_camera
    enabled: true
  - action: notify.pushbullet
    metadata: {}
    data:
      target: channel/P1S
      title: P1S
      message: >-
        P1S has completed
        {{states("sensor.p1s_gcode_filename")}} in
        {{states("sensor.p1s_total_print_time")}}
      data:
        file: /config/www/p1s.jpg
    enabled: true
  - type: turn_off
    device_id: someStuff
    entity_id: someStuff
    domain: light
    enabled: true
mode: single