Build a Leave Request Bot with Azure OpenAI, LangChain and Slack Bot
11 min readSep 11, 2023
I’d like to discuss my journey of creating a leave request bot using Azure OpenAI, LangChain and integrating it with Slack Bot.
The bot must possess the capability to manage the following situations:
- Keep a record of the leave request history.
- Add multiple leave requests.
- Update or cancel the current leave requests.
Additionally, the bot should also retrieve the following details from the user:
- The specific period or duration of their intended leave. The leave period must not be overlapped each other.
- The destination country where they plan to travel.
- Whether they require a visa letter for their trip.
- Whether they need assistance in configuring their out-of-office message.
- Whether they need to delegate the approval process to someone else.
The Design
We’ll create a Python Flask App that will load both the Leave Procedure text file and the User Leave Record text file corresponding to the user’s session based on their user ID.
Additionally, we’ll develop a NodeJS application to serve as a bridge between the Slack bot and the Python Flask app.