I had issues getting Slack to display properly if it was minimized or hidden in the background. Recommend trying something like this:
on alfred_script(q)
tell application "Slack"
reopen
activate
end tell
tell application "System Events"
keystroke "k" using {command down}
tell process "Slack" to keystroke (q as string)
key code 36
end tell
end alfred_script