mirror of
https://github.com/xtr-dev/payload-automation.git
synced 2025-12-10 00:43:23 +00:00
592536f61a1efca1a11774e9a4721639efa30784
- Updated Workflow collection trigger field from 'collection' to 'collectionSlug' - Updated all document operation steps (create, read, update, delete) to use 'collectionSlug' - Updated corresponding handlers to destructure 'collectionSlug' instead of 'collection' - Removed debug console.log statements from logger configLogger methods - Fixed collection hook debug logs to use 'slug' instead of reserved 'collection' field 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
@xtr-dev/payload-automation
A comprehensive workflow automation plugin for PayloadCMS 3.x that enables visual workflow building, execution tracking, and parallel processing.
⚠️ Pre-release Warning: This package is currently in active development (v0.0.x). Breaking changes may occur before v1.0.0. Not recommended for production use.
Features
- 🔄 Visual Workflow Builder - Create complex workflows with drag-and-drop interface
- ⚡ Parallel Execution - Smart dependency resolution for optimal performance
- 🎯 Multiple Triggers - Collection hooks, webhooks, manual execution
- 📊 Execution Tracking - Complete history and monitoring of workflow runs
- 🔧 Extensible Steps - HTTP requests, document CRUD, email notifications
- 🔍 JSONPath Integration - Dynamic data interpolation and transformation
Installation
npm install @xtr-dev/payload-automation
# or
pnpm add @xtr-dev/payload-automation
# or
yarn add @xtr-dev/payload-automation
Quick Start
import { buildConfig } from 'payload'
import { payloadAutomation } from '@xtr-dev/payload-automation'
export default buildConfig({
// ... your config
plugins: [
payloadAutomation({
collections: ['posts', 'users'], // Collections to monitor
globals: ['settings'], // Globals to monitor
enabled: true,
}),
],
})
Step Types
- HTTP Request - Make external API calls
- Create Document - Create PayloadCMS documents
- Read Document - Query documents with filters
- Update Document - Modify existing documents
- Delete Document - Remove documents
- Send Email - Send notifications via PayloadCMS email
Data Resolution
Use JSONPath to access workflow data:
$.trigger.doc.id- Access trigger document$.steps.stepName.output- Use previous step outputs$.context- Access workflow context
Requirements
- PayloadCMS ^3.45.0
- Node.js ^18.20.2 || >=20.9.0
- pnpm ^9 || ^10
Documentation
Full documentation coming soon. For now, explore the development environment in the repository for examples and patterns.
License
MIT
Description
Languages
TypeScript
98.6%
JavaScript
1.4%