What is the State of Play for JSON Nested Objects & Arrays AND Bulk Load?

Hi Bubblers,

I am struggling with ingesting data from an API and hoping that someone can say what is currently possible (preferably without a plugin) and if it is possible point me to some resources that will explain how . I have read numerous rants by @keith from past years about bubble’s failings in terms of nested json objects and arrays but want to check that this has not been fixed.

I want to pull in some fields from a files.list Google Drive API CALL (see sample single record response json file pasted at the end of this post). To do this iteratively is very expensive so I want to do this using the the Bulk Create method offered via the Data API. I have that working on the “flat” fields (using the format as JSON feature - thanks for that essential tip @tylerboodman) but I want to ingest the “parents” info which is a nested array.

  "parents": [
    {
      "selfLink": "https://www.googleapis.com/drive/v2/files/1jNBcl4xAwCInwKjlHvWV70a4131uXlsGan0us_1P2v4/parents/0AA8GWG5SmJOIUk9PVA",
      "id": "0AA8GWG5SmJOIUk9PVA",
      "isRoot": true,
      "kind": "drive#parentReference",
      "parentLink": "https://www.googleapis.com/drive/v2/files/0AA8GWG5SmJOIUk9PVA"
    }
  ],

I would also like permissions , which is a nested object.

I am assuming that I cannot import the complete JSON in a singe pass but I cannot see how I could do it in two passes as I see no way to relate any embedded Arrays or Objects (assuming I could extract them) to the google drive id reference that they correspond to.

In the case of JSON embedded objects - i get the impression that I should be able to import them using format as text but I cant figure out the notation, neither parents.id nor parents_id work.

Thanks in advance for your help.

DataJunky

{
“nextPageToken”: “~!!~AI9FV7S-2x5bpnCz5GqOfeMEMWPIEx7HVwvAwenhptsY6_93mSlzpUaRJWcbEzaS-QxNWzp_xUxfNX1hV1HdzeZ9O9gN8-FapjASi3rb-vtlUF6kiMH0umw4u29wleosyDS5jxPoD94ALO7g-0HO-vNjoRswV-vAD9WCVmjJ65Cu7Qb_imfHE9VQWUulR6U4qifmr7gT6UudX0qbS8HMuHie4O6m6GVwr9eQJwoxqjBFJOZUkVSJPU2-M7SAzpK7Tss6G33tYCvRkaX76E3OTmuE6-jjE9YQUamzqF2H8r9UDw_VyjNEH0aof0p56XcWV-m7KRJFMjT5kZYqf_wHcabIS4VEaVz_yQ==”,
“kind”: “drive#fileList”,
“etag”: ““UCbO6lqma5njjArkte4Pnaz7nJM””,
“selfLink”: “https://www.googleapis.com/drive/v2/files?maxResults=5”,
“incompleteSearch”: false,
“nextLink”: “https://www.googleapis.com/drive/v2/files?maxResults=5&pageToken=~!!~AI9FV7S-2x5bpnCz5GqOfeMEMWPIEx7HVwvAwenhptsY6_93mSlzpUaRJWcbEzaS-QxNWzp_xUxfNX1hV1HdzeZ9O9gN8-FapjASi3rb-vtlUF6kiMH0umw4u29wleosyDS5jxPoD94ALO7g-0HO-vNjoRswV-vAD9WCVmjJ65Cu7Qb_imfHE9VQWUulR6U4qifmr7gT6UudX0qbS8HMuHie4O6m6GVwr9eQJwoxqjBFJOZUkVSJPU2-M7SAzpK7Tss6G33tYCvRkaX76E3OTmuE6-jjE9YQUamzqF2H8r9UDw_VyjNEH0aof0p56XcWV-m7KRJFMjT5kZYqf_wHcabIS4VEaVz_yQ%3D%3D”,
“items”: [
{
“kind”: “drive#file”,
“userPermission”: {
“id”: “me”,
“type”: “user”,
“role”: “owner”,
“kind”: “drive#permission”,
“selfLink”: “https://www.googleapis.com/drive/v2/files/1jNBcl4xAwCInwKjlHvWV70a4131uXlsGan0us_1P2v4/permissions/me”,
“etag”: ““2jW-HHgWxO3yjR7jKmTkC6LKVOE””,
“pendingOwner”: false
},
“selfLink”: “https://www.googleapis.com/drive/v2/files/1jNBcl4xAwCInwKjlHvWV70a4131uXlsGan0us_1P2v4”,
“ownerNames”: [
“Roger Ramjet”
],
“lastModifyingUserName”: “Roger Ramjet”,
“editable”: true,
“writersCanShare”: true,
“mimeType”: “application/vnd.google-apps.spreadsheet”,
“exportLinks”: {
“application/x-vnd.oasis.opendocument.spreadsheet”: “https://docs.google.com/spreadsheets/export?id=1jNBcl4xAwCInwKjlHvWV70a4131uXlsGan0us_1P2v4&exportFormat=ods”,
“text/tab-separated-values”: “https://docs.google.com/spreadsheets/export?id=1jNBcl4xAwCInwKjlHvWV70a4131uXlsGan0us_1P2v4&exportFormat=tsv”,
“application/pdf”: “https://docs.google.com/spreadsheets/export?id=1jNBcl4xAwCInwKjlHvWV70a4131uXlsGan0us_1P2v4&exportFormat=pdf”,
“application/vnd.openxmlformats-officedocument.spreadsheetml.sheet”: “https://docs.google.com/spreadsheets/export?id=1jNBcl4xAwCInwKjlHvWV70a4131uXlsGan0us_1P2v4&exportFormat=xlsx”,
“text/csv”: “https://docs.google.com/spreadsheets/export?id=1jNBcl4xAwCInwKjlHvWV70a4131uXlsGan0us_1P2v4&exportFormat=csv”,
“application/zip”: “https://docs.google.com/spreadsheets/export?id=1jNBcl4xAwCInwKjlHvWV70a4131uXlsGan0us_1P2v4&exportFormat=zip”,
“application/vnd.oasis.opendocument.spreadsheet”: “https://docs.google.com/spreadsheets/export?id=1jNBcl4xAwCInwKjlHvWV70a4131uXlsGan0us_1P2v4&exportFormat=ods
},
“parents”: [
{
“selfLink”: “https://www.googleapis.com/drive/v2/files/1jNBcl4xAwCInwKjlHvWV70a4131uXlsGan0us_1P2v4/parents/0AA8GWG5SmJOIUk9PVA”,
“id”: “0AA8GWG5SmJOIUk9PVA”,
“isRoot”: true,
“kind”: “drive#parentReference”,
“parentLink”: “https://www.googleapis.com/drive/v2/files/0AA8GWG5SmJOIUk9PVA
}
],
“thumbnailLink”: “https://docs.google.com/feeds/vt?gd=true&id=1jNBcl4xAwCInwKjlHvWV70a4131uXlsGan0us_1P2v4&v=20&s=AMedNnoAAAAAZSyYop4wVR2C6GgxSemDd0h5KD_4m_Mt&sz=s220”,
“appDataContents”: false,
“iconLink”: “https://drive-thirdparty.googleusercontent.com/16/type/application/vnd.google-apps.spreadsheet”,
“shared”: false,
“lastModifyingUser”: {
“displayName”: “Roger Ramjet”,
“kind”: “drive#user”,
“isAuthenticatedUser”: true,
“permissionId”: “07343714710381504082”,
“emailAddress”: “roger.ramjet@spaceship.com”,
“picture”: {
“url”: “https://lh3.googleusercontent.com/a/default-user=s64
}
},
“owners”: [
{
“displayName”: “Roger Ramjet”,
“kind”: “drive#user”,
“isAuthenticatedUser”: true,
“permissionId”: “07343714710381504082”,
“emailAddress”: “roger.ramjet@spaceship.com”,
“picture”: {
“url”: “https://lh3.googleusercontent.com/a/default-user=s64
}
}
],
“openWithLinks”: {
“1083656409722”: “https://docs.google.com/spreadsheets/d/1jNBcl4xAwCInwKjlHvWV70a4131uXlsGan0us_1P2v4/edit?usp=drivesdk&ouid=105368007052822042044”,
“879841412715”: “https://www.appsheet.com/template/gdriveopenapp?state={“ids”:[“1jNBcl4xAwCInwKjlHvWV70a4131uXlsGan0us_1P2v4”],“action”:“open”,“userId”:“105368007052822042044”,“resourceKeys”:{}}”,
“338347331578”: “https://drive.google.com/file/d/1jNBcl4xAwCInwKjlHvWV70a4131uXlsGan0us_1P2v4/view?usp=drivesdk
},
“defaultOpenWithLink”: “https://docs.google.com/spreadsheets/d/1jNBcl4xAwCInwKjlHvWV70a4131uXlsGan0us_1P2v4/edit?usp=drivesdk&ouid=105368007052822042044”,
“copyable”: true,
“etag”: ““MTY5NzM5NzQ2NTY0OQ””,
“alternateLink”: “https://docs.google.com/spreadsheets/d/1jNBcl4xAwCInwKjlHvWV70a4131uXlsGan0us_1P2v4/edit?usp=drivesdk”,
“embedLink”: “https://docs.google.com/spreadsheets/d/1jNBcl4xAwCInwKjlHvWV70a4131uXlsGan0us_1P2v4/htmlembed?ouid=105368007052822042044”,
“fileSize”: “2096”,
“copyRequiresWriterPermission”: false,
“spaces”: [
“drive”
],
“id”: “1jNBcl4xAwCInwKjlHvWV70a4131uXlsGan0us_1P2v4”,
“title”: “Google Drive Auth Sheet”,
“labels”: {
“viewed”: true,
“restricted”: false,
“starred”: false,
“hidden”: false,
“trashed”: false
},
“explicitlyTrashed”: false,
“createdDate”: “2023-08-01T20:57:38.965Z”,
“modifiedDate”: “2023-10-15T19:17:45.649Z”,
“modifiedByMeDate”: “2023-10-15T19:17:45.649Z”,
“lastViewedByMeDate”: “2023-10-15T19:17:45.649Z”,
“markedViewedByMeDate”: “1970-01-01T00:00:00.000Z”,
“quotaBytesUsed”: “2096”,
“version”: “35”,
“capabilities”: {
“canEdit”: true,
“canCopy”: true
}
},
]
}

1 Like

Hey @DataJunky , sounds like a tricky one cause it’s been a while… :rofl:

What exactly are you having trouble with? I’m pretty sure Bubble will interpret all the arrays as lists and make those fields of the plugin datatype… could be wrong tho…

Is the issue making the API calls still or just processing the response?

Worse case might just have to do “Schedule API workflow on a list” and run a workflow per File