Actions
What is an action?
An action is a task performed within a workflow, using one of the connections you’ve set up.
Action types
Strada-defined action
A pre-configured action which simplifies a commonly used task for a given connection. For example, the Send Message
action for Slack.
Custom HTTP action
Allow you to make a request to the connection’s underlying API.
Strada makes it easy to create these requests by presenting the endpoint’s query, headers, and body visually.
Using actions in your code
All actions are instances of class which inherit from the following definition:
Therefore, every Strada action has a .execute()
method that is used to invoke the action in the code.
Specifying parameters
Parameters can be provided as keyword arguments (**kwargs
) within the execute
method
For example, for a workflow with a Send Message Slack action called SendMsg
, with a custom parameter called message
, the .execute()
method can be called as follows:
**kwargs
) and not arguments (*args
). Therefore, specifyingActionName.execute(param="Value")
is valid, but specifying ActionName.execute("Value")
is not. Action responses
All Strada actions have the following Pydantic model as a response:
The data
attribute will have a different model based on the app (i.e. Slack, Jira) and action (i.e. send message, create ticket). You can view the exact documentation for the schema responses for all apps and actions in Integrations.
All responses are subscriptable, meaning you can access any value using the following two ways:
OR
Example
In the screenshot below, the SendMessage
sends a message that is based on the parameter name
using the Slack API.
To invoke this action in your workflow use: