Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Send webhook on feed update #502

Open
wilt00 opened this issue Mar 4, 2023 · 1 comment
Open

Feature Request: Send webhook on feed update #502

wilt00 opened this issue Mar 4, 2023 · 1 comment
Labels
C-feature-request Category: A feature request

Comments

@wilt00
Copy link

wilt00 commented Mar 4, 2023

I'd like to be able to trigger an HTTP request when a feed completes updating if there are new episodes available. Some use cases for this:

  • Overcast has an API to trigger a feed refresh (This is the one I want)
  • Podping is a similar (public-only) update mechanism, although I'm not sure what apps if any use it yet
  • Sending notifications about new episodes through a messaging app like Discord or Slack

I'm happy to work on this myself, if you'd accept a PR for it. I'm not sure what an appropriate config setting for this would look like, though. I have a couple of ideas:

  1. A new webhook option:
[feeds]
  [feeds.ID1]
    ...
    webhook = { method = "POST", url = "https://mywebsite.biz/ping", body = "{\"url\": \"$FEED_URL\"}" }
  1. A more generic on_update option that runs a command or script when the update finishes:
[feeds]
  [feeds.ID1]
    ...
    on_update = "curl -X POST --data \"{\\\"url\\\": \\\"$FEED_URL\\\"}\" https://mywebsite.biz/ping"

This would allow more complex integrations, for example, as suggested in another recent issue, uploading new episodes to Archive.org using their API. Realistically, though, it would probably require users to build their own docker container to do anything nontrivial (I don't think curl is included in the alpine docker image, for one).

For both of these I'm envisioning some kind of template variable system where feed properties are exposed and can be inserted into the strings.

@wilt00 wilt00 changed the title Feature Request: Run command on feed update Feature Request: Send webhook on feed update Mar 4, 2023
@mxpv mxpv added the C-feature-request Category: A feature request label Mar 8, 2023
@ejj
Copy link

ejj commented Apr 14, 2024

Do the maintainers have interest in accepting a PR for this? If so I would seriously consider implementing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: A feature request
Projects
None yet
Development

No branches or pull requests

3 participants