Slack Alert it's not working

I set an alert to be sent to a public slack channel when it has results and it's not working

Hi @Mori
Post "Diagnostic Info" from Admin > Troubleshooting.
Check your logs around the time, when you expected to see an alert - Admin > Troubleshooting > Logs.

{
"browser-info": {
"language": "en",
"platform": "MacIntel",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36",
"vendor": "Google Inc."
},
"system-info": {
"file.encoding": "UTF-8",
"java.runtime.name": "OpenJDK Runtime Environment",
"java.runtime.version": "11.0.15+10",
"java.vendor": "Eclipse Adoptium",
"java.vendor.url": "https://adoptium.net/",
"java.version": "11.0.15",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "11.0.15+10",
"os.name": "Linux",
"os.version": "4.9.0-11-amd64",
"user.language": "en",
"user.timezone": "UTC"
},
"metabase-info": {
"databases": [
"postgres",
"redshift",
"h2"
],
"hosting-env": "unknown",
"application-database": "postgres",
"application-database-details": {
"database": {
"name": "PostgreSQL",
"version": "10.18"
},
"jdbc-driver": {
"name": "PostgreSQL JDBC Driver",
"version": "42.3.2"
}
},
"run-mode": "prod",
"version": {
"date": "2022-05-02",
"tag": "v0.43.0",
"branch": "release-x.43.x",
"hash": "ee686fc"
},
"settings": {
"report-timezone": "America/Buenos_Aires"
}
}
}

Logs:
[9616fefd-63d8-467c-9e25-2a7b7752ea64] 2022-05-11T18:00:18-03:00 INFO metabase.sync.analyze fingerprint-fields Analyzed [···································] 30% Table 3,237 'public.monthly_payment_relationships'
[9616fefd-63d8-467c-9e25-2a7b7752ea64] 2022-05-11T18:00:18-03:00 INFO metabase.sync.util FINISHED: step 'fingerprint-fields' for postgres Database 10 'Card API PRODU (!)' (6.5 s)
[9616fefd-63d8-467c-9e25-2a7b7752ea64] 2022-05-11T18:00:18-03:00 INFO metabase.sync.util STARTING: step 'classify-fields' for postgres Database 10 'Card API PRODU (!)'
[9616fefd-63d8-467c-9e25-2a7b7752ea64] 2022-05-11T18:00:18-03:00 INFO metabase.sync.analyze classify-fields Analyzed [
······························] 40% Table 2,294 'dominicana.bank_office_aliases'
[9616fefd-63d8-467c-9e25-2a7b7752ea64] 2022-05-11T18:00:18-03:00 INFO metabase.sync.analyze classify-fields Analyzed [·························] 50% Table 2,332 'pglogical.tables'
[9616fefd-63d8-467c-9e25-2a7b7752ea64] 2022-05-11T18:00:18-03:00 INFO metabase.sync.analyze classify-fields Analyzed [
····················] 60% Table 2,723 'uruguay.authorization_letters'
[9616fefd-63d8-467c-9e25-2a7b7752ea64] 2022-05-11T18:00:18-03:00 INFO metabase.sync.util FINISHED: step 'classify-fields' for postgres Database 10 'Card API PRODU (!)' (412.1 ms)
[9616fefd-63d8-467c-9e25-2a7b7752ea64] 2022-05-11T18:00:18-03:00 INFO metabase.sync.util STARTING: step 'classify-tables' for postgres Database 10 'Card API PRODU (!)'
[9616fefd-63d8-467c-9e25-2a7b7752ea64] 2022-05-11T18:00:18-03:00 INFO metabase.sync.analyze classify-tables Analyzed [******************************···············] 70% Table 2,302 'argentina.movements_legacy'
[9616fefd-63d8-467c-9e25-2a7b7752ea64] 2022-05-11T18:00:18-03:00 INFO metabase.sync.analyze classify-tables Analyzed [··········] 80% Table 2,376 'argentina.credentials'
[9616fefd-63d8-467c-9e25-2a7b7752ea64] 2022-05-11T18:00:19-03:00 INFO metabase.sync.analyze classify-tables Analyzed [
·····] 90% Table 2,244 'dominicana.payments'
[9616fefd-63d8-467c-9e25-2a7b7752ea64] 2022-05-11T18:00:19-03:00 INFO metabase.sync.util FINISHED: step 'classify-tables' for postgres Database 10 'Card API PRODU (!)' (382.9 ms)
[9616fefd-63d8-467c-9e25-2a7b7752ea64] 2022-05-11T18:00:19-03:00 INFO metabase.sync.util FINISHED: Analyze data for postgres Database 10 'Card API PRODU (!)' (7.3 s)
[9616fefd-63d8-467c-9e25-2a7b7752ea64] 2022-05-11T18:00:19-03:00 DEBUG metabase.server.middleware.log POST /api/dataset 202 [ASYNC: completed] 118.5 ms (42 DB calls) App DB connections: 1/15 Jetty threads: 2/50 (5 idle, 0 queued) (142 total active threads) Queries in flight: 0 (0 queued); postgres DB 12 connections: 0/1 (0 threads blocked)

@Mori There's no log that alerts are being executed. Try setting the Alert to hourly, so you can see in the log more details.

[9616fefd-63d8-467c-9e25-2a7b7752ea64] 2022-05-11T18:00:00-03:00 WARN metabase.integrations.slack {:error-code "not_in_channel",
:message "Slack API error: not_in_channel",
:response {:ok false, :error "not_in_channel"}}

[9616fefd-63d8-467c-9e25-2a7b7752ea64] 2022-05-11T18:00:00-03:00 WARN metabase.integrations.slack {:error-code "channel_not_found",
:message "Slack API error: channel_not_found",
:response {:ok false, :error "channel_not_found"}}

[9616fefd-63d8-467c-9e25-2a7b7752ea64] 2022-05-11T18:00:00-03:00 ERROR metabase.pulse Error sending notification!
clojure.lang.ExceptionInfo: Slack API error: channel_not_found {:error-code "channel_not_found", :message "Slack API error: channel_not_found", :response {:ok false, :error "channel_not_found"}, :url "https://slack.com/api/conversations.join", :request {:headers {:authorization "Bearer\nxoxb"}, :as :stream, :conn-timeout 10000, :socket-timeout 10000, :form-params {:channel "metabase-bot"}}}
at metabase.integrations.slack$do_slack_request.invokeStatic(slack.clj:125)
at metabase.integrations.slack$do_slack_request.invoke(slack.clj:106)
at metabase.integrations.slack$POST.invokeStatic(slack.clj:135)
at metabase.integrations.slack$POST.invoke(slack.clj:132)
at metabase.integrations.slack$fn__63305$join_channel_BANG___63310$fn__63311.invoke(slack.clj:267)
at metabase.integrations.slack$fn__63305$join_channel_BANG___63310.invoke(slack.clj:263)
at metabase.integrations.slack$fn__63330$upload_file_BANG___63335$fn__63336$fn__63337.invoke(slack.clj:282)
at metabase.integrations.slack$fn__63330$upload_file_BANG___63335$fn__63336.invoke(slack.clj:276)
at metabase.integrations.slack$fn__63330$upload_file_BANG___63335.invoke(slack.clj:269)
at metabase.pulse$create_and_upload_slack_attachments_BANG_$fn__76265.invoke(pulse.clj:202)
at clojure.core.protocols$fn__8181.invokeStatic(protocols.clj:168)
at clojure.core.protocols$fn__8181.invoke(protocols.clj:124)
at clojure.core.protocols$fn__8136$G__8131__8145.invoke(protocols.clj:19)
at clojure.core.protocols$seq_reduce.invokeStatic(protocols.clj:31)
at clojure.core.protocols$fn__8166.invokeStatic(protocols.clj:75)
at clojure.core.protocols$fn__8166.invoke(protocols.clj:75)
at clojure.core.protocols$fn__8110$G__8105__8123.invoke(protocols.clj:13)
at clojure.core$reduce.invokeStatic(core.clj:6830)
at clojure.core$reduce.invoke(core.clj:6812)
at metabase.pulse$create_and_upload_slack_attachments_BANG_.invokeStatic(pulse.clj:195)
at metabase.pulse$create_and_upload_slack_attachments_BANG_.invoke(pulse.clj:186)
at metabase.pulse$create_and_upload_slack_attachments_BANG_.invokeStatic(pulse.clj:192)
at metabase.pulse$create_and_upload_slack_attachments_BANG_.invoke(pulse.clj:186)
at metabase.pulse$fn__76378.invokeStatic(pulse.clj:375)
at metabase.pulse$fn__76378.invoke(pulse.clj:373)
at clojure.lang.MultiFn.invoke(MultiFn.java:229)
at metabase.pulse$send_notifications_BANG_$fn__76393.invoke(pulse.clj:391)
at metabase.pulse$send_notifications_BANG_.invokeStatic(pulse.clj:390)
at metabase.pulse$send_notifications_BANG_.invoke(pulse.clj:386)
at metabase.pulse$send_pulse_BANG_.invokeStatic(pulse.clj:415)
at metabase.pulse$send_pulse_BANG_.doInvoke(pulse.clj:395)
at clojure.lang.RestFn.invoke(RestFn.java:439)
at metabase.task.send_pulses$fn__80699$send_pulses_BANG___80708$fn__80711$fn__80729$fn__80730.invoke(send_pulses.clj:55)
at metabase.models.task_history$fn__41374$do_with_task_history__41379$fn__41380.invoke(task_history.clj:88)
at metabase.models.task_history$fn__41374$do_with_task_history__41379.invoke(task_history.clj:83)
at metabase.task.send_pulses$fn__80699$send_pulses_BANG___80708$fn__80711$fn__80729.invoke(send_pulses.clj:52)
at metabase.task.send_pulses$fn__80699$send_pulses_BANG___80708$fn__80711.invoke(send_pulses.clj:51)
at metabase.task.send_pulses$fn__80699$send_pulses_BANG___80708.invoke(send_pulses.clj:38)
at metabase.task.send_pulses$fn__80699$send_pulses_BANG___80708$fn__80709.invoke(send_pulses.clj:45)
at metabase.task.send_pulses$fn__80699$send_pulses_BANG___80708.invoke(send_pulses.clj:38)
at metabase.task.send_pulses.SendPulses$fn__80765.invoke(send_pulses.clj:96)
at metabase.models.task_history$fn__41374$do_with_task_history__41379$fn__41380.invoke(task_history.clj:88)
at metabase.models.task_history$fn__41374$do_with_task_history__41379.invoke(task_history.clj:83)
at metabase.task.send_pulses.SendPulses.execute(send_pulses.clj:82)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: clojure.lang.ExceptionInfo: Slack API error: channel_not_found {:error-code "channel_not_found", :message "Slack API error: channel_not_found", :response {:ok false, :error "channel_not_found"}}
at metabase.integrations.slack$handle_error.invokeStatic(slack.clj:97)
at metabase.integrations.slack$handle_error.invoke(slack.clj:77)
at metabase.integrations.slack$handle_response.invokeStatic(slack.clj:104)
at metabase.integrations.slack$handle_response.invoke(slack.clj:99)
at metabase.integrations.slack$do_slack_request.invokeStatic(slack.clj:123)
... 45 more

@Mori It says channel not found for metabase-bot, so I'm guessing that you have not created that channel, but that is the channel you have configured to send the files to.
Try removing your Slack configuration and do it again:
https://www.metabase.com/docs/latest/administration-guide/09-setting-up-slack.html

I remove Slack and do the configuration again! I set up an alert for 10 am Argentina time I will keep you informed!!

Still not working!!

[9616fefd-63d8-467c-9e25-2a7b7752ea64] 2022-05-12T15:00:00-03:00 WARN metabase.integrations.slack {:error-code "not_in_channel",
:message "Slack API error: not_in_channel",
:response {:ok false, :error "not_in_channel"}}

[9616fefd-63d8-467c-9e25-2a7b7752ea64] 2022-05-12T15:00:00-03:00 WARN metabase.integrations.slack {:error-code "channel_not_found",
:message "Slack API error: channel_not_found",
:response {:ok false, :error "channel_not_found"}}

[9616fefd-63d8-467c-9e25-2a7b7752ea64] 2022-05-12T15:00:00-03:00 ERROR metabase.pulse Error sending notification!
clojure.lang.ExceptionInfo: Slack API error: channel_not_found {:error-code "channel_not_found", :message "Slack API error: channel_not_found", :response {:ok false, :error "channel_not_found"}, :url "https://slack.com/api/conversations.join", :request {:headers {:authorization "Bearer\nxoxb-2970845841-3518458392596-rtkT7hqYt5QnLkvJ2NB1svRW"}, :as :stream, :conn-timeout 10000, :socket-timeout 10000, :form-params {:channel "metabase-bot"}}}
at metabase.integrations.slack$do_slack_request.invokeStatic(slack.clj:125)
at metabase.integrations.slack$do_slack_request.invoke(slack.clj:106)
at metabase.integrations.slack$POST.invokeStatic(slack.clj:135)
at metabase.integrations.slack$POST.invoke(slack.clj:132)
at metabase.integrations.slack$fn__63305$join_channel_BANG___63310$fn__63311.invoke(slack.clj:267)
at metabase.integrations.slack$fn__63305$join_channel_BANG___63310.invoke(slack.clj:263)
at metabase.integrations.slack$fn__63330$upload_file_BANG___63335$fn__63336$fn__63337.invoke(slack.clj:282)
at metabase.integrations.slack$fn__63330$upload_file_BANG___63335$fn__63336.invoke(slack.clj:276)
at metabase.integrations.slack$fn__63330$upload_file_BANG___63335.invoke(slack.clj:269)
at metabase.pulse$create_and_upload_slack_attachments_BANG_$fn__76265.invoke(pulse.clj:202)
at clojure.core.protocols$fn__8181.invokeStatic(protocols.clj:168)
at clojure.core.protocols$fn__8181.invoke(protocols.clj:124)
at clojure.core.protocols$fn__8136$G__8131__8145.invoke(protocols.clj:19)
at clojure.core.protocols$seq_reduce.invokeStatic(protocols.clj:31)
at clojure.core.protocols$fn__8166.invokeStatic(protocols.clj:75)
at clojure.core.protocols$fn__8166.invoke(protocols.clj:75)
at clojure.core.protocols$fn__8110$G__8105__8123.invoke(protocols.clj:13)
at clojure.core$reduce.invokeStatic(core.clj:6830)
at clojure.core$reduce.invoke(core.clj:6812)
at metabase.pulse$create_and_upload_slack_attachments_BANG_.invokeStatic(pulse.clj:195)
at metabase.pulse$create_and_upload_slack_attachments_BANG_.invoke(pulse.clj:186)
at metabase.pulse$create_and_upload_slack_attachments_BANG_.invokeStatic(pulse.clj:192)
at metabase.pulse$create_and_upload_slack_attachments_BANG_.invoke(pulse.clj:186)
at metabase.pulse$fn__76378.invokeStatic(pulse.clj:375)
at metabase.pulse$fn__76378.invoke(pulse.clj:373)
at clojure.lang.MultiFn.invoke(MultiFn.java:229)
at metabase.pulse$send_notifications_BANG_$fn__76393.invoke(pulse.clj:391)
at metabase.pulse$send_notifications_BANG_.invokeStatic(pulse.clj:390)
at metabase.pulse$send_notifications_BANG_.invoke(pulse.clj:386)
at metabase.pulse$send_pulse_BANG_.invokeStatic(pulse.clj:415)
at metabase.pulse$send_pulse_BANG_.doInvoke(pulse.clj:395)
at clojure.lang.RestFn.invoke(RestFn.java:439)
at metabase.task.send_pulses$fn__80699$send_pulses_BANG___80708$fn__80711$fn__80729$fn__80730.invoke(send_pulses.clj:55)
at metabase.models.task_history$fn__41374$do_with_task_history__41379$fn__41380.invoke(task_history.clj:88)
at metabase.models.task_history$fn__41374$do_with_task_history__41379.invoke(task_history.clj:83)
at metabase.task.send_pulses$fn__80699$send_pulses_BANG___80708$fn__80711$fn__80729.invoke(send_pulses.clj:52)
at metabase.task.send_pulses$fn__80699$send_pulses_BANG___80708$fn__80711.invoke(send_pulses.clj:51)
at metabase.task.send_pulses$fn__80699$send_pulses_BANG___80708.invoke(send_pulses.clj:38)
at metabase.task.send_pulses$fn__80699$send_pulses_BANG___80708$fn__80709.invoke(send_pulses.clj:45)
at metabase.task.send_pulses$fn__80699$send_pulses_BANG___80708.invoke(send_pulses.clj:38)
at metabase.task.send_pulses.SendPulses$fn__80765.invoke(send_pulses.clj:96)
at metabase.models.task_history$fn__41374$do_with_task_history__41379$fn__41380.invoke(task_history.clj:88)
at metabase.models.task_history$fn__41374$do_with_task_history__41379.invoke(task_history.clj:83)
at metabase.task.send_pulses.SendPulses.execute(send_pulses.clj:82)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: clojure.lang.ExceptionInfo: Slack API error: channel_not_found {:error-code "channel_not_found", :message "Slack API error: channel_not_found", :response {:ok false, :error "channel_not_found"}}
at metabase.integrations.slack$handle_error.invokeStatic(slack.clj:97)
at metabase.integrations.slack$handle_error.invoke(slack.clj:77)
at metabase.integrations.slack$handle_response.invokeStatic(slack.clj:104)
at metabase.integrations.slack$handle_response.invoke(slack.clj:99)
at metabase.integrations.slack$do_slack_request.invokeStatic(slack.clj:123)
... 45 more
[9616fefd-63d8-467c-9e25-2a7b7752ea64] 2022-05-12T15:00:04-03:00 INFO metabase.sync.util FINISHED: step 'sync-tables' for postgres Database 10 'Card API PRODU (!)' (3.8 s)
[9616fefd-63d8-467c-9e25-2a7b7752ea64] 2022-05-12T15:00:04-03:00 INFO metabase.sync.util STARTING: step 'sync-fields' for postgres Database 10 'Card API PRODU (!)'
[9616fefd-63d8-467c-9e25-2a7b7752ea64] 2022-05-12T15:00:05-03:00 WARN metabase.models.field Invalid Field :semantic_type :type/Number: falling back to null
[9616fefd-63d8-467c-9e25-2a7b7752ea64] 2022-05-12T15:00:05-03:00 WARN metabase.models.field Invalid Field :semantic_type :type/Number: falling back to null
[9616fefd-63d8-467c-9e25-2a7b7752ea64] 2022-05-12T15:00:05-03:00 WARN metabase.models.field Invalid Field :semantic_type :type/Number: falling back to null
[9616fefd-63d8-467c-9e25-2a7b7752ea64] 2022-05-12T15:00:05-03:00 WARN metabase.models.field Invalid Field :semantic_type :type/Number: falling back to null
[9616fefd-63d8-467c-9e25-2a7b7752ea64] 2022-05-12T15:00:05-03:00 WARN metabase.models.field Invalid Field :semantic_type :type/Number: falling back to null
[9616fefd-63d8-467c-9e25-2a7b7752ea64] 2022-05-12T15:00:05-03:00 WARN metabase.models.field Invalid Field :semantic_type :type/Number: falling back to null
[9616fefd-63d8-467c-9e25-2a7b7752ea64] 2022-05-12T15:00:05-03:00 ERROR metabase.task.send-pulses Error sending Pulse 5
clojure.lang.ExceptionInfo: Unable to compare results to goal for alert. {:pulse #metabase.models.pulse.PulseInstance{:archived false, :collection_position nil, :creator #metabase.models.user.UserInstance{:email "joaquin.suarez@increase.app", :first_name "Joaquin", :last_login #t "2020-11-16T18:37:53.168055Z", :is_qbnewb false, :is_superuser true, :id 1, :last_name "Suarez Bodean", :date_joined #t "2019-03-21T17:49:33.088Z", :common_name "Joaquin Suarez Bodean"}, :channels (#metabase.models.pulse_channel.PulseChannelInstance{:schedule_type :hourly, :schedule_hour nil, :channel_type :email, :schedule_frame nil, :recipients (), :updated_at #t "2019-05-29T20:37:12.275Z", :details {:emails nil}, :pulse_id 5, :id 6, :schedule_day nil, :enabled true, :created_at #t "2019-05-29T20:37:12.275Z"} #metabase.models.pulse_channel.PulseChannelInstance{:schedule_type :hourly, :schedule_hour nil, :channel_type :slack, :schedule_frame nil, :recipients (), :updated_at #t "2019-05-29T20:37:12.281Z", :details {:channel "@lucia"}, :pulse_id 5, :id 7, :schedule_day nil, :enabled true, :created_at #t "2019-05-29T20:37:12.281Z"}), :alert_condition "goal", :collection_id nil, :name nil, :creator_id 1, :updated_at #t "2019-05-29T20:37:12.259Z", :alert_first_only true, :channel-ids (6 7), :id 5, :cards (), :skip_if_empty true, :parameters (), :dashboard_id nil, :created_at #t "2019-05-29T20:37:12.259Z", :alert_above_goal true}, :result nil}
at metabase.pulse$goal_met_QMARK_.invokeStatic(pulse.clj:231)
at metabase.pulse$goal_met_QMARK_.invoke(pulse.clj:224)
at metabase.pulse$fn__76291.invokeStatic(pulse.clj:260)
at metabase.pulse$fn__76291.invoke(pulse.clj:253)
at clojure.lang.MultiFn.invoke(MultiFn.java:234)
at metabase.pulse$results__GT_notifications.invokeStatic(pulse.clj:339)
at metabase.pulse$results__GT_notifications.invoke(pulse.clj:337)
at metabase.pulse$pulse__GT_notifications.invokeStatic(pulse.clj:350)
at metabase.pulse$pulse__GT_notifications.invoke(pulse.clj:347)
at metabase.pulse$send_pulse_BANG_.invokeStatic(pulse.clj:415)
at metabase.pulse$send_pulse_BANG_.doInvoke(pulse.clj:395)
at clojure.lang.RestFn.invoke(RestFn.java:439)
at metabase.task.send_pulses$fn__80699$send_pulses_BANG___80708$fn__80711$fn__80729$fn__80730.invoke(send_pulses.clj:55)
at metabase.models.task_history$fn__41374$do_with_task_history__41379$fn__41380.invoke(task_history.clj:88)
at metabase.models.task_history$fn__41374$do_with_task_history__41379.invoke(task_history.clj:83)
at metabase.task.send_pulses$fn__80699$send_pulses_BANG___80708$fn__80711$fn__80729.invoke(send_pulses.clj:52)
at metabase.task.send_pulses$fn__80699$send_pulses_BANG___80708$fn__80711.invoke(send_pulses.clj:51)
at metabase.task.send_pulses$fn__80699$send_pulses_BANG___80708.invoke(send_pulses.clj:38)
at metabase.task.send_pulses$fn__80699$send_pulses_BANG___80708$fn__80709.invoke(send_pulses.clj:45)
at metabase.task.send_pulses$fn__80699$send_pulses_BANG___80708.invoke(send_pulses.clj:38)
at metabase.task.send_pulses.SendPulses$fn__80765.invoke(send_pulses.clj:96)
at metabase.models.task_history$fn__41374$do_with_task_history__41379$fn__41380.invoke(task_history.clj:88)
at metabase.models.task_history$fn__41374$do_with_task_history__41379.invoke(task_history.clj:83)
at metabase.task.send_pulses.SendPulses.execute(send_pulses.clj:82)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)

@Mori

It's saying that the channel metabase-bot still does not exist.
And it is also having problems with sending the alert: Unable to compare results to goal for alert