Hello,
I keep getting this error: "'apidata' data type required instead of 'Text'.", but my I set apidata to text data..
If you look at my picture, I am able to see the "output" in the message step, but when I try to take that "output" and add it to my entity, I keep getting that error.
I'm not sure what I'm doing wrong atm. Thank you!
Hello Alex,
I think you get confused because you name entity and its attribute with same name. So Please try to change name of one of them.
For action AddtoDB you need to send input parameters as record of entity apidata not text so this is the issue when you can this action after calling API.
If you will always insert returned response from API to table so you can change input parameter of action AddtoDB to be text and then inside action into CreateUpdate action expand record and set Id value as NullIdentifier() and apidata to your input parameter
In case you may insert or update existing record so you need to get existing record from entity and update value of apidata with new one then call CreateUpdate action
Got it, let me give that a try.
And doing it this way would allow me to store "output" (which is the api response (json formatted obeject)) into the entity attribute?
Yes, if output of API is text not a structure of number of attributes you can change input parameter in your action to text and this will work.
Hi Alex,
you should have the attributes same as API response in your structure or Entity in which you are saving the API response.
In your screenshot it just one attribute ApiData in which you are storing everything that API is returning. First of all try to check the API response then create your entity according to it and then use CRUD operation to store the API response to Database.
Komal
My goal was to store the whole api response into a single entity attribute.
I'm able to get a response from the API, which returns an text (unstructured json object).
how would I can store the whole api response to a single entity attribute?
My goal is to then save each entity attribute to a json file, which I will then display as a downloadable files on my page.
To achieve this you need to use JSONDeserialize to convert whole API response to single attribute then store the output of JSONDeserialize to database ,
Hope this will work,