Hello
I have a Google sheet with a list of URL e.g.
AAA .com
BBB .com
CCC .com and so on
At the HTTP request node, there is a JavaScript code parameter. Each domain runs different JavaScript. Can we create a condition to check the array data from the Google Sheet node to set up a lookup like this?
if input contain ‘AAA’ then output “document.querySelector(‘.AAA-content’).style.display=‘none’”
if input contain ‘BBB’ then output “document.querySelector(‘.BBB-content’).style.display=‘none’”
if input contain ‘CCC’ then output “document.querySelector(‘.CCC-content’).style.display=‘none’”
So I can use an expression for the HTTP Request node to apply the correct JS for each domain API call.
I thought the Switch Node was to achieve this use case, but does not seem to be…
Thanks