Loading image from URL in the Automation

In my automation I need to load an image from HTTP GET request.

This image is then attached to SMTP message and referred in HTML body of email.

Here is how it looks in automation:


     data:
        images:
          - >-
            http://hpdebian:5000/api/events/{{ id }}/snapshot.jpg
          html: >
              blah... 
              <img style="width: 100%; "alt="snapshot1" src="cid:snapshot.jpg" />

The image above is Frigate’s generated snapshot and it cannot be referred to using file on the file system (it’s must be loaded from API using get).

Therefore my question is: how do I load or otherwise make automation ingest and attach this to an SMTP message?

Using above URL directly in HTML body of email won’t work, as URL won’t be available when message is read

thanks