I have a DE in marketing cloud which has fields for marketing permission.The permission should be sent to an external database using an api whenever a new row is added or updated.I have to use server side js in script activity to do that.But the issue is how would I trigger the script since you cant use script in journeys and cant use data add or update in automations. Also, how would the data flow to the script of the one that is just updated or added in the DE. Thank you.
I would use some help from Filter Activity and Verification Step. If possible I'd add another column to Marketing Permission DE called "Entry Date" and make it default to 'current date'. Then create a filter activity and filtered DE that filters only today's records. After that you can add Verification step that checks count. Say if it is not greater than 0 which means if there is no data, then stop the automation. Otherwise run the script activity.