# Adding json data to external collection

**URL:** <https://forum.adalo.com/t/adding-json-data-to-external-collection/35359>\
**Category:** External Collections, Custom Actions & Collections\
**Created:** [January 17, 2023, 2:08am UTC](https://forum.adalo.com/t/adding-json-data-to-external-collection/35359 "2023-01-17T02:08:32Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![rgroothuis](https://avatars.discourse-cdn.com/v4/letter/r/3ec8ea/32.png) [@rgroothuis](https://forum.adalo.com/u/rgroothuis)\
**Post date:** [January 17, 2023, 2:08am UTC](https://forum.adalo.com/t/adding-json-data-to-external-collection/35359/1 "2023-01-17T02:08:32Z")

</div>

I’ve a working API in Postman to collect data from the HubSpot CRM system. Now I want to use this API within Adalo but I’m stuck. I don’t know how to add the JSON data to the external collections, any suggestions on how to do this?

JSON Data:

{  
“properties”: [“name,address,address2,city,country,description,gps\_loaction,hs\_lastmodifieddate,type”],  
“filterGroups”: [  
{  
“filters”: [  
{  
“propertyName”: “type”,  
“operator”: “EQ”,  
“value”: “PARTNER”  
}  
]  
}  
]  
}

---

<div class="post-metadata">

**Author:** ![theadaloguy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/theadaloguy/32/8023_2.png) [@theadaloguy](https://forum.adalo.com/u/theadaloguy)\
**Post date:** [January 17, 2023, 10:25am UTC](https://forum.adalo.com/t/adding-json-data-to-external-collection/35359/2 "2023-01-17T10:25:47Z")

</div>

Can you copy the full CURL code from the postman request? Just hide your API key or any sensitive data ofc

---

<div class="post-metadata">

**Author:** ![rgroothuis](https://avatars.discourse-cdn.com/v4/letter/r/3ec8ea/32.png) [@rgroothuis](https://forum.adalo.com/u/rgroothuis)\
**Post date:** [January 17, 2023, 10:31am UTC](https://forum.adalo.com/t/adding-json-data-to-external-collection/35359/3 "2023-01-17T10:31:28Z")

</div>

Thanks for your response, the full CURL command is:

curl [https://api.hubapi.com/crm/v3/objects/companies/search](https://api.hubapi.com/crm/v3/objects/companies/search)   
–request POST   
–header “Authorization: Bearer **secret** \*”   
–header “Content-Type: application/json”   
–data ‘{ “filterGroups” : [{ “filters” : [ { “propertyName” : “type”, “operator”: “EQ”, “value”: “PARTNER” }] } ] }’

---

<div class="post-metadata">

**Author:** ![rgroothuis](https://avatars.discourse-cdn.com/v4/letter/r/3ec8ea/32.png) [@rgroothuis](https://forum.adalo.com/u/rgroothuis)\
**Post date:** [January 17, 2023, 10:37am UTC](https://forum.adalo.com/t/adding-json-data-to-external-collection/35359/4 "2023-01-17T10:37:31Z")

</div>

This is even a better CURL command which I’m trying to achieve. The CURL call is working on the command line as well I’ve it working in Postman.

curl [https://api.hubapi.com/crm/v3/objects/companies/search](https://api.hubapi.com/crm/v3/objects/companies/search)   
–request POST   
–header “Authorization: Bearer \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*”   
–header “Content-Type: application/json”   
–data ‘{ “filterGroups”: [{ “filters” : [ { “propertyName” : “type”, “operator”: “EQ”, “value”: “PARTNER” }] } ], “properties”: [“name,address,address2,city,country,description,gps\_loaction,hs\_lastmodifieddate,type”] }’

---

<div class="post-metadata">

**Author:** ![theadaloguy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/theadaloguy/32/8023_2.png) [@theadaloguy](https://forum.adalo.com/u/theadaloguy)\
**Post date:** [January 17, 2023, 10:37am UTC](https://forum.adalo.com/t/adding-json-data-to-external-collection/35359/5 "2023-01-17T10:37:44Z")

</div>

Is this intended to return one company, or would it be a list?

---

<div class="post-metadata">

**Author:** ![rgroothuis](https://avatars.discourse-cdn.com/v4/letter/r/3ec8ea/32.png) [@rgroothuis](https://forum.adalo.com/u/rgroothuis)\
**Post date:** [January 17, 2023, 10:38am UTC](https://forum.adalo.com/t/adding-json-data-to-external-collection/35359/6 "2023-01-17T10:38:02Z")

</div>

It is a list of companies.

---

<div class="post-metadata">

**Author:** ![theadaloguy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/theadaloguy/32/8023_2.png) [@theadaloguy](https://forum.adalo.com/u/theadaloguy)\
**Post date:** [January 17, 2023, 10:54am UTC](https://forum.adalo.com/t/adding-json-data-to-external-collection/35359/7 "2023-01-17T10:54:42Z")

</div>

Never tried this but you can give it a go.

1. Fill in the example JSON body you gave me (as below) with some relevant search data for testing purposes:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/c/2/c251b63e19974cf58da5378c4b01ba80456039b2.png)

1. Copy and paste everything except for the word data and the outer apostrophes’ ’ into [https://www.urlencoder.org/](https://www.urlencoder.org/)
2. Change the GET All on the external collection to be POST
3. at the end of the endpoint, add ?data= and the URLencoded json you got from step 2, so it will look something like the below:  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/9/3/93ad8947763f740b56db455d8832a8d6c28cd7bc.jpeg)

If that returns data, let me know.

---

<div class="post-metadata">

**Author:** ![theadaloguy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/theadaloguy/32/8023_2.png) [@theadaloguy](https://forum.adalo.com/u/theadaloguy)\
**Post date:** [January 17, 2023, 10:58am UTC](https://forum.adalo.com/t/adding-json-data-to-external-collection/35359/8 "2023-01-17T10:58:49Z")

</div>

Might be worth trying without URL encoding also.

---

<div class="post-metadata">

**Author:** ![rgroothuis](https://avatars.discourse-cdn.com/v4/letter/r/3ec8ea/32.png) [@rgroothuis](https://forum.adalo.com/u/rgroothuis)\
**Post date:** [January 17, 2023, 11:09am UTC](https://forum.adalo.com/t/adding-json-data-to-external-collection/35359/9 "2023-01-17T11:09:04Z")

</div>

I followed your instructions (with encoding) and no positive results, unfortunately.

This the screenshot with the full( encoded) URL:

 ![Screenshot 2023-01-17 at 19.00.22](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/8/a/8adb647a0c86fb0bfba837ffeea23c7ec80c22a5.png)

This is the result:

 ![Screenshot 2023-01-17 at 19.02.37](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/f/5/f56ea6ae61b94a8bf5a24f89477a80b6baf9c4d7.png)

As the data is not fully visible in the screenshot I copied the data below:

URL Called:

ttps://api.hubapi.com/crm/v3/objects/companies/search?data=%7B%20%22filterGroups%22%3A%20%5B%20%7B%20%22filters%22%20%3A%20%5B%20%7B%20%22propertyName%22%20%3A%20%22type%22%2C%20%22operator%22%3A%20%22EQ%22%2C%20%22value%22%3A%20%22PARTNER%22%20%7D%20%5D%20%7D%20%5D%2C%20%22properties%22%3A%20%5B%22name%2Caddress%2Caddress2%2Ccity%2Ccountry%2Cdescription%2Cgps\_loaction%2Chs\_lastmodifieddate%2Ctype%22%5D%20%7D

Full response:

“\n\n\<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/\>\nError 405 Method Not Allowed\n\n

## HTTP ERROR 405
\n

Reason:\n

```
Method Not Allowed
```

\n\n\n”

I will no try without using the encoding.

---

<div class="post-metadata">

**Author:** ![rgroothuis](https://avatars.discourse-cdn.com/v4/letter/r/3ec8ea/32.png) [@rgroothuis](https://forum.adalo.com/u/rgroothuis)\
**Post date:** [January 17, 2023, 11:13am UTC](https://forum.adalo.com/t/adding-json-data-to-external-collection/35359/10 "2023-01-17T11:13:30Z")

</div>

Sorry my mistake, the POST was automatically changed to GET again. Done the test again with POST.

 ![Screenshot 2023-01-17 at 19.11.53](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/e/e/eef03e9c4e0a9fced28599257f29dba3d85eef44.png)

Full URL:

[https://api.hubapi.com/crm/v3/objects/companies/search?data={%20"filterGroups"%3A%20[%20{%20"filters"%20%3A%20[%20{%20"propertyName"%20%3A%20"type"%2C%20"operator"%3A%20"EQ"%2C%20"value"%3A%20"PARTNER"%20}%20]%20}%20]%2C%20"properties"%3A%20["name%2Caddress%2Caddress2%2Ccity%2Ccountry%2Cdescription%2Cgps\_loaction%2Chs\_lastmodifieddate%2Ctype"]%20}](https://api.hubapi.com/crm/v3/objects/companies/search?data=%7B%20%22filterGroups%22%3A%20%5B%20%7B%20%22filters%22%20%3A%20%5B%20%7B%20%22propertyName%22%20%3A%20%22type%22%2C%20%22operator%22%3A%20%22EQ%22%2C%20%22value%22%3A%20%22PARTNER%22%20%7D%20%5D%20%7D%20%5D%2C%20%22properties%22%3A%20%5B%22name%2Caddress%2Caddress2%2Ccity%2Ccountry%2Cdescription%2Cgps_loaction%2Chs_lastmodifieddate%2Ctype%22%5D%20%7D)

Full response:

“\n\n\<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/\>\nError 415 Unsupported Media Type\n\n

## HTTP ERROR 415
\n

Reason:\n

```
Unsupported Media Type
```

\n\n\n”

---

<div class="post-metadata">

**Author:** ![theadaloguy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/theadaloguy/32/8023_2.png) [@theadaloguy](https://forum.adalo.com/u/theadaloguy)\
**Post date:** [January 17, 2023, 11:17am UTC](https://forum.adalo.com/t/adding-json-data-to-external-collection/35359/11 "2023-01-17T11:17:03Z")

</div>

Can try without url encoding. It’s a bit of a long shot though I didn’t try passing a json structure in url before. If it was my own project I’d make my own endpoint in xano, then use xano to call hubspot.

---

<div class="post-metadata">

**Author:** ![rgroothuis](https://avatars.discourse-cdn.com/v4/letter/r/3ec8ea/32.png) [@rgroothuis](https://forum.adalo.com/u/rgroothuis)\
**Post date:** [January 17, 2023, 11:17am UTC](https://forum.adalo.com/t/adding-json-data-to-external-collection/35359/12 "2023-01-17T11:17:46Z")

</div>

When using the JSON code without encoding the same result:

Full URL:

[https://api.hubapi.com/crm/v3/objects/companies/search?data=](https://api.hubapi.com/crm/v3/objects/companies/search?data=){ “filterGroups”: [{ “filters” : [ { “propertyName” : “type”, “operator”: “EQ”, “value”: “PARTNER” }] } ], “properties”: [“name,address,address2,city,country,description,gps\_loaction,hs\_lastmodifieddate,type”] }

Full response:

“\n\n\<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/\>\nError 415 Unsupported Media Type\n\n

## HTTP ERROR 415
\n

Reason:\n

```
Unsupported Media Type
```

\n\n\n”

Why are you suggesting to put “?data=” behind the URL? The data paramater in the CURL command is to specify the data which needs to be included in the POST message. I don’t believe the word data is used to specify the JSON data.

---

<div class="post-metadata">

**Author:** ![rgroothuis](https://avatars.discourse-cdn.com/v4/letter/r/3ec8ea/32.png) [@rgroothuis](https://forum.adalo.com/u/rgroothuis)\
**Post date:** [January 17, 2023, 11:19am UTC](https://forum.adalo.com/t/adding-json-data-to-external-collection/35359/13 "2023-01-17T11:19:08Z")

</div>

> [@theadaloguy](#):
>
> xano

Ok, I’ve not used Xano before, I can check that as well. But the not encoded JSON URL is not working, unfortunately.

---

<div class="post-metadata">

**Author:** ![theadaloguy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/theadaloguy/32/8023_2.png) [@theadaloguy](https://forum.adalo.com/u/theadaloguy)\
**Post date:** [January 17, 2023, 11:22am UTC](https://forum.adalo.com/t/adding-json-data-to-external-collection/35359/14 "2023-01-17T11:22:55Z")

</div>

Xano has a bit of a learning curve but is very powerful. It’s probably worth learning as Adalo are going to be introducing a direct integration with it soon.

But essentially you can make a Xano endpoint which accepts the relevant query parameters, and call it from Adalo. Then you can use the exact request used in postman (xano allows CURL import which is nice), and just feed in the parameters.

---

<div class="post-metadata">

**Author:** ![rgroothuis](https://avatars.discourse-cdn.com/v4/letter/r/3ec8ea/32.png) [@rgroothuis](https://forum.adalo.com/u/rgroothuis)\
**Post date:** [January 17, 2023, 11:25am UTC](https://forum.adalo.com/t/adding-json-data-to-external-collection/35359/15 "2023-01-17T11:25:00Z")

</div>

THanks for the short explanation. For my better understanding, Adalo connects to Xano and then Xano passes on the URL/Request/etc to my HubSpot CRM, correct?

Adalo =\> Xano =\> HubSpot

---

<div class="post-metadata">

**Author:** ![theadaloguy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/theadaloguy/32/8023_2.png) [@theadaloguy](https://forum.adalo.com/u/theadaloguy)\
**Post date:** [January 17, 2023, 11:26am UTC](https://forum.adalo.com/t/adding-json-data-to-external-collection/35359/16 "2023-01-17T11:26:06Z")

</div>

That’s it. And Xano then passes hubspot’s response back to Adalo.

---

<div class="post-metadata">

**Author:** ![rgroothuis](https://avatars.discourse-cdn.com/v4/letter/r/3ec8ea/32.png) [@rgroothuis](https://forum.adalo.com/u/rgroothuis)\
**Post date:** [January 17, 2023, 11:28am UTC](https://forum.adalo.com/t/adding-json-data-to-external-collection/35359/17 "2023-01-17T11:28:12Z")

</div>

Thanks, going to investigate that route as well.

Conclusion is that Adalo is not able to pass JSON data in a POST request, is that correct?

I cannot add more post as I’m a new user ☹ So I edit the existing post.

Additional question: Would Zapier being something similar as Xano?

---

<div class="post-metadata">

**Author:** ![theadaloguy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/theadaloguy/32/8023_2.png) [@theadaloguy](https://forum.adalo.com/u/theadaloguy)\
**Post date:** [January 17, 2023, 11:28am UTC](https://forum.adalo.com/t/adding-json-data-to-external-collection/35359/18 "2023-01-17T11:28:56Z")

</div>

Custom action it can, External collection I don’t know of a way.

---

<div class="post-metadata">

**Author:** ![theadaloguy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/theadaloguy/32/8023_2.png) [@theadaloguy](https://forum.adalo.com/u/theadaloguy)\
**Post date:** [January 17, 2023, 11:37am UTC](https://forum.adalo.com/t/adding-json-data-to-external-collection/35359/19 "2023-01-17T11:37:27Z")

</div>

Zapier, make, integromat I believe can probably achieve the same thing. Xano is more powerful though and what I’m familiar with. I’m not sure I’d be confident having my collections constantly loaded from zapier/integromat - that could get expensive too.

Xano has a cost also, you’ll need a paid version when you get real users to avoid rate-limiting. So be aware when your app is launched you’ll need to pay $60+ per month for Xano.

If you can’t post more as a new user feel free to direct message me.
