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
| Field | Description | Type / Options | 
|---|---|---|
| Label | Custom name for the action | String | 
| Select connection | Choose an existing MySQL connection or create new | Connection | 
| SQL | The SQL statement to execute | String (custom query) | 
| Inputs | Define input parameters for the query | Manual toggle → Name & Type (NUMBER, STRING, BYTE, DATE, DATETIME, BOOLEAN, OBJECT, ARRAY, ANY) | 
| Schema (Inputs) | Schema mapping for query parameters (optional) | Select Schema | 
| Outputs | Define output structure from query result | Manual 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