MinistryPlatform icon

MinistryPlatform

Consume MinistryPlatform API for church management data operations

Actions6

Overview

This node allows users to interact with the MinistryPlatform API, specifically focusing on executing stored procedures within the platform. The "Execute" operation under the "Stored Procedure" resource enables running a specified stored procedure by passing JSON-formatted parameters. This is useful for performing complex queries or operations predefined in the database that go beyond simple CRUD actions.

Common scenarios include:

  • Running custom reports or data retrievals encapsulated as stored procedures.
  • Executing business logic implemented in stored procedures with dynamic input parameters.
  • Integrating complex backend operations into an n8n workflow without manual SQL coding.

For example, a user might execute a stored procedure named api_Common_GetLookupRecords with parameters specifying domain and congregation IDs to retrieve filtered lookup data relevant to their church management system.

Properties

Name Meaning
Stored Procedure Name of the stored procedure to execute (e.g., api_Common_GetLookupRecords).
Parameters JSON object containing key-value pairs of parameters to pass to the stored procedure. Example: {"DomainID": 1, "Congregation_ID": 5}.

Output

The node outputs the result of the executed stored procedure as JSON data. The structure of this JSON depends on the specific stored procedure called and its return format but generally represents the data returned from the database operation.

If the stored procedure returns tabular data, the output will be an array of objects where each object corresponds to a row with column names as keys.

No binary data output is indicated for this operation.

Dependencies

  • Requires an active connection to the MinistryPlatform API.
  • Needs an API authentication credential configured in n8n to authorize requests.
  • The node uses HTTP methods (GET and POST) to communicate with the MinistryPlatform endpoints.
  • Proper permissions in MinistryPlatform to execute stored procedures are necessary.

Troubleshooting

  • Invalid JSON format in parameters: If the JSON string provided in the "Parameters" field is malformed, the node throws an error indicating invalid JSON. To fix this, ensure the JSON syntax is correct (proper quotes, commas, braces).
  • API errors: Errors returned from the MinistryPlatform API (e.g., permission denied, stored procedure not found) will propagate as node errors. Verify the stored procedure name and user permissions.
  • Empty or missing stored procedure name: Ensure the "Stored Procedure" property is filled; otherwise, the request will fail.
  • Incorrect parameter keys or values: Passing parameters that do not match the stored procedure's expected inputs may cause execution failure or unexpected results.

Links and References

Discussion