Steps for building an app
Some tips to get started with building your own Slack apps
1. Outline your app's features and automations
After figuring out how your app will help make other people’s work simpler and more productive, list the use-cases that your app will cover.
Start planning the workflows to automate your use-cases. To decide which flows make sense to hook into, it’s helpful to know about workflows and different workflow types in Actioner.
Workflows enable automation of your processes by listening events from your tools and Slack workspace. A workflow can listen a webhook, a Slack or a HubSpot event. By add new steps to your workflow, you can connect it with actions.
Your app can consist of workflows that
- listen events happening in your tool and execute Slack-specific functions, such as notifying a user or creating a collaboration channel.
- and listen events happening in your Slack workspace and perform an operation in other tools, such as creating a record or updating an entity.
2. Create a new app from scratch
To create a new app, go to My apps page from left menu and click + Add new app at top left corner. Select Start from scratch option.
2. Setup connections with your tools
For an action to communicate with a tool, it has to be authorized to interact with it. This authorization is referred as connection.
Requests in Actioner are sent to perform actions or to retrieve data for action components. Connections simply enable actions to send API requests to an application.
To add a new connection, go to App settings tab of your app and click + Add new connection.
3. Design your actions
Action designer is a flexible no-code visual designer tool, used for creating and customizing actions. Below you will find recommended action designing steps. Keep in mind that you can always go back and forth between components or revisit any step later on. Your progress on your actions is automatically saved as you update any component.
Action designing steps
Create a new action.
Add your input components.
Add your requests.
Add API requests to generate dynamic values for action components and to perform operations in your tools.
Add Slack requests to add Slack-native functionalities to your actions, such as to send a direct message or to create a new channel.
Add utility requests for specific functions natively provided by Actioner, such as getting the weather status or a translation of a phrase or inserting gifs from Giphy.
Add link requests to open external links in a new tab.
Add your output components.
Add your functions. You can use functions to write larger, reusable, blocks of code. Add them
- if you find yourself using the same or similar blocks of code multiple times throughout your action
- to store variables —and their values— both on action level and on app level.
Add requests and functions to run steps in the order that they will be executed when the action is run.
When all is set, Apply changes.
4. Start listening events through workflows
Every workflow has a trigger, a condition, and steps that runs actions.
- Trigger is the event that sets the workflow into motion. A new object created or a record update in your tool can be a trigger.
- Condition is the requirement that the trigger must satisfy for the workflow to run an action. You can setup conditions based on the data of the event Actioner receives from your system.
- Steps are the events that occur as a result of the trigger if conditions are satisfied. You can add steps that run actions such as that creates a Slack notification or updates a record in your tool.
Depending on the triggering event, there are three types of workflows you can add to your apps.
→ Webhook workflows listen events happening in the tool you setup a webhook with Actioner.
→ Slack workflows listen events happening in your Slack workspace.
→ HubSpot workflows listen events happening in your HubSpot account.
5. Setup workflow conditions
All workflows have conditions. Conditions are used to provide execution of workflows steps when they are met. You can customize conditions to be processed with incoming data that Actioner receives for a particular event.
A webhook endpoint processes every data it receives and evaluates them against the conditions of the workflow. If conditions are met, Actioner runs the selected action(s) in that workflow's steps and ends the processing on that particular webhook. If conditions are not satisfied, nothing happens.
Likewise, Actioner processes Slack and HubSpot event data tied with the selected event type. When you add conditions, the workflow steps are executed as long as the conditions are met.
6. Add steps to your workflow
Click + Add step button to create a new step in your workflow.
You can add additional conditions for each workflow's steps. That particular step is executed as long as the conditions for the workflow are satisfied AND the conditions that you added to your step are satisfied.
Select the action that will be run once Actioner receives data that satisfies the conditions. When you select an action, the action's input fields open up. Provide parameters that the action will run with.
Pass data to your actions from events
To pass data from an event payload to an action, use action's inputs. You can reference to values in the body of the event payload by typing {{event.body}}
inside curlies. Actioner autocompletes as you type.
Pass data between workflow steps
You can use any data in the context of an action executed in an earlier step. Get this data with {{context.get('key')}}
inside curlies. If the input is a dropdown, select dynamic option.
Make sure that you have added a function that puts the key
in the context of the action that is executed in an earlier step.
Store data on app level
You can store dynamic data on app level and pass it between workflows and actions across your app.,
Add a function that stores data in key-value format and then get that value anywhere in your app by typing store.get('key')
.
→ Learn more about app storage data.
7. Add setup actions
Setup actions provide flexibility to personalize workflows and share data that can be used across various actions and workflows. If you are building an app for various teams, you may need to get some input from users. Or you may want to design a seamless experience by automating the starting points.
You can add setup actions:
To provide seamless first experience to your users. You can create webhooks in external systems through API requests added to a setup action or create Slack channels that Actioner will send notifications to and/or listen events from.
When your app needs an input from users to get started. If you are looking to process certain events depending on the input of a user, you can design a setup action that takes that input from a user or users, store that data and refer to it in your workflow conditions and steps.
To set data that do not change easily across multiple actions. For example, you can setup an action that gets the ID of a Slack channel that your app posts notifications. And refer to this data whenever it is needed.
If same values are repeated multiple times throughout your app. For instance, posting different notifications to a specific channel means that you are selecting the same channel on multiple workflows. You can setup an action that sets the channel from one place and updates it in multiple places that references it.