WE
← Back to Documentation

Installation

Different ways to add workflow steps to your project

Using shadcn CLI (Recommended)

Use the familiar shadcn CLI with our custom registry to install workflow steps. The CLI handles everything automatically:

Install a Single Step

npx shadcn@latest add https://workflow-registry.vercel.app/r/send-slack-message

Or Use the Short Form

Set up the registry URL once in your config:

npx shadcn@latest init -u https://workflow-registry.vercel.app

Then add steps easily:

npx shadcn@latest add send-slack-message send-email

What the CLI Does

  • 1.Fetches the step code from the registry
  • 2.Creates the step file in your project's steps/ directory
  • 3.Automatically installs required npm dependencies
  • 4.Updates your project with full TypeScript types

Manual Copy & Paste

You can also manually copy step code from the website:

1. Browse Steps

Visit the steps page and find the step you need.

2. Copy the Code

Click on a step to view its details. Copy the code from the "Code" tab.

3. Create the File

Create a new file in your steps/ directory and paste the code.

steps/send-slack-message.ts

4. Install Dependencies

Check the "Setup" tab for required dependencies and install them:

npm install @slack/web-api

5. Configure Environment Variables

Add required environment variables to your .env file.

Project Structure

Here's the recommended project structure for workflows:

project-root/
├── steps/                    # Workflow steps
│   ├── send-slack-message.ts
│   ├── send-email.ts
│   └── generate-ai-content.ts
├── workflows/                # Your workflows
│   ├── onboarding.ts
│   └── data-processing.ts
├── .env                      # Environment variables
└── package.json

Environment Variables

Most steps require environment variables for API keys and configuration. Here are some common ones:

Slack Steps

SLACK_BOT_TOKEN=xoxb-...

Email Steps

RESEND_API_KEY=re_...
RESEND_FROM_EMAIL=noreply@example.com

Storage Steps

BLOB_READ_WRITE_TOKEN=vercel_blob_...

Troubleshooting

Registry not found

Make sure you're using the full registry URL or have initialized the registry with npx shadcn@latest init -u https://workflow-registry.vercel.app

Dependencies not installing

The shadcn CLI will automatically install dependencies. If it fails, install them manually from the step's "Setup" tab.

Import errors

Make sure the workflow package is installed and you've imported FatalError where needed.