Skip to content

A workflow script task copy-pasted from an example (or another source) throws an unexplained syntax/execution error, even though the code looks correct on inspection.

Answer

Check for invisible special characters carried over from copy-pasting — text copied from certain sources (like formatted documents, chat tools, or some web pages) can bring along non-printing Unicode characters that look identical to normal spaces or quotes but break script-task parsing; retyping the problematic line manually (or pasting into a plain-text editor first to strip formatting) rules this out as a cause before assuming the workflow logic itself is wrong.

← Browse Workflows and automation questions