Can't get slack message to send with image attached

Hi,
I’m trying to create an automation for when my reolink doorbell is pressed, I get a slack message with a preview of the front door. I’ve got the following;

  - service: notify.unraid
    data:
      message: Someone is at the front door
      title: Someone is at the front door
      target: "#doorbell"
      data:
        file:
          path: /config/temp/snapshot.jpg

Running this, I get nothing in slack. As soon as I take out the last 3 lines to do with the file path, I get the message through fine but obviously without the image.
I have an action before this to create a camera snapshot into that location and I’ve confirmed the file has been created, and that the image opens fine.
What am I doing wrong?

Managed to sort it after reading the logs. The bot needed the ‘files:write’ role in slack.