Skip to content

Workflow

Pro built-in module. Visual automation for your site. A trigger, such as a new post, a new order or a schedule, starts a chain of steps: AI writing, SEO checks, emails, post changes, social posts and more.

Open it from Automation > Workflow in the OG AI Core rail (admin.php?page=ogflow_dashboard). It has three tabs: Workflows, Runs and Settings.

Requires: an OG AI Core Pro licence.

Drafts and publishing

Every workflow has a draft and a published version. You edit the draft. Changes only go live when you click Publish. Test once runs the draft straight away so you can check each step's result.

Triggers

Group Triggers
Core Manual / Test once; On a schedule (hourly, twice daily, daily or weekly, at a time you pick); Webhook (HTTP); WordPress hook; New RSS item
WordPress When a post is published, updated or trashed; when a user registers; when a comment is posted or approved
WooCommerce When a new order comes in; when an order is completed; when an order changes status
  • Webhook (HTTP): each workflow gets its own secret address. GET is refused unless Allow GET is on. Calls are limited to 60 a minute per workflow.
  • WordPress hook: run on any action, with a priority (default 10) and number of arguments (default 1).
  • Capture next payload saves the next real webhook or hook call as sample data, without running the workflow, so you can build steps against real fields.

Steps

Group Steps
Core Condition, Branch by value, For Each, Random, Wait, Save a value, Send email, HTTP request, Log message
WordPress Get post, Get random post, Create post, Update post, Get user, Get comment, Set comment status, Get attachment URL, Get recent posts, Change post status, Set custom field, Add categories or tags, Set featured image
WooCommerce Get order, Add order note
OG AI Core Text completion, Fast text completion, Image generation, Vision (describe an image), JSON output
OG AI SEO Run SEO scan, Get SEO score, Set SEO title, Set SEO description, Get SEO insights, Get site-wide SEO summary
OG AI Code Core Execute snippet (by ID), Execute snippet (by name), Get snippet metadata, and one step per registered function
OG Social Engine Create social post, List accounts

Each plugin's steps only appear while that plugin is active.

Templates

Start from a ready-made workflow: Email Me When a Post Is Published, Weekly Digest of New Posts, Email Me About New Comments, Coin Flip (learn branching), Email Me on Every New Order, AI Thank-You Note on Completed Orders, AI Draft Writer, Turn Feeds Into Drafts, Write Excerpts Automatically, Moderate Comments With AI, Welcome New Users by Email, Weekly Content Brief and Daily SEO Report.

Settings

Setting Option Default
Email me when a live workflow fails ogflow_settings['notify_failures'] On
Email address (empty = site admin email) ogflow_settings['notify_email']

Failure emails cover live runs only, at most one per workflow per hour.

Maintenance: Export Settings, Import Settings, Show Setup Assistant and Reset Settings. Reset deletes every workflow, every run and the log.

Limits

Limit Value
For Each items 100
Wait Up to 30 days (5 seconds in test runs)
Steps per run 10,000 (500 in a test run)
Stalled run Picked up again after 30 minutes, up to 3 times
RSS trigger Up to 3 new runs per check; the last 200 items are remembered
Runs list 50 by default, up to 500

The log file is wp-content/uploads/ogflow.log. At 5 MB it is renamed to ogflow.log.1.

Developers

Tables: {prefix}ogflow_flows and {prefix}ogflow_runs.

Cron: ogflow_run_step (one event per step), ogflow_watchdog (every five minutes), ogflow_schedule_tick and ogflow_rss_tick (one per workflow).

REST namespace og-workflow/v1. Every route is for administrators (ogflow_allow_setup) except the webhook:

  • GET /integrations, /templates, /runs, /runs/<id>, /logs, /settings, /maintenance/export
  • GET, POST /flows; GET, PUT, DELETE /flows/<id>
  • POST /flows/<id>/run, /flows/<id>/publish, /flows/<id>/capture-sample, /runs/<id>/advance, /templates/<id>/install, /author, /settings, /maintenance/import, /maintenance/reset
  • DELETE /logs
  • GET, POST /hook/<token>: the public webhook. The token is checked and calls are rate limited.

Hooks:

Hook Arguments Use
ogflow_allow_setup bool $can Who may use Workflow (default manage_options).
ogflow_register_integration array $integrations Add your own triggers and steps.
ogflow_webhook_rate_limit int $limit (60), int $flow_id Webhook calls a minute. 0 turns the limit off.
ogflow_pass_budget_seconds int $seconds (20) How long one background pass may run.
ogflow_stall_seconds int $seconds (1800) When a run counts as stalled.
ogflow_run_done (action) $run_id, $flow_id, $error, $mode A run finished.
ogflow_run_failed (action) $run_id, $flow_id, $error, $mode A run failed.

MCP tools: ogflow_list_flows, ogflow_get_flow, ogflow_list_integrations, ogflow_list_runs, ogflow_get_run, ogflow_run_flow, ogflow_create_flow, ogflow_update_flow and ogflow_publish_flow. Tick Workflow under Settings > MCP > MCP Tool Sets. See MCP tools.

Modules · OG AI SEO · OG AI Code Core