From 0d479426ed47be415fecda620cb33a18e03a648c Mon Sep 17 00:00:00 2001 From: Faruk AYDIN Date: Wed, 9 Nov 2022 21:30:32 +0100 Subject: [PATCH] docs: Add $.step.parameters property to global variable --- packages/docs/pages/build-integrations/global-variable.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/docs/pages/build-integrations/global-variable.md b/packages/docs/pages/build-integrations/global-variable.md index ad098f72..df3e5048 100644 --- a/packages/docs/pages/build-integrations/global-variable.md +++ b/packages/docs/pages/build-integrations/global-variable.md @@ -64,6 +64,14 @@ await $.http.get('/v1/images/search?order=DESC', { }); ``` +## $.step.parameters + +```typescript +$.step.parameters; // { key: 'value' } +``` + +It refers to the parameters that are set by users in the UI. We use this property when we need to get the parameters for corresponding triggers and actions. For example [Send a message to channel](https://github.com/automatisch/automatisch/blob/main/packages/backend/src/apps/slack/actions/send-a-message-to-channel/post-message.ts) action from Slack integration, we have a step parameter called `message` that we need to use in the action. We can use `$.step.parameters.message` to get the value of the message to send a message to the Slack channel. + ## $.pushTriggerItem ```typescript