
AndyC.64975 (Customer) asked a question.
I'm setting up my first API call in Workflows. This calls our HR system, and will eventually become the source for user provisioning. I have the API working in Workflows but I am stuck on how to write the result to a table.
The result returns in XML, so I am parsing to JSON. The JSON contains several fields which I wish to write to a table. I then thought to use 'Pluck' but its seems this can only search one key. How's best to achive this?

This is an exmaple of the API result:
{
"Company": [
"100"
],
"CompanyEmail": [
"test@test.com"
],
"CompanyName": [
"The Test Company"
]
}
Hi Andy,
Based on the example output it looks like you have an object that has 3 keys and each key contains a "list" for a value. You essentially are going to need to deconstruct it. Assuming each list is always one value something like this would do it (at least for your example)
Thanks for reply. I'll try your method today and report back.
Hi. This isn't working yet. Maybe I need to show you more of my JSON. Here are two people pulled out of the HR system
{
"Company": [
"100"
],
"CompanyEmail": [
""
],
"CompanyName": [
"The Test Company"
],
"CostCentre": [
"Sales Team"
],
"CostCentreCode": [
"SALES"
],
"Department": [
"Sales Department"
],
"DepartmentCode": [
"SALES"
],
"EmployeeNumber": [
"32"
],
"EmploymentEndDate": [
{
"$": {
"i:nil": "true"
}
}
],
"EmploymentStartDate": [
"2022-02-22T00:00:00"
],
"Forename1": [
"Black"
],
"Forename2": [
""
],
"HomeEmail": [
""
],
"JobDescription": [
"Salesperson"
],
"Location": [
"Townside-Upon-Stour"
],
"LocationCode": [
"TOWN"
],
"NINumber": [
"GG223366A"
],
"PersonnelNumber": [
"32"
],
"PostNumber": [
"SALES"
],
"Surname": [
"Williams"
],
"Title": [
"Ms"
]
},
{
"Company": [
"100"
],
"CompanyEmail": [
""
],
"CompanyName": [
"The Test Company"
],
"CostCentre": [
"Office and Administration"
],
"CostCentreCode": [
"OFFICE"
],
"Department": [
"Sales Department"
],
"DepartmentCode": [
"SALES"
],
"EmployeeNumber": [
"35"
],
"EmploymentEndDate": [
{
"$": {
"i:nil": "true"
}
}
],
"EmploymentStartDate": [
"2022-02-22T00:00:00"
],
"Forename1": [
"White"
],
"Forename2": [
""
],
"HomeEmail": [
""
],
"JobDescription": [
"Head of Administration"
],
"Location": [
"Townside-Upon-Stour"
],
"LocationCode": [
"TOWN"
],
"NINumber": [
"GG223344B"
],
"PersonnelNumber": [
"35"
],
"PostNumber": [
"ADMINLEAD"
],
"Surname": [
"Peter"
],
"Title": [
"Dr"
]
}
I'm using Get Multiple but getting Invalid Input. However when the JSON contains one user, the 'Get' works.