How I Built a Slack App Using ChatGPT – all without writing a single line of code.
Discover how you can leverage ChatGPT and a few well-crafted prompts to build fully functional applications.
👋 Ciao, Alex here. Welcome to a new free edition of Not Just Bits, and thank you to all the readers and those who support my work. Every week, my goal is to share lightweight and informative resources for CTOs.
As a CTO, you often face the challenge of balancing limited developer resources with the need to quickly deliver quality software. What if you could build an app without consuming hours of your team’s time? Recently, I created a Slack bot to detect PII in messages—using nothing but AI-driven prompts. No traditional coding required.
See It in Action
Watch the Loom demo to see how this app was built using prompts and AI. It’s a new way of getting things done faster.
The Numbers:
Prompts Used: 5
Time Spent: 45 minutes
Tech Stack: Node.js, TypeScript, Jest
Developer Code Written: Zero
In under 45 minutes and just five prompts, I had a fully functional Slack app written in TypeScript, complete with automated tests and CI/CD integration through GitHub Actions.
Step-by-Step: How It Worked
Here’s how I guided AI to build this Slack bot, one step at a time.
1. Starting with the Basics:
I started with a clear objective: “Create a Slack bot in TypeScript that detects PII in messages according to GDPR standards.” With this, the AI set up the bot, adding logic to detect common PII types like emails, phone numbers, and credit card numbers.
2. Structuring the Code for Scalability:
For any engineering leader, code quality and maintainability are key. So, my next prompt was: “Organize the code using a model-view-service pattern and create a separate utility for PII detection.” This allowed the AI to structure the app in a modular way, making it easier to test, extend, and maintain.
3. Handling Slack Events:
Next, I needed the bot to interact with Slack in real time. I prompted the AI: “Listen for Slack messages, check for PII, and send a warning if found.” The AI then generated the event handling logic, enabling the bot to respond instantly when sensitive information was detected.
4. Automating Testing:
Testing is non-negotiable in any software project. I instructed the AI: “Write tests for European and American phone numbers, credit card numbers, and Slack-formatted email addresses.” Within seconds, I had Jest test cases for various PII scenarios.
5. Preventing Potential Issues:
To avoid a common pitfall where the bot could end up responding to its own messages, I used a straightforward prompt: “Ignore messages sent by the bot itself”.
The ROI of Prompt-Driven Development
As a CTO, you know that time and developer resources are the most valuable assets. Here’s a breakdown of how much this approach can save:
Time Saved: Building this bot traditionally would take at least half a day. With AI, it took just 45 minutes.
Cost Efficiency: Developers spent zero time writing boilerplate code, allowing them to focus on higher-value tasks.
Scalability: With a prompt-driven model, you can quickly extend functionality. Adding features becomes a matter of instructing AI, not re-architecting code.
Key Takeaways for Engineering Leaders
Clarity Drives Success: When using AI, specificity in prompts results in better output. Know what you need, and instruct the AI directly.
Iterate in Small Steps: Guide the AI incrementally. Each prompt should tackle a specific problem, allowing you to steer the outcome effectively.
Use Real Examples: Including real-world use cases in prompts helps the AI create comprehensive solutions that align with your needs.
Conclusion: A Strategic Shift in Development
This experiment proves that you can build functional apps without draining your team's coding hours. With prompt-driven development, AI can handle the tedious setup, freeing up developers for strategic, complex work.
The Slack bot was built entirely through prompts. The only human involvement was in defining the requirements and managing the generated files. Imagine what else your team could achieve if they spent less time on boilerplate coding and more time on innovation.
Ready to see how simple it can be? Check out the Loom demo and explore the code on GitHub to see the Slack bot in action.
✅ Before you go:
Please share this post and invite your network to subscribe to the Not Just Bits newsletter.
Feel free to connect with me on LinkedIn.
See you next week! Best, Alex Di Mango