# Can I populate a drop-down list from an external API call?

**URL:** <https://community.feathery.io/t/can-i-populate-a-drop-down-list-from-an-external-api-call/284>\
**Category:** General Discussion\
**Created:** [November 13, 2023, 3:10am UTC](https://community.feathery.io/t/can-i-populate-a-drop-down-list-from-an-external-api-call/284 "2023-11-13T03:10:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cleary](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.feathery.io/cleary/32/187_2.png) [@cleary](https://community.feathery.io/u/cleary)\
**Post date:** [November 13, 2023, 3:10am UTC](https://community.feathery.io/t/can-i-populate-a-drop-down-list-from-an-external-api-call/284/1 "2023-11-13T03:10:32Z")

</div>

Hi, I’m wondering if there’s a way to populate the selection list for a (eg) multi-select dropdown field from an external api?  
I can see it’s possible to manually bulk add options, but ideally I’d like to source/populate it via an external api so any new options get automatically updated (so client-side, I’m thinking)

---

<div class="post-metadata">

**Author:** ![peter](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.feathery.io/peter/32/7_2.png) [@peter](https://community.feathery.io/u/peter)\
**Post date:** [November 13, 2023, 5:33am UTC](https://community.feathery.io/t/can-i-populate-a-drop-down-list-from-an-external-api-call/284/2 "2023-11-13T05:33:51Z")

</div>

Yes, here’s an example of how you can use logic to populate the options of a dropdown from an external service [https://docs.feathery.io/platform/build-forms/logic/advanced/examples/api-connectors/dynamic-dropdown-options](https://docs.feathery.io/platform/build-forms/logic/advanced/examples/api-connectors/dynamic-dropdown-options)

---

<div class="post-metadata">

**Author:** ![cleary](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.feathery.io/cleary/32/187_2.png) [@cleary](https://community.feathery.io/u/cleary)\
**Post date:** [November 13, 2023, 5:47am UTC](https://community.feathery.io/t/can-i-populate-a-drop-down-list-from-an-external-api-call/284/3 "2023-11-13T05:47:54Z")

</div>

Thanks @peter ! My search-fu failed me 🙂

---

<div class="post-metadata">

**Author:** ![cleary](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.feathery.io/cleary/32/187_2.png) [@cleary](https://community.feathery.io/u/cleary)\
**Post date:** [July 16, 2024, 5:00am UTC](https://community.feathery.io/t/can-i-populate-a-drop-down-list-from-an-external-api-call/284/4 "2024-07-16T05:00:25Z")

</div>

For reference only, in case someone runs across this:

Super simple rules example grabbing one column of data (with a heading) and populating a drop-down list (called `Dropdown1`)

```auto
const response = await fetch('https://sheets.googleapis.com/v4/spreadsheets/SHEETS_ID/values/A2:A?key=API_KEY');
const names = await response.json();
Dropdown1.options = names.values.flat(1);

```

The datais returned as a 2d array, in this example using `flat(1)` is a really simple way to get it formatted for use, note that it will not work with multiple columns though.
