From the course: Build AI Agents and Automate Workflows with n8n

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Adding a Slack trigger

Adding a Slack trigger

- [Speaker] To send messages to Slack. I'll start by adding an item to the end of the AI agent here and say Slack, send a message. The message I want to send is going to the channel. The channel can be picked from a list by using the dropdown here, but if this is going to be dynamic, there's a good chance this bot will have access to multiple different channels. In that case, I can change it to buy ID and then go over here to Slack trigger and pull out the channel expression and put that in here. That way, every time a message comes in, it tells the system what channel it came from, and then the message that comes back sends the message to the same channel. Then we set up the message type. In this case, a simple text message and the message text will be whatever comes out of the AI agent. So that's the output up here. With these settings in place, let's see if this works. Execute the workflow. We're now waiting for the trigger event, (typing loudly) and in response, we get Sofia's…

Contents