Hi! Is there any way to test an automation with sl...
# ask-community
j
Hi! Is there any way to test an automation with slack? I configured an automation so every flow that changes its state to failed send a notification to slack, but it’s not working. Should I use https:// or just the following part of the webhook? Thank you in advance!
z
are you using the built in slack notifier? did you write your own? are you getting an error or is it just doing nothing?
k
Mine looks like this
<https://hooks.slack.com/services/T015THK0A/B02J8RK/a5oLpWXPF58eksgg>
saved as
SLACK_WEBHOOK_URL
j
Thank you for your responses! I am not using any task directly. I was about to configure a cloud hook, but then I read that Automations are the evolution so I tried them. The automation is like:
When any run from any flow changes to failed then slack_webhook
where my secret is slack_webhook (its similar to yours @Kevin Kho). I discovered than in the notifications dashboard something is going wrong:
Copy code
The SlackNotificationAction (741a20f1-e682-4c4d-86bf-79cef1aff839) has failed with 'AttributeError: 'dict' object has no attribute '_uri_reference'' during execution triggered by FlowRunStateChangedEvent event from hook d2b303de-9d57-4716-a46c-6b4c5bd480b0
k
Ok will ask the team about this.
j
Thank you!
z
Hey @jcozar -- it looks like you've set the secret to a dict (JSON blob) instead of a string (which is what we require)
j
You are right! I don’t know why it detected automatically the json format instead of string (maybe I missclick dict instead of string). Thank you!