diff --git a/flows/actions/base.go b/flows/actions/base.go index a36c82232..4a7e22fd9 100644 --- a/flows/actions/base.go +++ b/flows/actions/base.go @@ -99,6 +99,7 @@ func (a *baseAction) evaluateMessage(run flows.Run, languages []i18n.Language, a if err != nil { logEvent(events.NewError(err)) } + evaluatedAttachment = strings.TrimSpace(evaluatedAttachment) if evaluatedAttachment == "" { logEvent(events.NewErrorf("attachment text evaluated to empty string, skipping")) continue diff --git a/flows/actions/testdata/send_msg.json b/flows/actions/testdata/send_msg.json index ed809f30f..d822fa210 100644 --- a/flows/actions/testdata/send_msg.json +++ b/flows/actions/testdata/send_msg.json @@ -111,7 +111,7 @@ "uuid": "ad154980-7bf7-4ab8-8728-545fd6378912", "text": "Hi there", "attachments": [ - "@(\"\")" + "@(\" \")" ], "quick_replies": [ "@(\"\")"