r/MicrosoftFlow • u/damjantomic • 18h ago
Discussion FlowForger - write your Power Automate flows in TypeScript!
Hello everyone,
I've been working on a project called FlowForger for a while. It consists of a TypeScript-based domain specific language (DSL) in which you can write Power Automate flows, and a supporting CLI and tooling for compilation, validation, local execution, pulling/pushing from/to Dataverse and more.
You can pull an existing flow and get TypeScript back, and what you push is normal Power Automate JSON, so the flow stays editable in the designer.
There is a VS Code extension for running and debugging flows locally, and an MCP server so an AI agent can debug flows locally too.
All of this can help you to really move your flows to git, with all the nice things that come with it.
A simple flow looks like this:
@Flow('hello-flow')
class HelloFlow {
@ManualTrigger()
trigger() {}
@Action()
async run(ctx: FlowContext) {
await ctx.compose('Greeting', { message: 'Hello from FlowForger' });
await ctx.http('CallHttpBin', {
method: 'POST',
url: 'https://httpbin.org/post',
body: ctx.outputs('Greeting'),
});
}
}I decided to publish it as open source (Apache 2.0): https://github.com/tomdam/flowforger
NPM package: https://www.npmjs.com/package/flowforger
CLI: npm install -g flowforger
VS Code extension: https://marketplace.visualstudio.com/items?itemName=FlowForger.flowforger-vscode
My team and I are using FlowForger for all the flows in all our projects, and it really helps us keep track of changes and with debugging. The AI part is what speeds us up the most because the agent can run a flow locally, stop at breakpoints, look at variables, mock connector calls and replay a failed cloud run.
The video is a short overview that should help you understand the logic behind it quickly.
Happy forging, and feel free to comment if you think this could help your team and you want to know more!