Hi there
Thanks for making this project open source!
I'm setting it up for the first time and encountered an error sending alerts to Slack. However, email alerts still work.
A little research revealed that the Slack method
conversations_list from slack.py
response = client.conversations_list(types="public_channel,private_channel")
channels = response["channels"]
doesn't return all available channels from my workspace, but rather a limited list. My workspace has over 100 channels, so I was getting an error.
Channel not found
Explicitly adding a limit helped:
channels = []
cursor = None
while True:
response = client.conversations_list(
types="public_channel,private_channel",
limit=1000,
cursor=cursor
)
channels.extend(response["channels"])
cursor = response.get("response_metadata", {}).get("next_cursor")
if not cursor:
break
Hi there
Thanks for making this project open source!
I'm setting it up for the first time and encountered an error sending alerts to Slack. However, email alerts still work.
A little research revealed that the Slack method
conversations_listfromslack.pydoesn't return all available channels from my workspace, but rather a limited list. My workspace has over 100 channels, so I was getting an error.
Channel not foundExplicitly adding a limit helped: