<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-PP7S83N" height="0" width="0" style="display:none;visibility:hidden">
HACKATHON: Create cutting-edge enterprise apps using Retool + WeavyRead more
Guide

Create a Retool app with Weavy components

In this guide, we'll be adding all Weavy features as custom components so they'll show up in the Component Library in your Retool app - just drag and drop!

1. Weavy API key and backend

First, we need an API key to communicate with the Weavy backend.

2. Clone repo

The repo contains everything you need to set up and configure the demo app and use Weavy as custom components in your Retool app.

Start by cloning the repo
git clone https://github.com/weavy-labs/weavy-retool-components.git weavy-retool-components

3. Install dependencies

Change your directory to weavy-retool-components and run:
Install
npm install

4. Environment variables

We need the environment URL and an API key to communicate with the Weavy backend. To make this available for the scripts in the repo, we need to place it in an .env file.

Copy into the .env file in the root of the project
WEAVY_URL="WY_BACKEND_URL"
WEAVY_APIKEY="WY_API_*****************"
Create an .env file in the root of your project folder, copy and paste the above into the file.

5. Log in to Retool

Log in using the following command. You need to provide an API access token with read-and-write scopes for Custom Component Libraries. See the Retool API authentication documentation for instructions on generating an access token.

Log in to Retool CLI
npm run login
Run this command in the project's root folder.

6. Install demo app

Once you have your Retool authentication configured, you can run the installation script to upload and configure the Weavy components and the demo app.

Run the script in the project root
npm run create:demo

The script will automatically configure the following:

  • It sets a global WEAVY_URL Javascript variable. You can see it under Settings > Advanced settings > Preloaded Javascript in your Retool account.
  • It creates a WeavyAuthentication workflow for authentication token handling in the Workflows section in Retool. The Workflow is configured with your Weavy API key.
  • It creates a WeavyPageNavigation workflow in the Workflows section for saving page metadata that is needed by Weavy Notifications to be able to navigate back to the container their content originated from.  The Workflow is configured with your Weavy API key.
  • It installs the Weavy components under Settings > Custom Components Library in your Retool account.
  • It creates a demo app called Weavy Components - Basic Layout in the Apps section in Retool.

7. Done!

Click the link in the terminal window, and there we have it - a complete Retool demo app using Weavy components.

Select data in the table and see how the right panel updates with collaboration components. In the top right corner, you can also see a messenger icon; click it to open a drawer with our messenger component.

It even works with notifications - toasts, deep navigation, and all - see the notifications icon in the top bar.

Now, imagine all this in your app!

Web capture_14-10-2024_1636_ubajay.retool.com
Ask AI
Support

To access live chat with our developer success team you need a Weavy account.

Sign in or create a Weavy account