Triggers and webhooks

Starting an Aimogen Pro OmniBlock workflow from a WordPress event, an incoming webhook, an AI form submission or the chatbot.

By default a workflow runs on a schedule or when you press Run Now. Trigger blocks let something else start it.

WordPress Event Trigger#

wp_event_trigger starts the workflow when a WordPress event fires — a post is published, a user registers, an order completes, a comment is posted.

Configure which event, and any conditions that must hold. The event data is available to later blocks.

Use it for reactive automation: enrich every new post, welcome every new user, summarise every completed order.

Webhook Listener#

webhook_fire lets an external system start the workflow with an HTTP request.

Enabling webhooks#

Webhooks are off by default. Turn on Settings › OmniBlocks › Enable OmniBlocks Webhook Functionality, which registers the REST route:

POST /wp-json/omniblock/v1/webhook
GET  /wp-json/omniblock/v1/webhook

Calling it#

bash
curl -X POST "https://example.com/wp-json/omniblock/v1/webhook" \
  -H "Content-Type: application/json" \
  -d '{
        "omniblockid": "5_a1b2c3d4",
        "apikey": "YOUR_WEBHOOK_KEY",
        "topic": "Sustainable packaging trends"
      }'
ParameterMeaning
omniblockidThe workflow identifier plus its webhook ID, joined by an underscore. Shown in the block configuration
apikeyThe webhook key configured on the block
anything elsePassed through and available as %%webhook_data_<id>%%

The omniblockid must contain exactly one underscore. Malformed values return Incorrect format for OmniBlock IDs.

%%webhook_url%% inside the builder renders the full URL for the current workflow.

Security#

The route validates the API key in its permission callback. Turn the feature off entirely when you are not using it.

See Webhooks for the outbound direction.

AI Forms Trigger#

ai_forms_omniblock runs the workflow when an AI Form is submitted. The full submission is available as %%ai_forms_full_input_<id>%%, and individual fields as %%field_id%% using the IDs you assigned in the form builder.

This is how you build front-end tools that do more than a single AI call: a form that scrapes a URL the visitor supplies, analyses it, and emails a report.

AI Chatbot Trigger#

ai_chatbot_omniblock runs the workflow from the chatbot. The conversation input is available as %%ai_chatbot_full_input_<id>%%.

Two ways it is used:

  • The visitor asks for something and the chatbot invokes a workflow to do it.
  • The AI decides, through the aimogen_execute_omniblock_rule chatbot extension.

The chatbot setting OmniBlock List Allowed For The AI To Execute restricts which workflows the AI may run. Set it. Without a restriction, an AI with the extension enabled can run any workflow, including ones that publish or send email.

Choosing a trigger#

You wantUse
Regular unattended runsThe schedule. See Running and scheduling
React to something in WordPressWordPress Event Trigger
An external system to start itWebhook Listener
A visitor to start it from a formAI Forms Trigger
Conversational invocationAI Chatbot Trigger

Still stuck? Open a support ticket and include the diagnostics from Aimogen Pro › System & Logs › System Info.