Web Development

Zapier for Developers: Building an AI Workflow Engine with Fastify, BullMQ, and YAML

Vishwam DhavaleMonday, March 23, 20264 min read
Zapier for Developers: Building an AI Workflow Engine with Fastify, BullMQ, and YAML

Zapier for Developers: Building an AI Workflow Engine with Fastify, BullMQ, and YAML

Every developer eventually hits the same wall: glue code.

You build a solid product—but then you spend hours wiring:

* Stripe → Email

* GitHub → Slack

* Database → CRM

It’s repetitive, fragile, and worse—it doesn’t scale cleanly.

The Problem with Zapier and No-Code Automation

Tools like Zapier and Make solve this for non-technical users. But for developers, they introduce a different class of problems:

* Black-box execution — when something fails, debugging is painful

* Limited control — custom logic becomes hacks

* Silent failures — workflows break without visibility

* High cost at scale — pricing grows faster than usage

Most automation tools hide complexity instead of managing it.

That’s the core issue.

Developers don’t need abstraction that removes control.

They need abstraction that preserves control while reducing effort.


What Developers Actually Need

A proper workflow system for developers should provide:

* Code-level control

* Event-driven architecture

* Reliable execution (queues, retries, idempotency)

* Visibility into failures

* Self-hosting capability

And ideally:

You should be able to describe a workflow in plain English—and get a production-ready system.

That’s where Automesh comes in.


Introducing Automesh

Automesh is an open-source, AI-powered workflow engine designed for developers.

Instead of drag-and-drop UIs, you define workflows using a YAML-based DSL, generated by AI but fully editable.

The goal is simple:

Replace glue code with structured, reliable, event-driven workflows.

Example: From Plain English to Workflow

Input

"When a Stripe subscription is created, send a welcome email"

Generated YAML

trigger:

type: stripe.subscription.created

steps:

- action: resend.sendEmail

to: "{{customer.email}}"

template: welcome

This is the core abstraction:

* AI generates the workflow

* You review and control it

* The engine executes it reliably


How Automesh Works (Architecture)

Automesh is built around a queue-driven, event-based architecture.

Core Stack

* Fastify → API layer (webhooks + workflow management)

* BullMQ → job queue for execution and retries

* Postgres → persistence + workflow state

* Next.js → dashboard and workflow interface

* LLM (Groq API) → workflow generation

Execution Flow

  1. Event received (e.g., Stripe webhook)
  1. Workflow is resolved
  1. Job pushed to BullMQ queue
  1. Steps executed sequentially
  1. Failures retried automatically
  1. Logs stored for debugging
This ensures:

* No dropped events

* Retry on failure

* Full traceability


Automesh vs Zapier vs Custom Code

FeatureZapierCustom CodeAutomesh
Developer ControlLowHighHigh
Setup TimeFastSlowFast
DebuggingLimitedFullFull
ReliabilityMediumDependsHigh
CostExpensiveInfra costSelf-hosted

The Hardest Problem: Controlling AI Output

The real challenge wasn’t infrastructure.

It was making AI reliable.

LLMs are great at generating ideas—but terrible at:

* strict formats

* deterministic outputs

* production-safe configs

To make this work, I had to:

* enforce strict YAML schemas

* use controlled prompting

* validate workflows before execution

* prevent hallucinated integrations

This turned Automesh from a demo into a usable system.


The Future: Agentic Workflow Systems

Right now, Automesh generates static workflows.

But the next step is more interesting:

Workflows that adapt at runtime.

Imagine this:

* API changes → system detects failure

* AI reads updated docs

* Workflow updates itself

* Execution continues

This is where automation is heading:

From:

"If this happens, do that"

To:

"Here’s the goal—figure it out"

Why I Built Automesh

This wasn’t about building another tool.

It was about fixing a pattern:

Developers keep rewriting the same integration logic—because existing tools don’t respect how developers work.

Automesh is an attempt to change that.


What’s Next

Current integrations:

* Stripe

* GitHub

* Slack

* Resend

Next focus:

* Plugin architecture (custom integrations)

* Better observability

* Runtime adaptation (agent-based execution)


Check It Out

If this resonates, explore the project:

👉 https://github.com/VishwamDhavale/automesh


Final Thought

Automation isn’t about removing complexity.

It’s about owning it without rewriting it every time.

#Next.js#AI#Automation#Future Trends#BullMQ#Fastify#System Design
V

Written by Vishwam Dhavale

Full stack developer building scalable web & mobile systems. Founding Engineer with a passion for clean architecture and great DX.