You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The docs show 2 contradicting ways to access workflow events payload.
Under Rules For Workflows, there's an example showing that the event payload can be accessed directly using event.data or event.user - both properties are defined in MyEvent interface.
Under Events and Parameters, it says that event properties are accessible via event.payload. E.g. event.payload.userEmail
The only difference between the 2, is that the second one is TypeScript while the first one is Javascript. But I don't believe that it should really make any difference.
2 more things:
Maybe worth showing how event properties can be used inside the workflow/steps in the Pass parameters to a Workflow section, which is not TypeScript specific as the one following it.
The example in Get started guide shows that "my first step" returns the event. This is confusing imo, as it suggests that in order to access the event in following steps it has to be returned from previous steps. In case I got it wrong, and indeed it's recommended to return it in each step, then it has to be explicitly documented and not just appear in the example.
Please provide a link to a minimal reproduction
No response
Please provide any relevant error logs
No response
The text was updated successfully, but these errors were encountered:
Which Cloudflare product(s) does this pertain to?
Other
What version(s) of the tool(s) are you using?
3.97.0 wrangler
What version of Node are you using?
20.18.0
What operating system and version are you using?
Mac sonoma 14.6.1
Describe the Bug
The docs show 2 contradicting ways to access workflow events payload.
Under Rules For Workflows, there's an example showing that the event payload can be accessed directly using
event.data
orevent.user
- both properties are defined in MyEvent interface.Under Events and Parameters, it says that event properties are accessible via
event.payload
. E.g.event.payload.userEmail
The only difference between the 2, is that the second one is TypeScript while the first one is Javascript. But I don't believe that it should really make any difference.
2 more things:
Please provide a link to a minimal reproduction
No response
Please provide any relevant error logs
No response
The text was updated successfully, but these errors were encountered: