Hi guys, i need help pls, i have several custom variables in my organization, and I need to use them as needed. For this, I am trying to reference them from the API used to run the scenario. However, when I put the variable name, for example, {{var.team.transactional_email_template}}
, it doesn’t work and gives me the literal text. Any idea how I could achieve this?
Hi @Alejandro19,
Welcome to the Make community. It seems like you are setting a variable only? And the variable value is a string, which is composed of the text you give in.
If you have custom variables, you can find them here:
There is no need to declare the variable first, you can select and use the variable as you would with any other variable/function/pill.
Did I understand you correctly?
Cheers,
Henk
Sorry, I think I didn’t explain myself correctly. My problem is that I have several custom variables, and I need the ability to change them without having to access Make directly. For example, by referencing them from an external API call. But the issue is that when I reference them from an external API call, they don’t work within Make; it only shows the variable name instead of the value
For example, I have these two custom variables in this simple scenario that contains a single module, “set variable.” The problem is that I need to invoke one of these two variables dynamically. In one execution of the scenario, I might need variable 1, or I might need variable 2. I am looking for a way to dynamically invoke var1 or var2 as needed without having to enter Make and edit the scenario
Hi @Alejandro19,
Thank you for your explanation, I understand better what you are trying to achieve now. I have no experience with using the API to run a scenario and dynamically filling in variables.
In the documentation, I see that there are possibilities to insert input parameters dynamically. It is possible to fetch the team variables by API too, so you could fetch the variables and insert them through input parameters. Although, this is a workaround.
https://www.make.com/en/api-documentation/scenarios-scenarioId-run-post
https://www.make.com/en/api-documentation/teams-teamId-variables-get
I do not know what is expected when inserting variables through API, sorry.
Cheers,
Henk
Welcome to the Make community!
I have updated the title to more accurately reflect what you’re trying to do.
Perhaps you may need to escape the brackets like this:
\{\{var.team.variable\}\}
samliew – request private consultation
Join the Make Fans Discord server to chat with other makers!
I already tried, but it doesn’t work either. Thanks anyway