OctoPrint-IFTTT icon indicating copy to clipboard operation
OctoPrint-IFTTT copied to clipboard

Send image to IFTTT as rich media?

Open greghesp opened this issue 5 years ago • 12 comments

IFTTT supports rich media notifications, so you can provide it a URL of an image.

If it possible to send a snapshot from the camera on the event? I know I could send the URL http://127.0.0.1:8080/?action=snapshot or an externally accessible one, but was wondering if it was possible to send it via the @ parameter and have it upload to file.io?

greghesp avatar Nov 10 '19 17:11 greghesp

Currently there is no way to do that. If you’d like, I can add that over the next couple days.

tjjfvi avatar Nov 10 '19 19:11 tjjfvi

That'd be awesome. Thanks. I did have a look but my python is somewhat lacking. If it was JS I'd have already submitted a PR 😂

greghesp avatar Nov 10 '19 19:11 greghesp

Sorry for the delay, I've been busy the last ~week. I should be able to take a look at this this weekend, though.

tjjfvi avatar Nov 20 '19 22:11 tjjfvi

Sorry, I completely forgot about this.

One thing I realized just now though is that the file.io integration will likely not work with notifications, as file.io only allows the image to be requested once.

So the image would likely need to be uploaded to some other place. Any ideas?

tjjfvi avatar Dec 07 '19 14:12 tjjfvi

What about Imgur? https://api.imgur.com/endpoints/image/

greghesp avatar Dec 07 '19 14:12 greghesp

Well that would be smart.

tjjfvi avatar Dec 07 '19 14:12 tjjfvi

Wait, wouldn't that be public? (as in, possibly show up in a feed somewhere)

tjjfvi avatar Dec 07 '19 14:12 tjjfvi

Possibly, yes. The other option is to do OAuth to the users Imgur account although thats a bit more involved.

You could use Cloudinary which would be free and private: https://cloudinary.com/ Would have to add something in to your code though that removes uploaded images over X days old, but then you're exposing an API key since its public

https://api.imgbb.com/ might work, but not sure if they're publicly accessibly

greghesp avatar Dec 07 '19 14:12 greghesp

Yeah, I’ll probably oauth to imgur.

tjjfvi avatar Dec 08 '19 23:12 tjjfvi

interested it here how this is coming along as been looking for a way to take a snapshot and then have IFTTT send that as a webhook to a discord channel.

TWIISTED-STUDIOS avatar Feb 19 '20 23:02 TWIISTED-STUDIOS

Hello ! I'm interested in that feature too ! Would be perfect to get a logger of my print with a snapshot to a Notion database !

guigro avatar May 18 '22 17:05 guigro

Unfortunately, I don't currently have the time to be able to look at this issue, but PRs are, as always, welcome!

tjjfvi avatar May 22 '22 14:05 tjjfvi