Automation as you know enables you to automate repetitive tasks that save the time taken to perform them manually. It can be used to automate the execution of workflow like when an event is triggered.
Studio now has the feature to Automate tasks. There are typically two steps to be performed in this trigger and action. The Trigger would be when the event is going to occur and the Action which specifies the action to be executed. It is important to understand that the Automation of tasks is possible only on the Published Apps.
Studio currently offers three trigger options, time-based i.e a Scheduler trigger, sheet based which is the action to be performed based on sheet triggers namely new row added, details updated, and so on. The Webhook-based one is mainly used when you have third-party services and wish to be notified on a related action.
Now let us first have a quick look at the video to understand how to create sheet based automation :
Now let us understand here the Sheet based automation. Let us consider a scenario where we would need to send a Slack notification whenever any record is added to the sheet. This workflow would be triggered whenever a new record is added. An automated process to send a slack notification every time a new record is added would make it an easy process. We would thus make use of the Sheet based Automation as the insert actions on the sheet is triggering the next action of sending a Slack message.
For the sake of this example, we will be using the form created for adding the client name and the meeting date and time details on click of the Action button to the Customer_prospect_doc sheet. We have also created a workflow that would be the one triggered to send the Slack message. In this case, it is a workflow that would be linked to the Submit button. Make sure that the app is published.
Now let us add the Sheet based Automation.
Adding Sheet based Automation
Let us see how to add the Sheet based Automation. In Studio, select Automation and click +Automation.
Enter the Automation name. Now that we want to add a Sheet based task, under When this happens, select the Sheet type and click Continue.
Trigger or When this happens
Now for sheet-based automation, there are three triggers that can be the base to trigger the automation; add a new record, update a record, and add or update records. For this example, to set the trigger type, under When this happens, select New Sheet Row and click Done.
Now we need to select the Sheet where the records are to be added. Select Sheet and click Done.
Now under Sample Test Data, you would be able to see the last three records from the sheet. This is the data that can be used as a sample for testing in the next steps. Now select any record and click Done. The selected record would be used as input data for testing the automation.
Now you need to select the app which has the workflow to send a Slack message. From the tasks, you can choose the respective action to trigger a workflow from another app and also add a Slack connector to send a slack message. You can test the task with the test data.
You can now see the record from the sample data which you selected earlier is also shown in the respective field.
You can now test the action if you want. So under Test Task, click Test. In this example, a Slack message would be sent to the specified person/s (that has been specified in the App > Workflow) on the successful execution of the action.
For this example, we had only sent the Meeting date in the Slack Message, hence you can see the date here in the Slack app.
Now once you are satisfied with the Sheet based automation task, click Save. The Automation task created would be listed under Automations list. Note the Status. You can toggle it ON or OFF as required.
Thus you can make use of the Sheet based automation for triggering actions on insert and update of records.