# Replace team variable with another variable in scenario using the Make API

**URL:** <https://community.make.com/t/replace-team-variable-with-another-variable-in-scenario-using-the-make-api/45466>\
**Category:** Questions\
**Tags:** set-variable\
**Created:** [July 10, 2024, 2:36pm UTC](https://community.make.com/t/replace-team-variable-with-another-variable-in-scenario-using-the-make-api/45466 "2024-07-10T14:36:25Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alejandro19](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@Alejandro19](https://community.make.com/u/Alejandro19)\
**Post date:** [July 10, 2024, 2:36pm UTC](https://community.make.com/t/replace-team-variable-with-another-variable-in-scenario-using-the-make-api/45466/1 "2024-07-10T14:36:26Z")

</div>

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?

 ![Screenshot 2024-07-10 at 10.33.05 AM](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/1/8/18b26601463ac74818b32beeda6216179b8193be.png)  
 ![Screenshot 2024-07-10 at 10.31.12 AM](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/f/3/f343b8508f818a92097a19cb9eda3f7cca5ffa78.jpeg)  
 ![Screenshot 2024-07-10 at 10.32.32 AM](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/4/7/47be8bc141ff327af0a9a3466691321d43250db3.jpeg)

---

<div class="post-metadata">

**Author:** ![Henk-Blue\_Marker](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/henk-blue_marker/32/89127_2.png) [@Henk-Blue\_Marker](https://community.make.com/u/Henk-Blue_Marker)\
**Post date:** [July 10, 2024, 4:31pm UTC](https://community.make.com/t/replace-team-variable-with-another-variable-in-scenario-using-the-make-api/45466/2 "2024-07-10T16:31:45Z")

</div>

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:

 ![Scherm­afbeelding 2024-07-10 om 18.30.15](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/1/5/1581b3cdd4746c4ef6e46792e84a71ca2baf3c87.png)

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

---

<div class="post-metadata">

**Author:** ![Alejandro19](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@Alejandro19](https://community.make.com/u/Alejandro19)\
**Post date:** [July 10, 2024, 5:19pm UTC](https://community.make.com/t/replace-team-variable-with-another-variable-in-scenario-using-the-make-api/45466/3 "2024-07-10T17:19:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Alejandro19](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@Alejandro19](https://community.make.com/u/Alejandro19)\
**Post date:** [July 10, 2024, 5:28pm UTC](https://community.make.com/t/replace-team-variable-with-another-variable-in-scenario-using-the-make-api/45466/4 "2024-07-10T17:28:34Z")

</div>

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

 ![Screenshot 2024-07-10 at 1.20.59 PM](https://europe1.discourse-cdn.com/flex013/uploads/make/original/3X/d/f/df41deedf491c3fc071a5799d400e051f86c9fa7.png)

---

<div class="post-metadata">

**Author:** ![Henk-Blue\_Marker](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/henk-blue_marker/32/89127_2.png) [@Henk-Blue\_Marker](https://community.make.com/u/Henk-Blue_Marker)\
**Post date:** [July 10, 2024, 6:04pm UTC](https://community.make.com/t/replace-team-variable-with-another-variable-in-scenario-using-the-make-api/45466/5 "2024-07-10T18:04:40Z")

</div>

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/scenarios-scenarioId-run-post)  
[https://www.make.com/en/api-documentation/teams-teamId-variables-get](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

---

<div class="post-metadata">

**Author:** ![samliew](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/samliew/32/13327_2.png) [@samliew](https://community.make.com/u/samliew)\
**Post date:** [July 11, 2024, 3:08am UTC](https://community.make.com/t/replace-team-variable-with-another-variable-in-scenario-using-the-make-api/45466/6 "2024-07-11T03:08:06Z")

</div>

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:

```auto
\{\{var.team.variable\}\}

```

[samliew](https://samliew.com/services) – [request private consultation](https://samliew.com/request-quote?ServiceType=Automation%20Consultation&Referrer=Make)

> Join the [Make Fans](https://samliew.com/make-discord-invite) Discord server to [chat](https://samliew.com/make-discord-invite) with other makers!

---

<div class="post-metadata">

**Author:** ![Alejandro19](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@Alejandro19](https://community.make.com/u/Alejandro19)\
**Post date:** [July 11, 2024, 3:35am UTC](https://community.make.com/t/replace-team-variable-with-another-variable-in-scenario-using-the-make-api/45466/7 "2024-07-11T03:35:10Z")

</div>

I already tried, but it doesn’t work either. Thanks anyway

---

<div class="post-metadata">

**Author:** ![Make\_Bot](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/make_bot/32/14661_2.png) [@Make\_Bot](https://community.make.com/u/Make_Bot)\
**Post date:** [October 9, 2024, 3:37am UTC](https://community.make.com/t/replace-team-variable-with-another-variable-in-scenario-using-the-make-api/45466/8 "2024-10-09T03:37:22Z")

</div>


