Troubleshooting Implementation

Using print statements

You can troubleshoot your implementations with print() statements!

Anything you print() in your SDK implementation will be sent in Slack to the user who initiated the flow, making it much easier to troubleshoot your code as it runs in our environment.

Example

These print statements:

@reducer
def get_approvers(evt):
  """
  Post to shared channel to ask for access approval
  """
  fvars = evt.flow.vars
  
  # Who's the requester?
  print(f"Requester: {evt.user}")
  
  # What's my tfvars config?
  print(f"fvars: {fvars}")
  
  return slack.channel(fvars["request_channel"], allow_self=True)

Will result in this output being sent to the Implementer:

10401040

Did this page help you?