Integromat app with different URL domains

332 Views Asked by At

In the "Base" of my app, I have this URL https://api.opsgenie.com/v2. But for Europe, I must use https://api.eu.opsgenie.com/v2. How to let the user choose his region? I think I can delete the URL from the "Base" and add the URL as a parameter for every module. But I hope there is must be better UX?

1

There are 1 best solutions below

1
On BEST ANSWER

You can allow users to set the region in the connection and then use the value from the connection.

Connection parameters:

[
    {
        "name": "region",
        "label": "Region",
        "type": "select",
        "required": true,
        "options": [
            {
                "label": "US",
                "value": "api"
            },
            {
                "label": "EU",
                "value": "api.eu"
            }
        ]
    }
]

Base:

{
    "baseUrl": "https://{{connection.region}}.opsgenie.com/v2"
}