Based on the orangejellyfish serverless starter kit, these examples of two slackbots are explored in detail in the building a serverless bot blog.
Example 1:
API Gateway Slack Hook - A simple bot which echo's back the input you type in Slack.
Example 2:
Lambda Function Slack Hook - A Slack bot which takes a postcode as an input and returns a nearby pub name and address.
To deploy a new serverless stack
npm run deployOnce deployed you can configure a slash command in Slack to call either of these lambda's via their URLs. To set up a slack command see here.