Connect your workflows repo and branch
Workflows
Follow this guide to set up your project and create your first workflow.
kinde-wf-base-template).The base template contains a basic workflow that writes Hello world to runtime logs when a user authenticates.
Sign in to your Kinde account and go to Settings > Environment > Git repo.
Select Connect GitHub.
Follow the instructions to connect your GitHub account to Kinde.
Select the repository you created in the previous step, then select Next.
Select the branch (for example, main) and select Save.
Kinde will automatically sync the code and create a new workflow for you.
Go to Kinde home > Workflows to view your new workflow. You should see a new workflow called Workflow 1.
Select the workflow to see the details and deployments.
Select Runtime logs to view the logs for the workflow. This should currently be empty.
Run your Kinde application and sign in. This triggers the workflow and creates a new runtime log entry.
Open Runtime logs for the workflow again (refresh the page if the list does not update).
Select the new log entry to see Hello world in the output (see sample below).
Post-authentication trigger firedWorkflow foundJavaScript execution started…Info Hello world🎉 Workflow completed in 0.7msPrefer to scaffold the project yourself instead of using the template? Follow these steps to recreate the same base template setup from scratch.
Create a new directory for your workflows repository and move into it:
mkdir kinde-workflows && cd kinde-workflowsInitialize a Git repository (skip this if you already have one):
git initCreate the folder structure Kinde expects, including a folder for this workflow:
kindeSrc/ └── environment/ └── workflows/ └── postUserAuthentication/mkdir -p kindeSrc/environment/workflows/postUserAuthenticationCreate kinde.json in the project root. This tells Kinde where to discover your workflow code:
cat > kinde.json << 'EOF'{ "rootDir": "kindeSrc", "version": "2025-11-11", "integrations": { "npm": { "enabled": true } }}EOFInitialize a package.json file:
npm init -y(Optional) Add the Kinde infrastructure package if you want workflow types and methods during development:
npm i @kinde/infrastructure(Optional) Add a tsconfig.json if you use TypeScript:
cat > tsconfig.json << 'EOF'{ "compilerOptions": { "target": "ES2020", "module": "ESNext", "moduleResolution": "Node", "strict": true, "esModuleInterop": true, "skipLibCheck": true }, "include": ["**/*.ts"]}EOFCreate a workflow file. The filename must end with Workflow (for example, Workflow.ts or postAuthWorkflow.ts). See Workflow files.
touch kindeSrc/environment/workflows/postUserAuthentication/Workflow.tsAdd the following code. This matches the base template: it runs on the post-authentication trigger and logs Hello world.
import { onPostAuthenticationEvent, WorkflowSettings, WorkflowTrigger,} from "@kinde/infrastructure";
// The setting for this workflowexport const workflowSettings: WorkflowSettings = { id: "onPostUserAuthentication", name: "Post user authentication workflow", trigger: WorkflowTrigger.PostAuthentication,};
// The workflow code to be executed when the event is triggeredexport default async function Workflow(event: onPostAuthenticationEvent) { console.log("Hello world");}Commit your changes and push them to a GitHub repository.
git add .git commit -m "Initial kinde workflow commit"git pushYou must have a GitHub repository and a remote origin set before you can push. See GitHub’s guide on adding locally hosted code to GitHub.
Follow step 2 in Quickstart to connect your repository and confirm the workflow appears under Workflows.
Follow step 3 in Quickstart: sign in to your app, then check Runtime logs for the Hello world output.
You have created your first Kinde workflow. Modify it to fit your needs, or add more workflows. Practical examples: