https://prefect.io logo
m

Michal Mucha

01/09/2023, 1:31 PM
Quick question on the Orion Slack block
.notify(body="message")
I want to tag
@ here
in certain circumstances, not getting the intended result thus far - it prints out plain text without raising notifications. tried various syntax options:
<! here> <! here|here> <@here>
and all the combinations I've seen in Slack docs. I can see Apprise is used under the hood. Does anyone know the correct syntax? Is the syntax deactivated because Apprise formats it as an attachment block? Is the syntax correct but something wrong with my webhook config? Thanks
b

Bianca Hoch

01/09/2023, 6:07 PM
Hi Michal, to my understanding it should be
<! here>
(without the space).
I can see if I'm able to test it out on my end.
m

Michal Mucha

01/09/2023, 8:39 PM
Thanks Bianca! Yes please, if you could try would be awesome. I tried all the combinations and it just comes out as plain text. Quite a head scratcher
If it works for you, that will set me on a different path
m

Michal Mucha

01/10/2023, 11:40 AM
Just checking if you had a chance. Didn't realize how popular this channel was!
m

Michal Mucha

01/10/2023, 2:46 PM
Okay the syntax was correct but the server object in the apprise client has to have ‘use_blocks’ set to true
Thanks @Bianca Hoch
b

Bianca Hoch

01/10/2023, 3:45 PM
Hi Michal! Apologies for getting back to you late on this. I must admit you got further than I did.
For education purposes, would you mind dropping some pseudo code for how you configured the apprise client? I'm sure other people will appreciate it if they get stuck on the same issue.
m

Michal Mucha

01/10/2023, 7:31 PM
Sure I’m on iPhone rn but basically wh = SlackWebhook() s: list = wh._apprise_client.servers Only one element in that list s[0].use_blocks = True
Then mentions render properly. Might be worth exposing in your SlackWebook block in some future release
3 Views