JasonB
1
When triggering a normal CloudCode task, it is very easy to access the webhook and associated data, as described here.
When I create a TypeScript CloudCode task, the same logic doesn’t appear to work directly. How can I access the webhook/event object in a TS CC task?
kobie
2
Give this a spin in your TS CloudCode Task:
export async function run(this: TaskContext, event) {
console.log('webhook object = ', event.object)
}
Is that what you’re looking for?
JasonB
3
Great, thanks. Exactly what I was looking for.
1 Like
kobie
4
Note that your task requires this:
import { TaskContext } from '@journeyapps/cloudcode';
in some cases converting from JS does not add this