Hi Team,
I’m currently facing an issue while trying to create a scheduled event in a Freshworks serverless custom app.
I am using $schedule.create() inside my app, but when I try to create the schedule, I get the following error:
{
status: 400,
message: 'The app has not registered an onScheduledEvent'
}
Below is the code I am using to create the schedule:
await $schedule.create({
name: `waiting_on_customer__${conversation_id}`.slice(0, 30),
data: {
conversation_id,
type: "alive_scenario",
time: now,
user_id,
},
schedule_at: new Date(
Date.now() + Number(resolved_delay) * 60 * 1000,
).toISOString(),
});
My manifest.json configuration is as follows:
{
"platform-version": "3.0",
"modules": {
"common": {
"events": {
"onScheduledEvent": {
"handler": "onScheduledEventHandler"
}
},
"requests": {
"postMessage": {},
"updateConversation": {},
"getConversation": {},
"getMessage": {}
}
},
"chat_conversation": {
"events": {
"onConversationUpdate": {
"handler": "onConversationUpdateHandler"
}
}
}
},
"engines": {
"node": "24.11.1",
"fdk": "10.0.0"
}
}
I have already added onScheduledEvent in the common.events section, but the platform still returns the above error while creating the schedule.
Could you please help me understand:
-
Whether
onScheduledEventis supported in a serverless custom app under this module setup -
If there is any issue with my
manifest.jsonconfiguration -
Whether I need any additional setup for the scheduled event handler to be registered properly
-
If Node.js
24.11.1or FDK10.0.0could be causing any compatibility issue
Any guidance would be greatly appreciated.
Thanks in advance.