How to make dynamic input parameters based on another query response in an Integromat app?

1k Views Asked by At

I am implementing an API that has an endpoint which returns a list of custom fields for objects such as company, lead, etc. When creating a lead, the user should be able to enter custom fields alongside the hardcoded ones. How can this be done dynamically in the Mappable parameters of a module?

1

There are 1 best solutions below

2
On BEST ANSWER

You can create an RPC (procedure for getting of dynamic input fields via API) and combine it with static parameters like in the example below:

Mappable parameters:

[
    {
        "name": "id",
        "type": "uinteger",
        "label": "Static parameter"
    },
    "rpc://getDynamicFields"
]

Ref: https://docs.integromat.com/apps/structure-blocks/expect#rpc

How to create RPC you can find here: https://docs.integromat.com/apps/app-structure/rpcs#fields-rpc