Unable to use metabot on slack, no response from bot

I’ve integrated metabot with slack and pulses work great. I’ve named the metabot as metabase and added it to a private channel but when I do @metabase help; there is no response from the bot.

Am I missing anything here?

1 Like

I’m on 0.35.2 and have the same problem.

Metabot posts pulses well, but doesn’t reply to any "metabot " commands. Not in private message, not in any public channel.

App console log doesn’t seem to display anything related to Slack integration.

Where would I start debugging this?

So you’re not seeing any errors anywhere (not even in Slack, when you use the metabot command)?
Could it be that your Metabase instance has a firewall (or a WAF like Cloudflare) that is blocking traffic from Slack?
You should see requests in Admin > Troubleshooting > Logs.
It is possible to enable more logging by using DEBUG or TRACE instead of the default values:

1 Like

Indeed, Cloudflare is in play. Thanks for the tips, I’ll post updates when I have new info.

Hi @lkraav - I’m having the same issue in 0.35.3. The pulses seem to send fine, but when I try to interact with the bot in Slack, it doesn’t seem to respond to any commands. Would you be able to share some info on how you resolved? Thanks!

@mbadua Latest release is 0.35.4
So you’re not using Cloudflare or similar services that provide a web-firewall?
Are you using a load-balancer in front of Metabase?
You need to check the server, where Metabase is hosted, to see if there’s any network connections coming from Slack - otherwise the problem is somewhere else.

@flamber I’m working with @mbadua on getting this to work.
We are using the docker container on a aws lightsail instance. I opened the server to all ports and I still don’t see any traffic coming from Slack to our instance. There are no items in the logs.
The pulses are arriving in slack just fine.
We just can’t get metabot to respond when we type metabot list.

Pulses are sent from Metabase to Slack. Metabot are received from Slack to Metabase.

So if you’re not seeing any network traffic on your container from Slack, when trying to use Metabot, then something is blocking - contact AWS support.

Or maybe the Metabot isn’t setup correctly?

Related: https://github.com/metabase/metabase/issues/5380

Hello @flamber,

This was all super helpful. Do you know what port Metabot uses to communicate back to Metabase from Slack?

1 Like

@deadbigreddog Metabase connects to Slack and negotiates a port. You should use netstat/wireshark to check connections and transfer.
But if you’re using a load-balancer (or a security WAF like Cloudflare), then that might be blocking or causing the connection to be dropped.

@flamber I have successfully piped my remote tcpdump to my local copy of wireshark. The problem I face is that I have no idea which source packet is the one representing Metabot. Is there a particular Source IP address that identifies Metabot?

Are you saying with 100% (completely fully) certainty that there’s no firewalls, load-balancers, proxies or anything that could be blocking?

If you start recording, then go to Slack and try to use Metabot, wait for error, and stop recording, then there should be less than 1 minutes worth of traffic, which should be fairly easy to filter through the IPs.

I don’t think Slack has a list of their IPs publicly.

Hello @flamber I decided to try a different approach to Metabot.
I am running the most recent jar file from the site on a AWS server and when I try to enable Metabot in the admin section I am getting the following error:
Slack API error: method_deprecated

On my console, I see the following error:
06-12 14:21:37 WARN integrations.slack :: {:message “Slack API error: method_deprecated”,
{:ok false,
:error “method_deprecated”,
["[ERROR] This method is retired and can no longer be used. Please use conversations.list or users.conversations instead. Learn more: https://api.slack.com/changelog/2020-01-deprecating-antecedents-to-the-conversations-api."]}}}

06-12 14:21:37 DEBUG middleware.log :: PUT /api/slack/settings 400 568.9 ms (0 DB calls)
{:message “Slack API error: method_deprecated”,
{:ok false,
:error “method_deprecated”,
["[ERROR] This method is retired and can no longer be used. Please use conversations.list or users.conversations instead. Learn more: https://api.slack.com/changelog/2020-01-deprecating-antecedents-to-the-conversations-api."]}}}

@deadbigreddog Things have changed now, so since June 10th 2020, you cannot setup a new Slack - the old ones will continue to work. We’re working on that.

Are you saying that Slack integration does not work anymore?? New slack bots cannot be created?

@ChristineChetty Please open a new topic unless your comment is related to this topic. To create new Slack integrations, you will need at least 0.36.0, since it uses the new API endpoints.

I’ve run into the same problem with setting up MetaBot. I’m able to set up a pulse that works, but when I try to run any @metabot commands, there is no response.

We’re not hosting our own server (we’re on the out-of-the-box, fully hosted version offered by Metabase) so I don’t think that a firewall is the issue here. I’ve also taken a look at the logs to see if there’s anything coming through there. There are some events being triggered, but there is no mention of Slack anywhere in the log messages and there’s no error logged either - I’m not sure if that’s expected :thinking:(example of logs in image attached).

Any help would be hugely appreciated here :pray::black_heart:

@kattkatie If you go and create a pulse, fill it out, and click the “Send to Slack now” - does it then send the Slack?
The difference between initiating a pulse and doing it via MetaBot command is who is sending the request.
It sounds like you might be seeing this issue:
https://github.com/metabase/metabase/issues/5380 - upvote by clicking :+1: on the first post