Low-code platforms like Ragic allow businesses to build databases and CRM dashboards quickly. However, when complex business logic is needed—like running custom web scrapers, pricing calculators, or calling private APIs—low-code scripting tools hit limitations.
We solve this by using Ragic's custom JavaScript event hooks to call AWS API Gateway, bridging low-code databases with serverless workflows.
1. Hooking Ragic Events
Ragic allows you to write custom JavaScript that runs on events like onSalesOpportunitySave or onBOMUpload. When an opportunity is saved, Ragic JS gathers the record data and executes an HTTP POST request to our private API Gateway:
// Ragic JS Custom Action Hook
function onSalesOpportunitySave(record) {
var payload = {
opportunityId: record.getFieldValue("Opportunity ID"),
partNumbers: record.getFieldValue("BOM Part Numbers"),
userEmail: record.getFieldValue("Sales Agent Email")
};
// Call private API Gateway
var url = "https://api-gateway.cpunto.com/notification";
var res = HTTP.post(url, JSON.stringify(payload), {
"Content-Type": "application/json",
"Authorization": "Bearer private_token"
});
}
2. Decoupling in AWS
The API Gateway triggers our notification-messages AWS Lambda function. Instead of running the price calculations synchronously, the Lambda writes the payload to an SNS topic and returns an HTTP 200 immediately. Downstream listeners consume the SNS event to compute pricing and update the Ragic record asynchronously via the Ragic REST API, keeping the low-code interface responsive.