Hello fellow squids,
I’m setting up some webhooks in order to automate my organisation’s workflow.
In the guide to formatting, there is an example of a payload, which includes the following line:
if ( ... ) {
return "I just uploaded a large image ${event.fileName}";
} else { ...
but I can’t see “fileName” in the list right above the example, which contains the information that can be integrated from the enriched event, so I am confused about how to use the payload, and the paragraph about template strings doesn’t clear it up either…
Question: To be very verbose, what exactly should I put in the payload field, in order to return all entries from a specific schema? If my app name is “morning-gazette” and the schema name is “article”, would this be correct syntax, or what would be?
return ${ 'morning-gazette/article' }
Furthermore, the description of the shared secret is a bit confusing. The hint states that “the shared secret is used to calculate the signature” but doesn’t specify what method of calculation is used.
Question: How is the signature calculated from the secret (in this example case “securekey”)?