Actions
Perform the CRUD operation on the apps connected with Gupshup Integrations. Gupshup develops actions as per the API endpoints that the apps support. Then, those actions are configured as steps of a workflow.
Actions are responsible for performing the specified task of the app we connect. Acting as a secondary yet most important aspect of a journey, actions support more input fields than triggers allowing CRUD operation to perform in a fine-tuned manner. Apps that Gupshup supports contain a group of the following action features:
- Send
- Create/Add
- Update
- Search
- Get
- Delete
Action is completely dependent on the APIs of the app. Some apps may support all the APIs of the actions whereas some may not.
Let's take a tour of this guide and study the actions using Google Sheets and Google Calendar as an example.
Send email using Gmail
The Send action allows you to send an email to a person with attachments, clickable buttons, etc. Consider the following Send email action in Gmail:
Create/Add a row in Google Sheets
The Create/Add action lets you create an object in the account you connect. Consider the Add action example we have discussed here. In Google Sheets, creating or adding data in a row requires input in the Spreadsheet and Sheet field:
Once executed, the Add row action will add a new row with the data specified in the input fields. In the action output, you can see the data created in the specified sheet of Google Sheets.
Update a row in Google Sheets
The Update action allows you to make changes to the existing data. The input specified in the action fields uniquely identifies the data to be updated.
For example, update a row in a specific sheet of Google Sheets:
On execution, the action will update the data of a row specified and will return the entire object with all the fields in the action output.
Search a cell in Google Sheets
The Search action is used to search for data with the help of the inputs specified in the action fields.
In Google Sheets, you can search cell(s) in a specific spreadsheet. You just need to define the name of the spreadsheet in which you want to perform the search operation. The Search action will return all the cells matching the specified query condition:
If no objects are found, the Search action will return an empty list throwing no error. However, the other actions dependent on the search results will fail to execute.
Get sheet data in Google Sheets
The Get action is similar to the Search action, except for the results obtained. The Get action is more pinpointed and fetches the exact data of the object using unique Identifiers as an input. If the object is not found, the Get action will throw an error:
In the case of Google sheets, using the Get action on an account will require you to input the Sheet ID and row or column of which data you want to retrieve.
Delete an event in Google Calendar
The Delete action lets you delete any object or data from the app connected. Using Google Calendar as an example app, let's see an action to delete a specific event. The input to this action is Calendar ID and Event ID:
Upon execution, the journey will delete the specified event from Google Calendar.
Cloning an action step
Cloning an action step will give you a replica of the original action with defined input fields, mentioned data pills, established connections, and scripted formulas. Cloning applies to simple actions and conditional blocks.
To clone, hover on the action bar and click the Clone button. A copy of the action will be created below it.
Deleting an action step
Hover on the step bar and click the Delete Step button. Upon confirming, the action will be deleted. Deleting an action might hamper the execution of a journey:
A trigger cannot be deleted as it is the starting point of journey execution.
Updated about 1 year ago