The usual way to integrate Mendix with an AI workflow in n8n is to expose the n8n workflow through a Webhook endpoint and then call that endpoint from a Mendix microflow using Call REST or a Consumed REST Service. In n8n, make sure the workflow returns the final AI response in the webhook response. In Mendix, keep the REST call inside a dedicated microflow, send the payload as JSON, and map the response back into your domain model. Also make sure you use the production webhook URL in n8n, not the test URL. If needed, add authentication headers and centralize error handling in the microflow. For this kind of integration, webhook + REST is usually the cleanest and most maintainable pattern.
https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.webhook/
https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.webhook/workflow-development/
https://docs.n8n.io/hosting/configuration/configuration-examples/webhook-url/
https://docs.mendix.com/refguide/call-rest-action/
https://docs.mendix.com/refguide/consumed-rest-services/
https://docs.mendix.com/refguide/json-structures/
If this resolves your issue, please mark the answer as accepted so it can help others facing the same problem.