sim icon indicating copy to clipboard operation
sim copied to clipboard

[REQUEST] Mailgun integration: support EU region (api.eu.mailgun.net)

Open renegeorgi opened this issue 2 months ago • 1 comments

Is your feature request related to a problem? Please describe.

The Mailgun integration always calls the US API endpoint. Mailgun EU-region domains must use https://api.eu.mailgun.net, so with an EU domain and a correct API key and domain, requests are rejected with 401 Unauthorized. There is currently no way to select the region in the Mailgun block.

Current behavior: all 8 Mailgun tools hardcode the US base URL, for example apps/sim/tools/mailgun/send_message.ts:

url: (params) => `https://api.mailgun.net/v3/${params.domain}/messages`,

The same hardcoded https://api.mailgun.net/v3/... prefix is used in get_domain.ts, list_domains.ts, get_message.ts, list_messages.ts, create_mailing_list.ts, get_mailing_list.ts and add_list_member.ts. Neither the block (apps/sim/blocks/blocks/mailgun.ts) nor the tool params (apps/sim/tools/mailgun/types.ts) has a region or base URL input. Checked on main and on the latest release v0.9.5.

Describe the solution you'd like

Add an optional region input (US / EU) to the Mailgun block and to all Mailgun tools, or alternatively an optional baseUrl input. The default stays US, so existing workflows are unaffected. EU maps to https://api.eu.mailgun.net. The base URL could be resolved in one small shared helper that every tool's request.url uses.

Describe alternatives you've considered

Workaround: use the API block with Basic auth (user api, password = the Mailgun API key) against https://api.eu.mailgun.net/v3/<domain>/messages. This works for sending but loses the dedicated Mailgun block, its operations and its field handling.

Additional context

  • Mailgun API overview (regions and base URLs): https://documentation.mailgun.com/docs/mailgun/api-reference/api-overview
  • Environment: self-hosted (Docker via Coolify), Sim version v0.9.5 (latest release at the time of writing, published 2026-09-29)

renegeorgi avatar Sep 29 '26 18:09 renegeorgi

This looks done by #8423 (merged), which added US/EU region selection to the Mailgun block and tools (getMailgunApiBaseUrl in apps/sim/tools/mailgun/utils.ts). I think this can be closed.

iakshkhurana avatar Oct 01 '26 18:10 iakshkhurana