# How to retrieve the results of the integration test of an external API to place it in a collection

**URL:** <https://forum.adalo.com/t/how-to-retrieve-the-results-of-the-integration-test-of-an-external-api-to-place-it-in-a-collection/16833>\
**Category:** External Collections, Custom Actions & Collections\
**Created:** [September 4, 2021, 2:10pm UTC](https://forum.adalo.com/t/how-to-retrieve-the-results-of-the-integration-test-of-an-external-api-to-place-it-in-a-collection/16833 "2021-09-04T14:10:50Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jos](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/jos/32/11006_2.png) [@Jos](https://forum.adalo.com/u/Jos)\
**Post date:** [September 4, 2021, 2:10pm UTC](https://forum.adalo.com/t/how-to-retrieve-the-results-of-the-integration-test-of-an-external-api-to-place-it-in-a-collection/16833/1 "2021-09-04T14:10:50Z")

</div>

Hi I hope you’re fine !  
I integrated an API inking a new action I would like to retrieve a value in the response of the API and add it as a table in a collection, what should I do?

---

<div class="post-metadata">

**Author:** ![Victor](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/victor/32/2054_2.png) [@Victor](https://forum.adalo.com/u/Victor)\
**Post date:** [September 5, 2021, 10:25am UTC](https://forum.adalo.com/t/how-to-retrieve-the-results-of-the-integration-test-of-an-external-api-to-place-it-in-a-collection/16833/2 "2021-09-05T10:25:31Z")

</div>

Hi @Jos,

Could you please elaborate, what would you like to achieve?

To start with - you can’t add a “table in a collection”; Collections in Adalo do not contain tables. I’d say, “Collection” and “Table” could be used as synonims.  
If you’d like to add a _new Collection_ using the API, then unfortunately this is not possible as of now.  
If you’d like to add a new record to the collection, then you can use POST request to create it.

Best regards, Victor.

---

<div class="post-metadata">

**Author:** ![Jos](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/jos/32/11006_2.png) [@Jos](https://forum.adalo.com/u/Jos)\
**Post date:** [September 5, 2021, 12:11pm UTC](https://forum.adalo.com/t/how-to-retrieve-the-results-of-the-integration-test-of-an-external-api-to-place-it-in-a-collection/16833/3 "2021-09-05T12:11:08Z")

</div>

Hi Victor, I am in the process of integrating an online payment portal which contains 2 APIs the first is for the payment request and the second for the validation of the transaction  
I integrated the first API via a custom action, it retrieves the results of the first API to create a collection with the second API. this is where I am stuck

So how do you return the data from a custom action to a collection?

---

<div class="post-metadata">

**Author:** ![Victor](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/victor/32/2054_2.png) [@Victor](https://forum.adalo.com/u/Victor)\
**Post date:** [September 5, 2021, 1:03pm UTC](https://forum.adalo.com/t/how-to-retrieve-the-results-of-the-integration-test-of-an-external-api-to-place-it-in-a-collection/16833/4 "2021-09-05T13:03:55Z")

</div>

Hi @Jos,

" it retrieves the results of the first API to create a collection with the second API." - sorry, I don’t quite get why the Payment API needs to **create** a **collection**.  
Do you have separate database tables (=collections) for **each** payment? I don’t believe it works like that, otherwise the size of the DB will be HUGE.

If the API you’re using returns some data in JSON, then you can see this data as an action “result” (when you add the custom action, it is Step 3). On that step, you can make the data from the “result” to be returned by custom action.  
Then, you can use this resulting data on the _next_ action on your screen.

Imagine a button where you make a payment, 1st action will be the custom action calling some API. You send email and amount (for example). The API returns some “payment ID”. Then, you can have this “Payment ID” to be stored in Users collection (for example, it could be other collection), by adding the 2nd action to this button: the “payment ID” will be available when you configure the 2nd action.

Best regards, Victor.

---

<div class="post-metadata">

**Author:** ![Jos](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/jos/32/11006_2.png) [@Jos](https://forum.adalo.com/u/Jos)\
**Post date:** [September 5, 2021, 1:20pm UTC](https://forum.adalo.com/t/how-to-retrieve-the-results-of-the-integration-test-of-an-external-api-to-place-it-in-a-collection/16833/5 "2021-09-05T13:20:12Z")

</div>

Can i have an illustrative sketch?

also my API request data comes from the collections via magic text so they are dynamic, how to get them?

---

<div class="post-metadata">

**Author:** ![Victor](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/victor/32/2054_2.png) [@Victor](https://forum.adalo.com/u/Victor)\
**Post date:** [September 6, 2021, 1:36pm UTC](https://forum.adalo.com/t/how-to-retrieve-the-results-of-the-integration-test-of-an-external-api-to-place-it-in-a-collection/16833/6 "2021-09-06T13:36:02Z")

</div>

Hi @Jos,

Please have a look at this official help page (updated and enhanced): [Accessing your Record ID - Adalo Resources](https://help.adalo.com/integrations/custom-actions). Using the results of custom action is described at steps 19 and 20.

Best,  
Victor

---

<div class="post-metadata">

**Author:** ![Jos](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/jos/32/11006_2.png) [@Jos](https://forum.adalo.com/u/Jos)\
**Post date:** [September 6, 2021, 2:51pm UTC](https://forum.adalo.com/t/how-to-retrieve-the-results-of-the-integration-test-of-an-external-api-to-place-it-in-a-collection/16833/7 "2021-09-06T14:51:13Z")

</div>

Hi Victor, I would like to retrieve the data from the response from the API (which I have circled in black) to use them as dynamic data by replacing it with magic text

 ![flapi](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/b/b20605f9f33abc039511abe008a40ca00f34635b.png)

Is it possible to put this data in a collection or the components of a screen?

---

<div class="post-metadata">

**Author:** ![Victor](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/victor/32/2054_2.png) [@Victor](https://forum.adalo.com/u/Victor)\
**Post date:** [September 6, 2021, 2:59pm UTC](https://forum.adalo.com/t/how-to-retrieve-the-results-of-the-integration-test-of-an-external-api-to-place-it-in-a-collection/16833/8 "2021-09-06T14:59:35Z")

</div>

Dear @Jos,

After you save this custom action, you can use it in your app. When you add this custom action as an action to a screen element (say, button), you can add another action **after** it. With this action you can **update** the properties of the record with the **results** of this previous custom action.

Please have a look at the help document from my previous reply. In the point 20 of the document there is an exact answer to your question.  
Adapt this answer to your needs - use the collection and properties from your app.

Best regards, Victor.

---

<div class="post-metadata">

**Author:** ![Jos](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/jos/32/11006_2.png) [@Jos](https://forum.adalo.com/u/Jos)\
**Post date:** [September 12, 2021, 6:03am UTC](https://forum.adalo.com/t/how-to-retrieve-the-results-of-the-integration-test-of-an-external-api-to-place-it-in-a-collection/16833/9 "2021-09-12T06:03:39Z")

</div>

Thank you very much dear Victor
