How To Install Chatbots on Serverless Web Apps

Last Updated (Text)
When your core site is serverless, cloud functions can provide the limited endpoints you need without the hassle of setting up a server.

For a quicker walkthrough, read this tweet thread.


I recently did this for a client's Webflow site that used Memberstack for accounts and Intercom for customer support. When you're logged in to a web app, chat widgets like Intercom should know who you are, to avoid collecting unnecessary information and show your past conversations. In a traditional web app, you have access to the authentication endpoint and can pass back the information Intercom needs to verify the user. But in a low-code stack, you don't have a server at all, so we need an alternate solution. Luckily this scenario is exact where cloud functions (like AWS Lambda or the more aptly named Netlify Functions, Google Cloud Functions, Azure Functions...) thrive.

The solution is to create a serverless endpoint, and pass an identifying piece of the user's account (like an email address) to the endpoint upon login, then take the returned hash and pass it through to the chat widget, where it says "oh, that's who this be" and you're good to go. I'll walkthrough how to do this for Intercom & HelpScout.


① — Install The Widget

For Helpscout, slap their provided snippet in the custom code section of your Webflow site.

For Intercom, follow their two-part steps.

② — Identify Logged-In Users