Hi there,
I am trying to setup a Zapier integration with an API that accepts data a certain way. I am using the Dictionary input type to sync custom fields to the API, and this is my current request body:
body: {
'person': {
'email': bundle.inputData.email,
'sex': bundle.inputData.sex,
'full_name': bundle.inputData.full_name,
...
...
'custom_fields': bundle.inputData.custom_fields
}
}
Which I am assuming results in something like this:
body: {
'person': {
'email': bundle.inputData.email,
'sex': bundle.inputData.sex,
'full_name': bundle.inputData.full_name,
...
...
'custom_fields': {
"customField1": "custom field 1 value",
"customFiled2": "custom field 2 value"
}
}
}
However, the API that I’m interacting with only accepts custom fields like this:
body: {
'person': {
'email': bundle.inputData.email,
'sex': bundle.inputData.sex,
'full_name': bundle.inputData.full_name,
...
...
'customField1': 'custom field 1 value',
'customField2': 'custom field 2 value',
}
}
I cannot figure out how to output the dictionary input type in the format that is needed. Any pointers in the right direction or help would be greatly appreciated. Thanks!
Best answer by Zane
View original