Creating a workflow

Create a new workflow by clicking Create Workflow > Create v2 Workflow in the SampleHC dashboard. New Workflow You will be prompted to enter a name for your workflow. Enter a name and click Create.
The workflow slug must be unique across all workflows in your organization. It will also be the name of the git repository.
Create Workflow Dialog This will create a git repository initialized with the SampleHC workflow template.

Developing a workflow

Setting up the environment

First, clone the repository to your local machine.
git clone https://git.samplehc.com/<org-slug>/<workflow-slug>
Prerequisites: You will need to have Node.js and Python installed on your machine. The versions used at the time of writing is Node.js 20.x, and Python 3.12.x, but newer versions may work as well.
At the root of your workflow, run the following commands to install dependencies
# Install node.js dependencies
npm install 

# Sets up a python virtual environment and installs python dependencies
npm run setup-python-dev 

Testing with Dev Mode

Depending on which environment you created your workflow, you can test your workflow by starting a dev server.
If you are not planning on making any changes to the Sample platform, the recommended way is to use app.samplehc.com to test your changes.

Dashboard Development

To develop and test dashboards locally, you can run the dashboard in dev mode using the following steps:

1. Install dependencies

First, install the Node.js dependencies:
npm install

2. Start the dev server

Start the dashboard dev server:
npm run dev:prod

3. Set up ngrok for external access

To make your local dashboard accessible externally, use ngrok to create a tunnel (Node.js part only):
ngrok start --all
This will create the necessary tunnels for the dashboard to be accessible from external services while running in development mode.

Deploying a workflow

To deploy your workflow, you can push your changes to the main branch of the git repository.
git push origin main 
# or simply `git push` if you are already in the main branch
This will trigger a build and deploy of your workflow.