{"record":{"id":"9511d33ad643b051","repo":"RocketChat/Rocket.Chat","slug":"the-integration-doesnt-have-a-room-configured-nor","errorCode":null,"errorMessage":"The Integration doesnt have a room configured nor did it provide a room to send the message to.","messagePattern":"The Integration doesnt have a room configured nor did it provide a room to send the message to\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"apps/meteor/server/lib/integrations/lib/triggerHandler.ts","lineNumber":160,"sourceCode":"\t\t\toutgoingLogger.error({ msg: 'Integration user not found', username: trigger.username });\n\t\t\treturn;\n\t\t}\n\n\t\tlet tmpRoom;\n\t\tif (nameOrId || trigger.targetRoom || message.channel) {\n\t\t\ttmpRoom =\n\t\t\t\t(await getRoomByNameOrIdWithOptionToJoin({\n\t\t\t\t\tuser,\n\t\t\t\t\tnameOrId: nameOrId || message.channel || trigger.targetRoom || '',\n\t\t\t\t\terrorOnEmpty: false,\n\t\t\t\t})) || room;\n\t\t} else {\n\t\t\ttmpRoom = room;\n\t\t}\n\n\t\t// If no room could be found, we won't be sending any messages but we'll warn in the logs\n\t\tif (!tmpRoom) {\n\t\t\toutgoingLogger.warn({\n\t\t\t\tmsg: 'The Integration doesnt have a room configured nor did it provide a room to send the message to.',\n\t\t\t\tintegrationName: trigger.name,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\toutgoingLogger.debug({ msg: 'Found room for integration', integrationName: trigger.name, roomName: tmpRoom.name, roomType: tmpRoom.t });\n\n\t\tmessage.bot = { i: trigger._id };\n\n\t\tconst defaultValues: {\n\t\t\talias: string;\n\t\t\tavatar: string;\n\t\t\temoji: string;\n\t\t\tchannel: string;\n\t\t} = {\n\t\t\talias: trigger.alias || '',\n\t\t\tavatar: trigger.avatar || '',","sourceCodeStart":142,"sourceCodeEnd":178,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0/apps/meteor/server/lib/integrations/lib/triggerHandler.ts#L142-L178","documentation":"An outgoing integration's script/handler wanted to post a message back (prepareOutgoingRequest or processOutgoingResponse returned { message }), but sendMessage could not resolve any target room: none of the script's channel, message.channel, or the integration's targetRoom could be found (or joined) by the integration user, and no fallback room object was passed. The bot message is silently dropped with only this server-side warn.","triggerScenarios":"Integration Channel field left empty and targetRoom blank while the script returns { message: {...} } with no channel; targetRoom naming a deleted or renamed room; the integration's post-as username being unable to join/access the target room (getRoomByNameOrIdWithOptionToJoin with errorOnEmpty: false returns null and falls back to a room that is itself absent).","commonSituations":"Outgoing webhook scripts written from docs that omit the channel field; rooms renamed after configuration; integration user deleted or without access; expecting replies in DMs where no fallback room exists.","solutions":["Set a valid target: fill the integration's Channel field (or script channel / message.channel) with a room name or id the integration user can access","Or return the channel from the script: return { message: { ... }, channel: '#general' }","Verify the integration's username (post as) exists and can join the configured room","Re-test from Administration -> Integrations and watch the log for the paired 'Found room for integration' line - its absence means resolution failed"],"exampleFix":"// before (integration script, prepareOutgoingRequest)\nreturn { message: { text: 'done' } };\n\n// after - always declare where the reply goes\nreturn { message: { text: 'done' }, channel: '#ops-alerts' };","handlingStrategy":"validation","validationCode":"// In the integration script: resolve the target room before returning a message\nconst room = RocketChat.cache.get('rooms').find((r) => r.name === 'ops-alerts');\nif (!room) {\n  console.log('target room missing - skipping send');\n  return; // fail fast in the script instead of relying on the server-side fallback\n}\nreturn { message: { text: 'done' }, channel: `#${room._id}` };","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always set an explicit channel on the integration or in the script response","Keep the integration's posting user valid and able to join the target room","When bot replies go missing, check the integration History - dropped sends appear only in server logs"],"tags":["integrations","outgoing-webhook","rooms","configuration"],"backgroundTag":"webhook-missing-target-room","analyzedSha":"b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0","analyzedAt":"2026-08-18T15:26:39.429Z","contentChangedAt":"2026-08-18T15:26:39.429Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}