{"record":{"id":"c71e3b1e8da78619","repo":"RocketChat/Rocket.Chat","slug":"integration-called-without-room-or-message","errorCode":null,"errorMessage":"Integration called without room or message","messagePattern":"Integration called without room or message","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"apps/meteor/server/lib/integrations/lib/triggerHandler.ts","lineNumber":268,"sourceCode":"\t}\n\n\tmapEventArgsToData(data: IntegrationData, { event, message, room, owner, user }: ArgumentsObject) {\n\t\t/* The \"services\" field contains sensitive information such as\n\t\tthe user's password hash. To prevent this information from being\n\t\tsent to the webhook, we're checking and removing it by destructuring\n\t\tthe user and owner objects while discarding the \"services\" field.\n\t\t*/\n\n\t\tconst omitServicesField = (object: IUser) => {\n\t\t\tconst { services, ...objectWithoutServicesField } = object;\n\t\t\treturn objectWithoutServicesField;\n\t\t};\n\n\t\tconst userWithoutServicesField = user?.services ? omitServicesField(user) : user;\n\t\tconst ownerWithoutServicesField = owner?.services ? omitServicesField(owner) : owner;\n\n\t\tif (!room || !message) {\n\t\t\toutgoingLogger.warn({ msg: 'Integration called without room or message', event });\n\t\t\treturn;\n\t\t}\n\n\t\tswitch (event) {\n\t\t\tcase 'sendMessage':\n\t\t\t\tdata.channel_id = room._id;\n\t\t\t\tdata.channel_name = room.name;\n\t\t\t\tdata.message_id = message._id;\n\t\t\t\tdata.timestamp = message.ts;\n\t\t\t\tdata.user_id = message.u._id;\n\t\t\t\tdata.user_name = message.u.username;\n\t\t\t\tdata.text = message.msg;\n\t\t\t\tdata.siteUrl = settings.get('Site_Url');\n\n\t\t\t\tif (message.alias) {\n\t\t\t\t\tdata.alias = message.alias;\n\t\t\t\t}\n","sourceCodeStart":250,"sourceCodeEnd":286,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0/apps/meteor/server/lib/integrations/lib/triggerHandler.ts#L250-L286","documentation":"mapEventArgsToData refuses to build the webhook payload unless BOTH a room and a message object exist, for every event. In practice only sendMessage and fileUploaded attach a message in eventNameArgumentsToObject, so integrations subscribed to roomCreated, roomArchived, roomJoined, roomLeft or userCreated typically hit this guard and never receive a POST - the handler returns before mapping any data.","triggerScenarios":"Any outgoing integration whose event carries room/user/owner but no message (all room lifecycle events and userCreated): the guard fires, mapEventArgsToData returns, and executeTriggerUrl proceeds with an empty data object - no meaningful webhook payload is delivered.","commonSituations":"Admins wiring outgoing webhooks to roomJoined/userCreated and seeing no deliveries; integration History showing the trigger matched but no HTTP call data; confusion because sendMessage integrations on the same server work fine.","solutions":["Use sendMessage (or fileUploaded) events for webhook integrations - these reliably carry room+message","For room/user lifecycle reactions, use server-side hooks or streams instead of outgoing integrations","Patch mapEventArgsToData in a fork to require room+message only for message-bearing events","Confirm via the integration History: entries that never reach 'mapped-args-to-data' took this early return"],"exampleFix":"// before (server/lib/integrations/lib/triggerHandler.ts)\nif (!room || !message) {\n  outgoingLogger.warn({ msg: 'Integration called without room or message', event });\n  return;\n}\n\n// after - only message-bearing events need a message\nconst MESSAGE_EVENTS = new Set(['sendMessage', 'fileUploaded']);\nif (!room || (MESSAGE_EVENTS.has(event) && !message)) {\n  outgoingLogger.warn({ msg: 'Integration called without room or message', event });\n  return;\n}","handlingStrategy":"validation","validationCode":"const MESSAGE_EVENTS = new Set(['sendMessage', 'fileUploaded']);\nconst willIntegrationFire = (event: string): boolean => MESSAGE_EVENTS.has(event);\nif (!willIntegrationFire(integration.event)) {\n  // pick a sendMessage-based integration or another mechanism - lifecycle events carry no message payload\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Default to sendMessage-based integrations - they receive the full room+message payload","Do not assume room/user lifecycle events deliver webhooks; verify with the integration History","Watch server logs for this exact warn when integrations mysteriously stop firing"],"tags":["integrations","outgoing-webhook","events","payload"],"backgroundTag":"missing-event-payload","analyzedSha":"b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0","analyzedAt":"2026-08-18T15:26:39.429Z","contentChangedAt":"2026-08-18T15:26:39.429Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}