An action is an event that starts from our platform and takes place in the other app. An action usually takes place as a result of a trigger. An integration can have one or more actions.
How are Actions Created?
This is a detailed guide on how to create an action.
Suppose you want to create an action “Create Message” in your app “Basecamp”. You will select the Actions tab from the app menu. This page will display all existing actions in your app as shown below. To create a new one, click the Create Action button. A form will appear that will take the action metadata as input.
Action Basic Info
Starting with basic information, action name, and description.
Once the endpoint is added, next you need to select the Authorization method of your action. This comes in handy if your app supports multiple authorization types. In most of the cases, the action authorization type is the same as the app authorization type. In this case, you will select the authorization type from the drop-down menu. If not, select Create new Authorization from the menu. Read, How to create an authorization endpoint.
Generally, an action consumes an object as Input. These objects are defined by Integry, which are mostly generic such as Contact, Tasks, User, Event, etc. Using the input object you can perform actions on these objects, such as, Create, Update, Delete, etc. Learn more about Input Objects and how to set them up. An action can also produce an output object. You can define the output object when you create the action endpoint. Learn more.
Activity Fields are where you define data that is collected from the user when an action is added to a template and when the integration is created. We know from Basecamp API Docs, if we want to create a message in Basecamp, the following endpoint has to be executed
publishes a message in the project with ID 1 and under the message board with an ID of 3. Furthermore, we also know that the base part of this URL is https://3.basecampapi.com/5 where 5 is the Account ID.
For a successful message post, we will need to provide Basecamp Account, Project, and Message Board IDs. This information is provided by the user when they create integration and it is collected through activity fields. Learn how to configure activity fields.
Input Object and Activity Fields
When you select an Input Object for an action, the attributes of that object needs to be mapped against the activity fields added. How the object attributes and activity fields can be mapped? Learn here.
Next, you need to add the action endpoint. To perform an action your app needs to execute an endpoint in the third-party app. This endpoint is executed by sending a request to the external API. Every action needs an endpoint to be configured with it. Learn here what are endpoints and how to add them to your actions.
This field saves the output of both actions and triggers.
Hooks are the endpoints that are executed when a user saves, deletes, or updates an integration that uses the action. The hooks associated are configured while setting up the action. To learn about these and how to add them to your action or trigger, click here.
Saving an Action
When you proceed to save the action you can view three buttons at the end of the page as shown below.
Cancel: Cancels the action altogether
Create Action: Save the action as a draft. You can edit it and test it thoroughly before you submit it for approval. Other users cannot view the action while creating templates unless the action is published.
Submit for Approval: When you submit action for approval, it is sent to our team for review. Once all looks good and is tested properly, the action is published. It becomes available to other apps as well.
Once the action is published, you have very limited modification ability. Not all parts of the activity can be edited. Learn more.
You can cancel the request for approval to make changes. As soon as you submit the request, you can view a Cancel Review and Edit Action button.
Testing an Action
We hope this guide helped you about grasping the basic concept of actions, their creation, and testing.