Skip to main content

Custom

MySQL Plugin – Custom Action

Summary (SEO Meta Description):
The MySQL Plugin (Custom Action) in WeHub allows executing raw SQL queries on MySQL databases.
It supports dynamic inputs and outputs with schema validation for flexible query operations.


Overview

The Custom Action for the MySQL Plugin is used when you need to run custom SQL queries directly against a MySQL database.
This gives workflows the flexibility to perform complex queries, joins, and aggregations that go beyond the predefined Insert, Update, Delete, or Select actions.

Typical Use Cases:

  • Running custom SELECT queries with multiple joins
  • Executing aggregate functions like SUM, COUNT, or GROUP BY
  • Querying dynamic datasets where schema mapping is required
  • Fetching data with custom conditions for downstream workflow processing

⚙️ Configuration

FieldDescriptionType / Options
LabelCustom name for the actionString
Select connectionChoose an existing MySQL connection or create newConnection
SQLThe SQL statement to executeString (custom query)
InputsDefine input parameters for the queryManual toggle → Name & Type (NUMBER, STRING, BYTE, DATE, DATETIME, BOOLEAN, OBJECT, ARRAY, ANY)
Schema (Inputs)Schema mapping for query parameters (optional)Select Schema
OutputsDefine output structure from query resultManual toggle → Name & Type (NUMBER, STRING, BYTE, DATE, DATETIME, BOOLEAN, OBJECT, ARRAY, ANY)
Schema (Outputs)Schema mapping for query results (optional)Select Schema

FAQ

Q: When should I use the Custom Action instead of Select/Insert/Update?
A: Use the Custom Action when your query is too complex for predefined actions, such as when using joins, aggregates, or subqueries.

Q: Can I use schema validation with custom queries?
A: Yes. You can define both input schemas (parameters) and output schemas (query results) for validation and mapping.

Q: Are SQL injections a risk here?
A: Inputs should always be mapped with schema validation to prevent injection risks. WeHub ensures inputs are handled securely.


Keywords: WeHub MySQL Plugin, MySQL Custom Query, MySQL Workflow Automation, MySQL SQL Integration