Marketplace Workflow Actions action
Marketplace Workflow Actions in Stack allow you to create custom actions that interact with your application or API. These actions can push or pull data using customized fields and API endpoints, providing flexibility in your workflows.
Note: Marketplace Workflow Actions are part of Stack’s Premium Triggers & Actions and incur charges per execution.
Prerequisites
Section titled “Prerequisites”Ensure the workflows.readonly scope is enabled to access actions and triggers.
Creating an Action
Section titled “Creating an Action”Naming Your Action
Section titled “Naming Your Action”- Name: Enter a descriptive name for your action.
- Key: Provide a unique identifier for this action. This key is used to reference the action within the workflow and cannot be changed later. Example:
{{mycustomaction.data.name}}
Action Information
Section titled “Action Information”- Icon: Choose an icon to represent this action within the workflow.
- Short Description: Provide a brief explanation of what your action does.
- Summary: Offer detailed information to help users understand the purpose and benefits of using this action.
Action Configuration
Section titled “Action Configuration”Managing Fields
Section titled “Managing Fields”Construct a form to collect the necessary data for your API.
Create New Field
Section titled “Create New Field”- Name: Enter the field name.
- Type: Select from various field types such as String, Numerical, Textarea, Select, Multiple Select, Radio, Toggle, Checkbox, Attachment, Rich Text Editor, Hidden, or Dynamic.
- Required: Indicate if this field is mandatory.
- Reference: Provide a unique reference key. Example:
action_a_name - Default Value: Set a default value for this field.
- Alters Dynamic Field: Enable this to trigger reloading of dynamic fields when the field value changes.
Field Types
Section titled “Field Types”- Select / Multi Select / Radio: Choose option types like Constants, Internal Reference, or External API.
- Constants: Add custom Label-Value pairs.
- Internal Reference: Load options from Stack’s internal modules.
- External API: Fetch options from an external API endpoint.
Multi-branch
Section titled “Multi-branch”Create branches that adjust dynamically based on predefined conditions. Each contact can be directed down the appropriate path based on their interactions or status.
Action Execution
Section titled “Action Execution”Choose between executing via an API or custom code.
Using API
Section titled “Using API”- URL (POST): Enter your API endpoint URL. Data is sent via POST method.
- Headers: Add necessary headers for the API request.
Custom Code
Section titled “Custom Code”Custom Code allows you to create complex logic and integrations.
- Code Editor: Write your code and perform HTTP requests.
- Output: Must be a JavaScript Object or Array of Objects.
Testing and Formatting Code
Section titled “Testing and Formatting Code”Testing is mandatory to ensure the code works correctly. Use the “Test Code” button to validate your logic. Format the code using the “Format code” button.
Pause Execution
Section titled “Pause Execution”This toggle holds the contact at this action until a resume webhook is requested. If enabled, an extras object must be passed as a payload for resuming the workflow.
Managing Custom Variables
Section titled “Managing Custom Variables”Utilize sample response data to configure custom variables for use in workflows.
- Add Custom Variable: Define a label and select a reference key from the sample response.
Version Control
Section titled “Version Control”Submit for Review
Section titled “Submit for Review”After updating your action, submit it for review. Provide changelog information for the submitted version. Once approved, it will be published live.
Create New Version
Section titled “Create New Version”To update an action, click on + New Version. This creates a draft version with prefilled data from the previous version.
Deleting an Action
Section titled “Deleting an Action”Deleting an action is permanent and cannot be undone. It will be removed from the Marketplace App and Workflow Action list. If part of any workflow, the action’s execution will be skipped.
- Confirmation: Enter the action name to confirm deletion.