Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Feature Request: File Content as Part of IFTTT Webhook Call? #4
What I'd love to do with OctoPrint-IFTTT is to use the Timelapse event, MovieDone, to kick off some automation and use the file itself. For example; share it on Social Media, or upload it to Google Drive.
For starters, I'm not even certain if what I want to do is possible. The path and filenames sent by the Octoprint Event definitely seem to be strings and my experimentation using curl to try different calls to the webhook hasn't been successful.
Here's a couple examples:
It'd seem as if what would need to happen is that the file itself would need to be encoded and passed to IFTTT in the call to the IFTTT Webhook. In both cases, it seems that IFTTT got the filename, but uploaded some sort of File Not Found image in its place. Which makes sense, considering what I passed to it.
I was hoping that I could figure this out on my own and present an example of my own webhook call that was resulting in some sort of IFTTT action on that file (an upload to Google Drive, sharing to Twitter, anything). I'm going to keep working on that and will post an update when/if I'm successful.
It looks like what got logged by IFTTT matches what I passed it. But the file uploaded (a small PNG of my face) to Google drive was the same IFTTT "File not Found" error image. It doesn't seem like the data uri is supported by IFTTT's webhook. Or I'm not doing something correctly which is probably pretty likely.
I tinkered around with the Google Drive and Dropbox actions and the only time I had success getting any kind of file uploaded to Google Drive was when I sent IFTTT a URL to an image from my blog.
I'm not sure how useful that success is though, I guess maybe it might be possible to expose my Octoprint server to the Internet and find a way to build and pass the time lapse's URL to IFTTT
I'm going to keep working on it. I thought I'd share my progress in case it created a spark for someone else who might have more knowledge than I do.
Oh man! For both of our sakes, I hope that my tinkering this morning has been misguided. I'm still plugging away trying to figure out exactly what the IFTTT Actions will allow when they are asking for a File URL.
Sorry if I sent you down a wild-goose chase, I'll share anything that I find out and I'd be happy to look into anything you think would be helpful!
That's pretty excellent, @tjjfvi ! I'm pretty wary about exposing OctoPrint to the Internet. I guess I'll need to weight the benefit and see if it's worth the cost. I'm wondering if maybe there's a different solution out there. Or maybe something I can do to tighten down inbound traffic to Octoprint!