[ https://issues.apache.org/jira/browse/NIFI-6167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16806643#comment-16806643 ]
Peter Turcsanyi edited comment on NIFI-6167 at 4/1/19 10:54 AM: ---------------------------------------------------------------- Hi [~spiglitz], The correct syntax for calling the [now|https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#now] function is {{now()}}. So the fixed expression: {noformat} { "fallback": "A flow in Apache NiFi has failed or experienced an error. ${now():format('h:mm a')}" } {noformat} Please let me know if it works for you then the issue can be closed. Best, Peter Turcsanyi was (Author: turcsanyip): Hi [~spiglitz], The correct syntax for calling the [now|https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#now] function is {{now()}}. So the fixed expression: {noformat} { "fallback": "A flow in Apache NiFi has failed or experienced an error. ${now():format('h:mm a')}" } {noformat} > PutSlack Processor Attachments Expression Language Error > -------------------------------------------------------- > > Key: NIFI-6167 > URL: https://issues.apache.org/jira/browse/NIFI-6167 > Project: Apache NiFi > Issue Type: Bug > Components: Extensions > Affects Versions: 1.9.0 > Reporter: Adam Fisher > Assignee: Peter Turcsanyi > Priority: Major > Labels: features > Attachments: PutSlackError.jpg > > > While using *PutSlack* processor, add the following JSON payload as the > dynamic property value for an attachment: > {code:java} > { > "fallback": "A flow in Apache NiFi has failed or experienced an error. > ${now:format('h:mm a')}", > } > {code} > This produces a validation error that the JSON can not be parsed. It doesn't > matter where the EL is placed (e.g. different JSON fields) it always > complains about EL even though the documentation supports EL. > !PutSlackError.jpg! > Perhaps there a trick to embedding EL inside JSON quotes I am missing? -- This message was sent by Atlassian JIRA (v7.6.3#76005)