On the Slack side you would need to register a new app and have it use the Events API. This is described here: Using the Slack Events API | Slack
Using n8n’s webhook node you can receive arbitrary HTTP Requests, including those made by Slack. You would need to ensure that your webhook node answers as expected by Slack for this to work (this is described in the URL verification handshake section of the page linked above).
Let me know if you run into any trouble with this!
No examples that I am aware of for this one, Looking at the Slack API docs there are a few bits that need to happen like request verification which can be done with the quick workflow below. You would need to maybe use a switch node to work out if it is a challenge request or data being posted but hopefully this will get you started.