The createActionFromTemplate() GraphQL mutation is used to create an action from yaml template.

For more information on creating an action, see the Actions documentation page.

Syntax

Below is the syntax for the createActionFromTemplate() mutation field:

graphql
createActionFromTemplate(
      input: CreateActionFromTemplateInput!
   ): Action!

Given Datatypes

For the input CreateActionFromTemplateInput, there are several parameters that may be given. Below is a list of them along with their datatypes and a description of each:

Table: CreateActionFromTemplateInput

ParameterTypeRequiredDefaultDescription
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column.
Table last updated: Sep 17, 2024
namestringyes The name of the action.
viewNamestringyes The name of the view of the action.
yamlTemplateYAMLyes A template that can be used to recreate the action.

Returned Datatypes

The returned interface Action has its own parameters. Below is a list of them along with their datatypes and a description of each:

Table: Action

ParameterTypeRequiredDefaultDescription
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column.
Table last updated: Sep 17, 2024
allowedActions[AssetAction]yes A list of allowed asset actions. See AssetAction.
displayNamestringyes The display name of the action.
idstringyes The unique identifier of the action.
isAllowedToRunbooleanyes Whether the action is allowed to run. Should be false if this type of action is disabled because of a security policy.
namestringyes The name of the action.
requiresOrganizationOwnedQueriesPermissionToEditbooleanyes This should be set to true if this action is used by triggers, where the query is run by the organization. If true, then the OrganizationOwnedQueries permission is required to edit the action.
packagePackageInstallationyes The package, if any, of which the action is part. See PackageInstallation.
packageIdVersionedPackageSpecifier  The unique identifier of the package. See VersionedPackageSpecifier.
xYAMLyes A template that can be used to recreate the action.