Can't find Workflows
Setting up a workflow. Have used an example and placed in environment/workflows in my repo per docs but am getting sync errors (not finding workflows). Have been trying different things including a kinde.json config file with rootDir = "environment/workflows". Filename of workflow ends in "...Workflow.ts". Am at a loss what to try due to limited ways to debug.
4 Replies
Hi Dave—sorry you’re running into this. To help troubleshoot, could you share a bit more detail:
1. Which workflow are you trying to sync?
2. A snippet of your repo structure around
environment/workflows
(so I can confirm the path and naming).
3. Your kinde.json (or framework config) showing the rootDir
setting.
4. The exact error message or sync log you’re seeing when it fails to find the workflow.
With those details (and even a copy/paste of the log), I can pinpoint what might be misaligned in the path, naming, or config. Thanks
Hi Dave,
In the meantime, these docs might be helpful:
- About Workflows (triggers & use cases): https://docs.kinde.com/workflows/about-workflows
- Create a Workflow: https://docs.kinde.com/workflows/manage-workflows/create-workflow
- Connect Repo for Workflows: https://docs.kinde.com/workflows/about-workflows/connect-repo-for-workflows
- Preview Workflows & Deployments: https://docs.kinde.com/workflows/manage-workflows/preview-workflows
Feel free to dive into those sections for detailed examples and configuration options. Let me know if anything is unclear or if you have any questions—we're here to helpI've read all those sections of the docs multiple times. I don't know what I'm missing. I've created a new repo and added the bare minimum. I don't get an error and I unfortunately cannot see sync logs now from the prior repo, but I don't see any workflows after connecting to the repo and syncing. The Status page says workflows are ok.
Here's my kinde.json:-
{
"rootDir":"environment/workflows"
}
Here's my environment/workflows/UserTokenWorklow.ts file:-
import {
accessTokenCustomClaims,
onUserTokenGeneratedEvent,
WorkflowSettings,
WorkflowTrigger,
} from "@kinde/infrastructure";
export const workflowSettings: WorkflowSettings = {
id: "userTokenGeneration",
name: "Access token custom claims",
failurePolicy: {
action: "stop",
},
trigger: WorkflowTrigger.UserTokenGeneration,
bindings: {
"kinde.idToken": {}, // required to modify ID token claims
"kinde.accessToken": {}, // required to modify access token claims
url: {}, // required for url params
},
};
export default async function handleUserTokens(event: onUserTokenGeneratedEvent) {
const accessToken = accessTokenCustomClaims<{
companyName: string;
}>();
accessToken.companyName = "Kinde";
};
I've attached a screenshot of my repo.

Here's the repo:- https://github.com/davidcrouch/kinde_workflows
GitHub
GitHub - davidcrouch/kinde_workflows
Contribute to davidcrouch/kinde_workflows development by creating an account on GitHub.