Hi @cscirocco! Can I double check something? Where are you selecting the option in the dropdown? Are you testing the Zap in the Zap editor or are you looking at it in the Developer Platform?
It’s not possible to select more than one option in a dropdown when you’re in the Zapier editor, so I want to make sure that I understand what you’re trying to do/where you’re looking. Thanks!
Thanks for your response, Danvers. Yesterday, I worked with Zapier support and solved the problem.
The problem is, when you use Allows Multiple Zapier set the value of the parameter to an array and not a string of delimited values like I needed. To solve the issue, I add a bit of javascript to API Configuration > Configure your API Request > Code Mode.
const reformat_array = function(array){ if(array == null) return ""; return array.join(';');};const options = { url: `https://myapi.com/${bundle.authData.api_key}/V3/AppendPhone/Residential/?`, method: 'GET', headers: { 'Content-Type': 'application/json', 'Accept': 'application/json', 'X-API-KEY': bundle.authData.api_key }, params: { 'api_key': bundle.authData.api_key, 'firstname': bundle.inputData.firstname, 'lastname': bundle.inputData.lastname, 'address': bundle.inputData.address, 'city': bundle.inputData.city, 'state': bundle.inputData.state, 'postalcode': bundle.inputData.postalcode, 'matchType': reformat_array(bundle.inputData.matchType), 'source': reformat_array(bundle.inputData.source), 'singleBestMatch': bundle.inputData.singleBestMatch, 'suppression': bundle.inputData.suppression, 'test': bundle.inputData.test }}return z.request(options) .then((response) => { response.throwForStatus(); const results = response.json; // You can do any parsing you need for results here before returning them return results; });
Everything is working now, and I would have to say that Zapier support was very responsive and helpful.
Hi @cscirocco, thanks so much for sharing the solution with us and I’m glad that the Support Team were able to help you out