Running variables on the Notification Web hook URL based on output? #612
-
Hello, For perspective: My idea for Cronicle is to stop depending on "VisualCron". Scenario:
Diferences:
Question: Is there way to do this on Cronicle natively (that I'm missing) or with a plugin? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Well, there's nothing in place to do this currently, but I'm happy to add a new feature if it makes sense. How are these "variables" defined? Specifically, I am referring to this bit:
Forgive me, but I've never even heard of VisualCron before. How does this mechanism work, exactly? How do the variables get populated from the output of running the HTTP task? Are you talking about the HTTP response body here? If so, what if the HTTP response is plain text, or XML, or JSON, or some other format? How do you grab variables out of it? |
Beta Was this translation helpful? Give feedback.
-
I ended up approaching this differently. Instead of trying to filter the content the webhook sent via variables (limiting what content the webhook sent, instead of absolutely everything as it does by default), I filtered displayed content on the third party backend by identifying each part (such as job id, event and raw output) and displaying just that. So I guess the end result is the same. However, for reference in case it's something you'd like to add regardless: Here's the visualcron website if you're curious. The visualcron webhook works with POST so, you would specify the URL and then you can add multiple Parameters/Body, for example: Key: JobId || Value: {JOB(Active||d)} This would take certain parts of job result and then send them (as opposed to the whole info) through the webhook. I'ts kind of hard to explain without screenshots, I hope I'm not being too obtuse. Thanks for the quick reply (and for the great job you've done with Cronicle). |
Beta Was this translation helpful? Give feedback.
I see, thank you for the explanation. I'll try to make my web hook implementation more customizable in v2.