1. Blocks
  2. Callbacks

Adding a callback to your block

  1. Create a block as normal.
  2. In the top right of the block, click the triple dot icon which should open up a menu with more options. Click “Add callback”.
  3. You should now see another code editor under the main editor for your block. Block callback
  4. You can add an on_success callback and/or a on_failure callback. These callbacks will run after your block run completes or fails. When you run your block in the pipeline edit page, it will also run the callback depending on the status of the block.
  5. The callback function will be passed your pipeline’s runtime variables as keyword arguments, so you can use the same kwargs.get('<variable>') syntax in your callback.