arameters

from zenml import step, pipeline

@stepdef my_custom_block_step(block_message) -> List[Dict]:

my_custom_block = [

"type": "header",

"text": {

"type": "plain_text",

"text": f":tada: {block_message}",

"emoji": true

return SlackAlerterParameters(blocks = my_custom_block)

@pipeline

def my_pipeline(...):

...

message_blocks = my_custom_block_step("my custom block!")

post_message = slack_alerter_post_step(params = message_blocks)

return post_message

if __name__ == "__main__":

my_pipeline()

For more information and a full list of configurable attributes of the Slack alerter, check out the SDK Docs .

PreviousDiscord Alerter

NextDevelop a Custom Alerter

Last updated 15 days ago