Sahil Khosla Profile picture
Dec 3, 2021 13 tweets 6 min read Read on X
My experience building a @SlackHQ bot using @tray and @airtable as the #nocode tools.

Giant Thread 🧵 👇
1/ I have been meaning to build a Slack bot for a while and have done several proofs-of-concept in the bast. But every single time I have failed to actually ship it just because it requires a managed back-end and that just adds too much effort for a simple side-project at work.
2/ 📚 Introducing — The Dictionary Bot

The idea is simple. Look up a list of acronyms and return what it stands for. For example
3/ At a high level, I need the following for the bot to work:

- A Slack App (with Slash commands enabled)
- A URL that’s called whenever the Slash command is triggered
- Some kind of a Database to hold the Acronym definitions
- Ability to respond to the Slash Command
4/ Implementation - Backend with Tray

Tray.io is essentially built around workflows (think of it as a function) that can be called via various “triggers”. In my case a Slash command from Slack.
5/ To connect the workflow to the Slash command, it was just a matter of obtaining the unique URL for my Dictionary Bot workflow in Tray.io and providing it in the settings on my Slack app.
6/ Once connected and authenticated (which was done by providing Tray.io with a ‘signing secret’ from Slack), I was already able to start invoking the (/define) command from Slack and see the Tray workflow getting triggered.
7/ Airtable as the DB

The next step was to identify where to store my data so that it can be easily queried from the Tray.io. Think of Airtable as a glorious G Sheet that allows you to query your data over an out-of-the-box API.

It’s hard to believe, I know.
8/ With the data now available, all I had to do was create authentication for my Airtable account (which was trivial). The connector very conveniently provides the ability to filter your data by a formula which in my case was simply:
9/ Pretty much at this point, I had the output from the table that I wanted and was ready to craft a response to be sent back to Slack.
10/ Turns out, each Slash command request comes with a unique response_url that you can use to send a response and it’s sent to the same channel where the request originated — pretty convenient.
11/ And voila, the Slack bot was ready to be tested end-to-end and I did not even have to write a single line of code! 🎉
12/ It was quite enjoyable to build with @tray and @airtable and take my idea from inception to production within a matter of hours!!

What do you think? Thoughts? Questions?

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Sahil Khosla

Sahil Khosla Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @sahilkhosla

Aug 25, 2022
I asked the community for the best @bubble agencies.

Here are 13 of them that stood out:
@bubble 1–automatic.so by @David__Flynn

He was mentioned by several people and the website is sick!
@bubble @David__Flynn 2–rapiddevelopers.com by @Matt_Graham_

Honestly the most impressive website along with well defined offers (prices included).
Read 19 tweets
Aug 10, 2022
If you liked Atomic Habits, you are going to LOVE this.

7 insanely good goal setting tips by @ShaanVP:
@ShaanVP { 1 } Set Picture Goals or Movie Goals

It's easier to visualize a lifestyle than it is to go after some arbitrary numbers.

For example: Go to Zillow, find a house that you like an imagine your life in it. That's your goal.

Less computation, more motivation.
@ShaanVP { 2 } Floor Goals & Ceiling Goals

Setting a range is better than a super ambitious goal only to beat yourself over it.

What's the minimum it would take for it to feel like a win?
That's the FLOOR.

What is going to create an "F Yeah" feeling?
That's the CEILING.
Read 11 tweets
Jul 7, 2022
There are 100 million mac users.

99% are wasting precious time by not knowing these 10 shortcuts:

[GIFs included]
{ 1 } Use Spotlight Search for Conversions

You can do currency, temperature and measurement conversions directly from the spotlight search bar.

For example:

‣ 86F to C
‣ 1kg to lbs
‣ 1USD to CAD

👉 Press 'Cmd' + 'Space' to start.
{ 2 } Preview a File

With this shortcut you can preview the contents of a file, quickly. No need to double click and wait for the app to launch.

Works well for PDFs, docs, images and videos.

👉 Select a file and press `Cmd' + 'Y' keys.
Read 13 tweets
Apr 13, 2022
I built a @todoist clone using @NotionHQ as the no-code tool and cancelled my $50/year subscription.

Here is how 👇🧵
0/ Features

• Quick Add bar to enter tasks

• Inbox with ALL tasks listed

• Show overdue, due today and upcoming tasks

• Support for !! (priority) and # (project) shortcut

• Group tasks by category/priority on a "Trello" board
1/ Setup

To build an app you typically need 3 things:

1) A back-end + DB
2) A front-end
3) Something to connect the 2

Notion provides 1/2 out of the box and 3 is hidden magic. 🎩

So I started by setting up a DB (called Tasks) with the required properties.
Read 12 tweets
Apr 4, 2022
Today is the first day of the rest of my life.

I am no longer employed full-time.

Here is why I QUIT my high paying software job:

👇
1 - New Challenge

I have been working for 10+ years as a Software Engineer and could predict what my next few years are going to look like.

What I saw didn't excite me so I knew it was time for a new challenge.

It's time to start my own business.
2 - Leaving The Comfort Zone

I have been trained to play it safe and so far I have. Study, grades, college, job, promotion(s)...

But I knew what got me here isn't going to get me there.

I have always stayed within my comfort zone but it was slowing down my growth.
Read 10 tweets
Jan 11, 2022
I always knew that @NotionHQ is really powerful but I haven’t really been able to leverage it in the past.

Over the holidays, I completely revamped my personal productivity and life organization system.

All in Notion.

This is what I accomplished 👇
1/ Unification

With this revamp, I dropped several apps including Todoist, Journey, Goodreads, and Apple Notes. I also no longer need to maintain an analog bullet journal.

Everything is available in an easy to digest dashboard. Image
2/ Advanced Todo List

Think GTD + Bullet Journaling

Given I am in a permanent remote job and always at home, I am no longer working typical 9-5 hours. Work/Life is all integrated so I reflected this in the to-do list as well.

Heavy usage of Notion DBs and linking. Image
Read 10 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(