This is working on my system using GNU grep.
Code:
tail -f <filename> | grep --line-buffered <string> | while read;do
<scriptname>
done
Without the '--line-buffered' option the matched lines would be held back in a buffer instead of being sent immediately through the pipe to the while loop.