Error Running AppleScript

Here is the scenario:
1. Any new iOS contact added will trigger an IFTTT recipe.
2. This recipe adds a text file in a specific folder on my DropBox account.
3. Once Hazel detects the new file, it moves it to the trash and run 3 AppleScripts.
4. All is working well except for when the AppleScript is triggered, I get the error "Error executing AppleScript name.scpt on file name.txt"
Is there any way to trigger the AppleScript in general, not on that specific added file?
The content of the script is as follows:
1. Any new iOS contact added will trigger an IFTTT recipe.
2. This recipe adds a text file in a specific folder on my DropBox account.
3. Once Hazel detects the new file, it moves it to the trash and run 3 AppleScripts.
4. All is working well except for when the AppleScript is triggered, I get the error "Error executing AppleScript name.scpt on file name.txt"
Is there any way to trigger the AppleScript in general, not on that specific added file?
The content of the script is as follows:
- Code: Select all
tell application "Contacts"
set theNumber to "077"
set (label of phones of people whose value starts with theNumber) to "orange"
save
end tell