Does anyone know if the prefect slack integrations...
# ask-community
j
Does anyone know if the prefect slack integrations can be used with gov-slack?
n
hi janet! i'm not familiar with gov-slack directly if you find there's some network-level config (or similar) we need to allow passthrough of, we're happy to make that change! not sure i've seen anyone ask about it though
j
Thanks, I'll let you know! Our IT admins slack and I pointed them to the docs page with the slack setup required, and they expressed some skepticism that I could do this on gov-slack but they weren't sure.
salute canada intensifies 1
@Nate It turns out that I will need some help with this. I got a webhook, and I'm getting an "Unparseable URL" error from apprise. It appears that apprise only supports slack.com and not slack-gov.com for a webhook.
I can call my slack-gov url with curl just fine.
n
interesting! can u pls open an issue about this?
j
With prefect or apprise?
n
probably an apprise thing we can • pr upstream • monkey patch in the meantime so please start with a prefect issue and i can open upstream if needed
j
OK thank you
Issue #19564
n
thanks!
will be offline until later but if you have a chance to install from this branch to test it out, please let me know https://github.com/PrefectHQ/prefect/pull/19565
j
No joy
Copy code
15:02:37.271 | INFO    | apprise - Notifying 1 service(s) asynchronously.
15:02:37.458 | WARNING | apprise - Failed to send to Slack: Page not found., error=404.
So, debugged with:
Copy code
In [19]: @flow
    ...: def my_function():
    ...:     from prefect.blocks.notifications import SlackWebhook
    ...:     from apprise.logger import LogCapture
    ...:
    ...:     with LogCapture(level=logging.DEBUG - 1) as caplog:
    ...:         slack_webhook_block = SlackWebhook.load("my-channel-bot")
    ...:         slack_webhook_block.notify("Hello World!")
    ...:         print(caplog.getvalue())
And verified that it still tried to contact slack rather than slack-gov
Copy code
2025-11-26 15:29:05,138 - DEBUG - Loaded Slack URL: <slack://T>...1/B...J/k...d//?image=yes&footer=yes&timestamp=yes&blocks=no&format=markdown&overflow=upstream
2025-11-26 15:29:05,140 - INFO - Notifying 1 service(s) asynchronously.
2025-11-26 15:29:05,141 - DEBUG - Slack POST URL: <https://hooks.slack.com/services/><REDACTED> (cert_verify=True)
n
can you show what
prefect version
shows in the environment where the server process runs? or where you tested it?
ill give this another look
j
The prefect server? It's in Prefect cloud. The above is the flow running locally. I know that I got the branch because I got past the URL validation step and failed somewhere new. But, I'm mostly off for Thanksgiving and can do additional tests Monday.
n
my bad i don't always remember what people run against. also out today, your client version is what i meant then
j
Hey @Nate I'm back from the holiday -- prefect --version returns
3.6.5.dev4+3.g3d0511983
installed as
prefect @ git+<https://github.com/prefecthq/prefect.git@devin/1764194888-slack-gov-webhook-support>
n
ok! will take a closer look in a bit
j
Here's the full trace --
Copy code
2025-12-01 09:55:01,399 - TRACE - Slack URL <slack://REDACTED//?image=yes&footer=yes&timestamp=yes&blocks=no&format=markdown&overflow=upstream> unpacked as:
user="None"
password="None"
port="None"
host=REDACTED (but token_a)
fullpath=REDACTED (token_b/token_c)
path=REDACTED (token_b/token_c)
query="None"
schema="slack"
url="<slack://REDACTED>" 
qsd="{'image': 'yes', 'footer': 'yes', 'timestamp': 'yes', 'blocks': 'no', 'format': 'markdown', 'overflow': 'upstream'}"
qsd+="{}"
qsd-="{}"
qsd:="{}"
secure="False"
verify="True"
format="markdown"
overflow="upstream"
token_a=REDACTED (but tokens look fine)
token_b=REDACTED
token_c=REDACTED
targets="[]"
include_image="True"
include_timestamp="True"
use_blocks="False"
include_footer="True"
2025-12-01 09:55:01,400 - DEBUG - Loaded Slack URL: <slack://T>...1/B...J/k...d//?image=yes&footer=yes&timestamp=yes&blocks=no&format=markdown&overflow=upstream
2025-12-01 09:55:01,403 - INFO - Notifying 1 service(s) asynchronously.
2025-12-01 09:55:01,404 - DEBUG - Slack POST URL: <https://hooks.slack.com/services/REDACTED> (cert_verify=True)  **WRONG HOST IN URL**
2025-12-01 09:55:01,405 - DEBUG - Slack Payload: {'username': 'Prefect Notifications', 'mrkdwn': True, 'attachments': [{'title': '', 'text': 'Hello world!', 'color': '#3AA3E3', 'footer_icon': '<https://github.com/caronc/apprise/raw/master/apprise/assets/themes/default/apprise-info-72x72.png>', 'footer': 'Prefect Notifications', 'ts': 1764611701.404968}], 'icon_url': '<https://github.com/caronc/apprise/raw/master/apprise/assets/themes/default/apprise-info-72x72.png>'}
2025-12-01 09:55:01,606 - WARNING - Failed to send to Slack: Page not found., error=404.
2025-12-01 09:55:01,607 - DEBUG - Response Details:
b'no_team'
n
thanks! that's helpful if you have the chance to install from that branch and try again today i'd be appreciated! sorry i don't have a gov slack or else i'd test myself
j
The Slack POST URL is still going to slack.com
n
what does this show?
Copy code
python -c "import prefect; print(prefect.__version__)"
thanks for your patience here!
j
3.6.5.dev4+3.g3d0511983
n
that looks like you're using the older commit, not sure if you're using uv or pip but if you could force reinstall from the branch i'd expect to see
Copy code
3.6.5.dev6+2.g01bc01e040
j
3.6.5.dev4+5.g01bc01e04
Is 4+5 instead of 6+2 ok?
n
yea that should be fine
j
It worked!
n
catjam
ill get this PR reviewed and merged and it should be included in the new release thursday
thanks for your help in testing!
j
No problem!
Thanks for the fix!
salute canada intensifies 1