Workflow builder

From oyi77/1ai-skills · View interactive version

Workflow builder is an AI agent skill from the GitHub repository oyi77/1ai-skills. Use when building and automating business workflows with Notion task tracking, Slack notifications, Kanban boards, and cross-functional process orchestration.

How to use this skill

Skill file

Workflow Builder

When to Use

Trigger phrases:

Use cases:

When NOT to use:

Build and automate workflows for business operations using Notion for task tracking and Slack for notifications.

When NOT to Use

Overview

Workflow Builder bridges the gap between manual business processes and fully automated operations across platforms like Make.com, n8n, and Zapier. Modern workflow automation connects disparate tools — CRMs, communication platforms, databases, and analytics — into cohesive pipelines that execute reliably without human intervention. The visual drag-and-drop paradigm has made workflow design accessible to non-developers, while code-based workflows via tools like Prefect and Temporal give engineers fine-grained control over execution, retries, and state management.

Three dominant platforms serve different automation profiles. Zapier excels at simple, single-condition triggers with 7,000+ app integrations — ideal for solo operators and small teams who need quick, no-code connections between SaaS tools. Make.com (formerly Integromat) offers visual scenario builders with routers, aggregators, and data transformation modules for medium-complexity workflows. n8n provides open-source, self-hosted workflow automation with full JavaScript/Python code nodes, webhook listeners, and granular error handling for engineering teams who need control over data residency and infrastructure.

Every automated workflow follows the same abstract pattern: a trigger (scheduled cron, webhook payload, or platform event) fires, which passes data through a pipeline of actions that transform, route, or store information. Routers branch execution based on conditions, loops process arrays item-by-item, and error handlers catch failures with retries or fallback paths. Understanding this common architecture lets you translate a workflow from one platform to another and choose the right tool for each automation's complexity.

A successful workflow automation practice starts small — automate one recurring task, validate it with real data, then layer on error handling and monitoring before scaling to more complex pipelines. The goal is not to automate everything, but to eliminate toil: the repetitive, predictable operations that drain time from higher-value work. Well-designed workflows should be resilient, observable, and cheap to maintain.

Workflow

# Example: Workflow automation
import schedule
import time

def run_workflow():
    data = fetch_data()
    processed = transform(data)
    deliver(processed)

schedule.every().hour.do(run_workflow)
  1. Map the process — Document the current manual workflow end-to-end. Identify every step, decision point, data source, and stakeholder involved. This map becomes your automation blueprint and reveals hidden dependencies.
  2. Define triggers — Set up events or schedules that initiate the automation (cron, webhook, platform event, or manual button).
  3. Configure inputs — Specify data sources and parameters. Validate that every required field is present before the workflow proceeds.
  4. Design pipeline — Define the sequence of automated steps with routers for conditional branches, iterators for array processing, and aggregators to batch results.
  5. Add error handling — Implement retry with exponential backoff for transient failures, fallback actions when retries exhaust, and alert notifications to a dedicated channel for unrecoverable errors.
  6. Test end-to-end — Validate the full automation with realistic data, including edge cases (empty inputs, missing fields, API timeouts). Use test mode or dry-run where available.
  7. Deploy and monitor — Activate the workflow, set up execution logging, and configure dashboards for success rate, latency, and error count.

Setup / Configuration

Platform Setup

Trigger Configuration

Credential Management

Best Practices

Code Examples

Retry with Exponential Backoff

import time
import logging
from functools import wraps

def retry(max_attempts=3, backoff=2):
    def decorator(func):
        @wraps(func)
        def wrapper(*args, **kwargs):
            for attempt in range(1, max_attempts + 1):
                try:
                    return func(*args, **kwargs)
                except Exception as e:
                    if attempt == max_attempts:
                        raise
                    wait = backoff ** attempt
                    logging.warning(f"Attempt {attempt} failed: {e}. Retrying in {wait}s")
                    time.sleep(wait)
            return None
        return wrapper
    return decorator

@retry(max_attempts=3, backoff=2)
def send_webhook(payload):
    # Simulated API call
    response = http_post("https://hooks.example.com/trigger", json=payload)
    response.raise_for_status()
    return response.json()

Conditional Router Pattern

def route_task(task_data):
    priority = task_data.get("priority", "low")
    match priority:
        case "critical":
            notify_slack("#alerts", task_data)
            create_jira_ticket(task_data, priority="highest")
        case "high":
            create_jira_ticket(task_data, priority="high")
            assign_to_team(task_data)
        case _:
            add_to_backlog(task_data)

Webhook Listener with Validation

from flask import Flask, request, abort

app = Flask(__name__)
SECRET = "whsec_your_webhook_secret"

@app.route("/webhook", methods=["POST"])
def handle_webhook():
    signature = request.headers.get("X-Webhook-Signature")
    if not verify_signature(request.data, signature, SECRET):
        abort(401)
    event = request.json
    if event.get("type") == "issue.created":
        run_workflow_kickoff(event["payload"])
    return {"status": "accepted"}, 202

def verify_signature(body, sig, secret):
    import hmac, hashlib
    expected = hmac.new(secret.encode(), body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, sig)

Anti-Rationalization Table

| Rationalization | Reality |

|---|---|

| "Manual is faster for one-off tasks" | One-off tasks become recurring. Automate early, save time later. |

| "I will add error handling later" | You never do. Handle errors from day one. |

| "Automation is overkill" | If you do it twice, automate it. If you do it daily, it is critical infrastructure. |

| "We will build a custom solution" | A visual workflow builder solves 90% of needs in days, not months. |

| "Automation will replace jobs" | It eliminates toil, freeing the team for high-value judgment work. |

| "It works on my machine, so it is deployed" | Production workflows need monitoring, alerting, and failure recovery the same as any service. |

Common Issues / Troubleshooting

| Issue | Root Cause | Solution |

|---|---|---|

| Workflow runs but no data is transformed | Input mapping mismatches between trigger output fields and action input fields | Inspect the data sample at each step. Use formatter/mapper modules to reshape field names and types. |

| Webhook trigger never fires | Firewall blocks inbound connection, or webhook URL is incorrect | Verify endpoint is publicly reachable via curl. Check platform webhook logs for delivery attempts. |

| Retry loop consumes all quota | A permanent error (invalid credentials, bad payload shape) triggers infinite retries | Set a max retry count (3-5) and route failures to an error queue or dead-letter channel. |

| Workflow times out on large datasets | Default timeout too low for batch processing | Split large arrays into batches of 100-500 items. Increase timeout or switch to an async pattern. |

| OAuth token expired silently | Token refresh not configured or refresh token revoked | Implement token refresh before each workflow run. Set up credential expiry monitoring and alerts. |

| Inconsistent results between runs | Non-idempotent operations (INSERT without checking duplicates) | Make every action idempotent: use UPSERT, check-before-create, or hash-based dedup. |

| n8n node returns "502 Bad Gateway" | Downstream API is overloaded or temporarily unreachable | Add retry with exponential backoff at the node level. Route to fallback API if available. |

Process

Preparation

Execution

Stewardship

Monetization

| Approach | Timeframe | Description |

|---|---|---|

| Workflow Automation Agency | 3-6 months | Build and maintain automation pipelines for SMBs (Zapier/Make/n8n setups). Charge flat monthly retainer per workflow. Target local businesses with recurring tasks: invoicing, inventory sync, lead routing. |

| n8n Template Marketplace | 1-3 months | Sell production-ready n8n workflow templates on Gumroad or GitHub Marketplace. Each template solves a common integration (Shopify→QuickBooks, Calendly→CRM, Typeform→Sheets). Price $29-99 per template. |

| Workflow Consulting & Audit | 1-2 months per client | Audit an organization's manual processes and deliver a prioritized automation roadmap. Include ROI calculations. Follow up with implementation services at $150-250/hr. |

| Vertical SaaS Integration | 6-12 months | Build and sell a pre-configured workflow bundle for a specific vertical (real estate lead management, dental office scheduling, e-commerce fulfillment). Bundle as a monthly SaaS add-on. |

| Self-Hosted n8n Infrastructure | 2-4 months | Offer managed n8n hosting on a client's infrastructure — Docker/Kubernetes setup, credential management, monitoring, uptime SLA. Charge per-seat or per-workflow per month. |

| Training & Workshops | 1-2 weeks | Deliver hands-on workflow automation workshops (virtual or on-site): "Automate Your Business in 30 Days" cohort course, corporate team training, or YouTube monetized tutorials. |

Verification

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.