RocketChat/Rocket.Chat · error

Trigger is not configured to use an external service

Error message

Trigger is not configured to use an external service

What it means

After the trigger is found, the call route requires trigger.actions to be non-empty and the trigger to satisfy isExternalServiceTrigger (an external-service action); otherwise it throws 'Trigger is not configured to use an external service'. The trigger exists but is the wrong kind — e.g. a standard send-message trigger.

Solutions

  1. Open the trigger (Administration -> Omnichannel -> Triggers) and configure an external-service action with Service URL, timeout and fallback message.
  2. Use the id of a trigger that is actually configured for external service.
  3. After editing, retry and expect the same payload contract as the /external-service/test endpoint.

Example fix

// before: trigger.actions = [{ name: 'send-message', params: { msg: 'Hi' } }]
await api.post(`/v1/livechat/triggers/${id}/external-service/call`, body);
// -> 'Trigger is not configured to use an external service'

// after: give the trigger an external-service action
// actions: [{ name: 'external-service', params: { serviceUrl, serviceTimeout: 5000, serviceFallbackMessage } }]
await api.post(`/v1/livechat/triggers/${id}/external-service/call`, body);
Defensive patterns

Strategy: validation

Validate before calling

import { isExternalServiceTrigger } from '@rocket.chat/core-typings';

const { triggers } = await api.get('/v1/livechat/triggers', { params: { count: 0 } });
const trigger = triggers.find((t) => t._id === triggerId);
if (!trigger?.actions?.length || !isExternalServiceTrigger(trigger)) {
  throw new Error('Trigger must have an external-service action before calling');
}
await api.post(`/v1/livechat/triggers/${trigger._id}/external-service/call`, body);

Type guard

import { isExternalServiceTrigger } from '@rocket.chat/core-typings';

const isCallableExternalTrigger = (t: unknown): boolean =>
  !!t && Array.isArray((t as { actions?: unknown[] }).actions) &&
  (t as { actions: unknown[] }).actions.length > 0 && isExternalServiceTrigger(t as any);

Try / catch

try {
  await api.post(`/v1/livechat/triggers/${triggerId}/external-service/call`, body);
} catch (e) {
  if (e?.response?.data?.error === 'Trigger is not configured to use an external service') {
    // edit the trigger to use an external-service action, then retry
  } else throw e;
}

Prevention

When it happens

Trigger: POST /api/v1/livechat/triggers/<id>/external-service/call for a trigger whose actions array is empty or whose first action is not an external-service action (sender/message actions only).

Common situations: Calling the external-service endpoint with a regular message trigger's id; triggers created before external-service actions existed and never migrated; action lists emptied by an editing mistake.

Related errors


AI-assisted analysis of RocketChat/Rocket.Chat@b2c16d5842 (2026-08-18). Data as JSON: /api/errors/27991307f33ad91d. Report an issue: GitHub.

Appendix: source

Thrown at apps/meteor/ee/server/api/v1/omnichannel/triggers.ts:86

			numRequestsAllowed: 10,
			intervalTimeInMS: 60000,
		},
		validateParams: isLivechatTriggerWebhookCallParams,
		license: ['livechat-enterprise'],
	},
	{
		async post() {
			const { _id: triggerId } = this.urlParams;
			const { token: visitorToken, extraData } = this.bodyParams;

			const trigger = await LivechatTrigger.findOneById(triggerId);

			if (!trigger) {
				throw new Error('Invalid trigger');
			}

			if (!trigger?.actions.length || !isExternalServiceTrigger(trigger)) {
				throw new Error('Trigger is not configured to use an external service');
			}

			const { params: { serviceTimeout = 5000, serviceUrl, serviceFallbackMessage = 'trigger-default-fallback-message' } = {} } =
				trigger.actions[0];

			if (!serviceUrl) {
				throw new Error('Invalid service URL');
			}

			const token = settings.get<string>('Livechat_secret_token');

			if (!token) {
				throw new Error('Livechat secret token is not configured');
			}

			const body = {
				metadata: extraData,
				visitorToken,

View on GitHub (pinned to b2c16d5842)