what is the difference between notification block ...
# marvin-in-the-wild
a
what is the difference between notification block and notifications?
n
hi @Avi Notification blocks are a specific type of block (e.g. the TwilioSMS block) that the Prefect Server can run if you've set up an automation or you can
.load
like any other block to call its
.notify
method does that answer your question? I'm not sure what you mean by "notifications" otherwise
a
There is a
Notifications
menu under the prefect server UI: Could not find the API to setup those Notifications
I configured it on my server, however did not get notified on Slack channel. When I use the notification block with the same configuration, I get a message. I would like prefect server to notify me on any failure of my flow.
n
ahh you're on server, okay I just tested a slack webhook as a
Notification
on 2.13.4 and its working for me - are you sure that the code you're expecting might fail is running against your server? or is it running against the ephemeral api? (i.e. what does prefect version show when you don't see the notification appear)
a
The flow is running and is failing as can be seen on the UI:
n
is there a chance your notification is filtering it out because of any filtered tags on the notification?
i notice the
dev
tag
alternatively, if that isn't working for some reason, you could put the
SlackWebhook.load(...).notify()
in an
on_failure
hook like this
a
10x, just upgraded the chart to 2.13.4 and it works fine. However the link on the message is a not my server URL (
Flow run URL: <http://ephemeral-prefect/api/flow-runs/flow-run/92000c4f-08dd-4118-b23c-1c18016827c6>
) where should I configure the server name to be sent on the alert?
n
where are you seeing that message? this usually has to do with not setting
PREFECT_API_URL
somewhere