Skip to content

Blocks Catalog

Below is a list of Blocks available for registration in prefect-slack.

To register blocks in this module to view and edit them on Prefect Cloud, first install the required packages, then

prefect block register -m prefect_slack
Note, to use the load method on Blocks, you must already have a block document saved through code or saved through the UI.

Credentials Module

SlackCredentials

Block holding Slack credentials for use in tasks and flows.

To load the SlackCredentials:

from prefect import flow
from prefect_slack.credentials import SlackCredentials

@flow
def my_flow():
    my_block = SlackCredentials.load("MY_BLOCK_NAME")

my_flow()
SlackWebhook

Block holding a Slack webhook for use in tasks and flows.

To load the SlackWebhook:

from prefect import flow
from prefect_slack.credentials import SlackWebhook

@flow
def my_flow():
    my_block = SlackWebhook.load("MY_BLOCK_NAME")

my_flow()
For additional examples, check out the Credentials Module under Examples Catalog.