Comment on page
Workflow Triggers
External webhook functionalities
Shimoku introduces a powerful feature: Workflow Triggers, which seamlessly connect to External Webhooks. This functionality allows Shimoku to invoke external processes — akin to a workflow — using the "Activities" module.
- 1.Activity: Think of an "Activity" as a container. It holds a webhook (an external URL that gets pinged) and the settings that dictate how that webhook behaves.
- 2.Run: Each time an "Activity" is executed, a "Run" is created. This "Run" is the unique instance of that execution. It will have its settings, plus a log that keeps track of any information from the remotely executed process.
s.activities.create_activity(
name: str,
settings: Optional[dict] = None
) -> Dict
This function sets up an activity with a specified name and settings.
s.activities.delete_activity(
uuid: Optional[str] = None,
name: Optional[str] = None
)
As the name implies, this function removes a specific activity.
s.activities.update_activity(
uuid: Optional[str] = None,
name: Optional[str] = None
)
Modify the details of an existing activity.
s.activities.get_activity(
uuid: Optional[str] = None,
name: Optional[str] = None,
pretty_print: bool = False,
how_many_runs: Optional[int] = None
) -> Dict
Retrieve information on a specific activity.
s.activities.create_webhook(
url: str,
uuid: Optional[str] = None,
name: Optional[str] = None,
method: str = 'GET',
headers: Optional[dict] = None
)
Use this to add a webhook to an activity. The webhook will be the URL triggered when the activity is run.
s.activities.execute_activity(
uuid: Optional[str] = None,
name: Optional[str] = None,
run_settings: Optional[Union[dict, str]] = None
)
Launch a specific activity, which subsequently triggers the associated webhook.
s.activities.get_run_logs(
run_id: str, uuid: Optional[str] = None,
name: Optional[str] = None
)
Retrieve the logs linked to a particular activity's run.
Note: Before working with these methods, ensure you've set the menu path using
s.set_menu_path
. This organizes the activities within distinct navigation paths in your app.Last modified 3mo ago