Store API Response JSON in DB Table

Hi,
I need to store the JSON response that I get from an API server action as value of one of the fields in my DB table.
I tried setting the API’s JSON response in the insert/update database server action like {{api1.data}}, but its throwing an error.
I don’t see any option to convert the JSON response to string before saving it in DB either.

I have other use case where I store JSON value coming from client side UI in the DB, and that works fine because I stringify that JSON before sending it to server action to store in DB.
But in this case I need to do everything in the server action itself.

Can this be done?

Yes it can but we need more information. I assume the API connection is correctly set up and the schema imported if necessary.

If set up correctly you should be able to assign it directly to a database field or variable

Take a look at the later part of this guide for an example

The tutorial talks about extracting fields from the api json data.
I need to store the api json as is in the table column.

Sorry sid, misread your post

@sid, what is the error you are getting and could you share a screenshot of your server connect ?

Ah, finally I think I follow, you want to store the entire raw JSON response unprocessed like a text file?

I assume you need to read it elsewhere?

1 Like

Sorry for the late reply… the error was a generic string parse error from what I remember. Will try to get to it asap and create the test case again to share detailed error.

Sorry for the late reply.
Yes, that’s exactly what I am after. Saving raw JSON.

Hey @scott
The value for column - formio_workflow_response is supposed to save the RAW json. Thats how its getting configured.
Here’s the error:

{
“message”: “Unable to cast object of type ‘Newtonsoft.Json.Linq.JObject’ to type ‘Newtonsoft.Json.Linq.JValue’.”,
“lastAction”: {
“name”: “updateFormioWorkflowResponse”,
“module”: “dbupdater”,
“action”: “update”,
“options”: {
“connection”: “conMifosDefault”,
“sql”: {
“type”: “update”,
“values”: [
{
“table”: “tblformio”,
“column”: “formio_workflow_response”,
“type”: “text”,
“value”: {
“Status”: 1,
“ErrorDescription”: “”,
“ResultValue”: null,
“ResultNumeric”: 0,
“ReturnObject”: null,
“WorkflowResultSet”: {
“Result”: [
{
“Id”: 2682155,
“ClientId”: 1660,
“LoanId”: null,
“WorkflowId”: 216,
“QueryId”: 1016,
“ActionId”: 0,
“ActionConditionId”: 0,
“Formula”: null,
“OutputFormula”: null,
“Status”: “Pass”,
“CustomMesssage”: null,
“MesssageType”: null,
“ExceptionMessage”: null,
“Exception”: null,
“SessionId”: “41f4caf0-f0e5-4610-b0df-8a66b951f296”,
“ExecutedBy”: 0,
“UpdatedDateTime”: “2019-10-17T17:31:45.9370999+11:00”
},
{
“Id”: 2682156,
“ClientId”: 1660,
“LoanId”: null,
“WorkflowId”: 216,
“QueryId”: 1017,
“ActionId”: 0,
“ActionConditionId”: 0,
“Formula”: null,
“OutputFormula”: null,
“Status”: “Pass”,
“CustomMesssage”: null,
“MesssageType”: null,
“ExceptionMessage”: null,
“Exception”: null,
“SessionId”: “41f4caf0-f0e5-4610-b0df-8a66b951f296”,
“ExecutedBy”: 0,
“UpdatedDateTime”: “2019-10-17T17:31:45.9370999+11:00”
},
{
“Id”: 2682157,
“ClientId”: 1660,
“LoanId”: null,
“WorkflowId”: 216,
“QueryId”: 1034,
“ActionId”: 0,
“ActionConditionId”: 0,
“Formula”: null,
“OutputFormula”: null,
“Status”: “Pass”,
“CustomMesssage”: null,
“MesssageType”: null,
“ExceptionMessage”: null,
“Exception”: null,
“SessionId”: “41f4caf0-f0e5-4610-b0df-8a66b951f296”,
“ExecutedBy”: 0,
“UpdatedDateTime”: “2019-10-17T17:31:45.9370999+11:00”
},
{
“Id”: 2682158,
“ClientId”: 1660,
“LoanId”: null,
“WorkflowId”: 216,
“QueryId”: 1035,
“ActionId”: 0,
“ActionConditionId”: 0,
“Formula”: null,
“OutputFormula”: null,
“Status”: “Pass”,
“CustomMesssage”: null,
“MesssageType”: null,
“ExceptionMessage”: null,
“Exception”: null,
“SessionId”: “41f4caf0-f0e5-4610-b0df-8a66b951f296”,
“ExecutedBy”: 0,
“UpdatedDateTime”: “2019-10-17T17:31:45.9370999+11:00”
},
{
“Id”: 2682159,
“ClientId”: 1660,
“LoanId”: null,
“WorkflowId”: 216,
“QueryId”: 1018,
“ActionId”: 3048,
“ActionConditionId”: 876,
“Formula”: “({{FormioGet.isgetstructure}} == 1)”,
“OutputFormula”: “(0 == 1)”,
“Status”: “Fail”,
“CustomMesssage”: “”,
“MesssageType”: “Conditions-Final”,
“ExceptionMessage”: null,
“Exception”: null,
“SessionId”: “41f4caf0-f0e5-4610-b0df-8a66b951f296”,
“ExecutedBy”: 0,
“UpdatedDateTime”: “2019-10-17T17:31:45.9370999+11:00”
},
{
“Id”: 2682160,
“ClientId”: 1660,
“LoanId”: null,
“WorkflowId”: 216,
“QueryId”: 1018,
“ActionId”: 0,
“ActionConditionId”: 0,
“Formula”: null,
“OutputFormula”: null,
“Status”: “Pass”,
“CustomMesssage”: null,
“MesssageType”: null,
“ExceptionMessage”: null,
“Exception”: null,
“SessionId”: “41f4caf0-f0e5-4610-b0df-8a66b951f296”,
“ExecutedBy”: 0,
“UpdatedDateTime”: “2019-10-17T17:31:45.9370999+11:00”
},
{
“Id”: 2682161,
“ClientId”: 1660,
“LoanId”: null,
“WorkflowId”: 216,
“QueryId”: 1166,
“ActionId”: 0,
“ActionConditionId”: 0,
“Formula”: null,
“OutputFormula”: null,
“Status”: “Pass”,
“CustomMesssage”: null,
“MesssageType”: null,
“ExceptionMessage”: null,
“Exception”: null,
“SessionId”: “41f4caf0-f0e5-4610-b0df-8a66b951f296”,
“ExecutedBy”: 0,
“UpdatedDateTime”: “2019-10-17T17:31:45.9370999+11:00”
}
],
“ExecutedBy”: 0,
“SessionId”: “41f4caf0-f0e5-4610-b0df-8a66b951f296”,
“ReturnObject”: null
}
}
}
],
“table”: “tblformio”,
“wheres”: {
“condition”: “AND”,
“rules”: [
{
“id”: “id”,
“field”: “id”,
“type”: “double”,
“operator”: “equal”,
“value”: 228.0,
“data”: {
“column”: “id”
},
“operation”: “=”
}
],
“conditional”: null,
“valid”: true
}
}
},
“meta”: [
{
“name”: “affected”,
“type”: “number”
}
]
},
“orgException”: {
“ClassName”: “System.InvalidCastException”,
“Message”: “Unable to cast object of type ‘Newtonsoft.Json.Linq.JObject’ to type ‘Newtonsoft.Json.Linq.JValue’.”,
“Data”: null,
“InnerException”: null,
“HelpURL”: null,
“StackTraceString”: " at DMXzone.ServerConnect.Database.Connector.CreateCommand(String query, JArray parameters, IDbConnection connection) in d:\Develop\DMXzone Server Connect\ASPNET_Source\DMXzone Database Connector\Database\Connector.cs:line 131\r\n at DMXzone.ServerConnect.Database.Connector.Execute(SqlBuilder sql) in d:\Develop\DMXzone Server Connect\ASPNET_Source\DMXzone Database Connector\Database\Connector.cs:line 142\r\n at DMXzone.ServerConnect.Module.DbUpdaterModule.Update(JObject options) in d:\Develop\DMXzone Server Connect\ASPNET_Source\DMXzone Database Updater\Module\DbUpdaterModule.cs:line 56",
“RemoteStackTraceString”: null,
“RemoteStackIndex”: 0,
“ExceptionMethod”: “8\nCreateCommand\nDMXzone.ServerConnect.DatabaseConnector, Version=2.1.0.28051, Culture=neutral, PublicKeyToken=null\nDMXzone.ServerConnect.Database.Connector\nSystem.Data.IDbCommand CreateCommand(System.String, Newtonsoft.Json.Linq.JArray, System.Data.IDbConnection)”,
“HResult”: -2147467262,
“Source”: “DMXzone.ServerConnect.DatabaseConnector”,
“WatsonBuckets”: “AQAAAEMATABSADIAMAByADMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA”
}
}

Have you solved it? I’m using Google Vision OCR and I need to save the whole raw json data

Nope. No response from Wappler guys either.
I had the liberty of configuring an API which would do that for me.
So now I just send the json I receive in response to another API which updates table with that data.

If you are on PHP server modal, I think it supports custom formatters. I use ASP. NET.
With custom formatter you can try to escape the JSON response to a string, and then Wappler’s update/insert action could work.

Such a pity…

I’ll give it a try

Not seeing any of the Wappler team flagged in this post. perhaps they missed it or it slipped their mind. Tagging them makes sure the post stays linked to them until they unassign themselves

Most likely.
Any thoughts on the issue @Teodor?

I’m working with Google Vision API.

After sending the PDF on a base64 string (I can’t believe I could implement it that easy), I receive the PDF scanned with the text recognition on a JSON file.

I need to save to my database the recognition received from Google. Especifically the “#text” from fullTextAnnotation value as seen on the image.

As seen on the Google Chorme’s inspector, I need the 0, 1 and 2 texts responses (it’s divided on pages)

I already tried using simple insert with the 0 record, I couldn’t achieve to save it to the database at all. Neither using the repeat server action or multi insert option…

Well, great news. I could figure out the error. Basically, my JSON data was very complex because it contained the OCR text of a PDF file, so I created a repeat action for each list value the JSON file retrieved. AND IT WORKED. So happy!

I’m now using Google Vision API to get information of my invoices, accelerating the database entry process of my company.

2 Likes