diff --git a/.github/workflows/spam-comment-filter.yml b/.github/workflows/spam-comment-filter.yml
index ecb632327ac6..4f974e6e9941 100644
--- a/.github/workflows/spam-comment-filter.yml
+++ b/.github/workflows/spam-comment-filter.yml
@@ -17,9 +17,11 @@ jobs:
           node-version: 18.x
       - name: Check issue body against regex
         id: regex_check
+        env:
+          COMMENT_BODY: ${{ github.event.comment.body }}
         run: |
           REGEX='^download\s+(?:https?:\/\/)?[\w-]+(\.[\w-]+)+[^\s]+\s+password:\s*.+\s+in the installer menu, select\s*.+$'
-          if echo "${{ github.event.comment.body }}" | tr '\n' ' ' | grep -qiP "$REGEX"; then
+          if echo "$COMMENT_BODY" | tr '\n' ' ' | grep -qiP "$REGEX"; then
             echo "REGEX_MATCHED=true" >> $GITHUB_OUTPUT
           else
             echo "REGEX_MATCHED=false" >> $GITHUB_OUTPUT
@@ -38,4 +40,4 @@ jobs:
           COMMENT_ID: ${{ github.event.comment.id }}
           REPO_OWNER: ${{ github.repository_owner }}
           REPO_NAME: ${{ github.event.repository.name }}
-        run: cd ./libs/langchain-scripts && yarn filter_spam_comment
\ No newline at end of file
+        run: cd ./libs/langchain-scripts && yarn filter_spam_comment