Problem:
In my flow, I have 10 constant values. I am using these constant values from many actions in the flow. To define each constant value in the flow, I used "Initialize Variable" action and stored the value. So for 10 constant values, I have created 10 "Initialize Variable" actions as shown below:
All the above "Initialize Variable" actions contains constant values ONLY.
Every time, when the flow executes, it send 10 API calls for these variable initialization.
Solution:
To improve the performance by reducing the number of API calls to initialize the constant values, you can use below method:
Step 1: Use Compose method and create a JSON object with all constant values as below:
Step 2: Use "Parse JSON" action to parse the output of above Compose action
Step 3: Now, you can start using the constant values directly from other actions
Limitations:
The above approach will not work if you want to change the values of the constant.
Regards
Krishna Rachakonda