MinistryPlatform icon

MinistryPlatform

Consume MinistryPlatform API for church management data operations

Actions6

Overview

This node allows users to interact with the MinistryPlatform API, specifically enabling execution of stored procedures within the platform. The "Execute" operation under the "Stored Procedure" resource lets you run any stored procedure by name and pass parameters as a JSON object. This is useful for performing complex queries or operations predefined in the MinistryPlatform database that go beyond simple CRUD actions.

Common scenarios include:

  • Running custom reports or data retrievals encapsulated in stored procedures.
  • Executing business logic implemented as stored procedures with dynamic input parameters.
  • Integrating MinistryPlatform workflows that require server-side processing via stored procedures.

For example, you might execute a stored procedure named api_Common_GetLookupRecords with parameters specifying domain or congregation IDs to retrieve filtered lookup data.

Properties

Name Meaning
Stored Procedure The exact name of the stored procedure to execute (e.g., api_Common_GetLookupRecords).
Parameters A JSON object containing key-value pairs representing 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 depends on the stored procedure's implementation but generally will be an array or object representing the returned records or status information.

If the stored procedure returns binary data, it would be included in the output accordingly, but this node primarily handles JSON responses from the API.

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 for listing procedures, POST for executing) to communicate with the MinistryPlatform endpoints.

Troubleshooting

  • Invalid JSON format in parameters: If the "Parameters" field contains malformed JSON, the node throws an error indicating invalid JSON format. Ensure the JSON syntax is correct before running.
  • Stored procedure not found or unauthorized: If the specified stored procedure name does not exist or the API user lacks permission, the request may fail. Verify the procedure name and API credentials.
  • Empty or unexpected output: The output depends on the stored procedure's design. If no data is returned, confirm the procedure's behavior and input parameters.
  • API connectivity issues: Network problems or incorrect API credentials can cause failures. Check your API key and network access.

Links and References

  • MinistryPlatform API documentation (refer to your organization's API docs for stored procedures)
  • General guidance on using stored procedures in SQL Server or your backend database system

Discussion