arazzo: 1.0.1
info:
title: Asana Add a Custom Field to a Project
summary: Create a workspace custom field and attach it to a project as a custom field setting.
description: >-
A schema-extension flow. The workflow creates a new custom field in a
workspace and then attaches that field to a project by creating a custom
field setting, making the field available on every task in the project. Each
request is written inline so the flow can be read and executed without
opening the underlying OpenAPI description. The custom field setting endpoint
lives only in the full Asana description, so every step is addressed through
that single source.
version: 1.0.0
x-realizes-capability-ids:
- BC-900.30
x-capability-derivation:
method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.'
min_confidence: 0.7
sources:
- capability_id: BC-900.30
capability_name: Project Management
spec: asana-projects-api-openapi.yml
confidence: 0.85
model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: customFieldsApi
url: ../openapi/asana-custom-fields-api-openapi.yml
type: openapi
- name: projectsApi
url: ../openapi/asana-projects-api-openapi.yml
type: openapi
workflows:
- workflowId: add-custom-field-to-project
summary: Create a custom field and attach it to a project.
description: >-
Creates a custom field in a workspace, then adds it to a project as a custom
field setting.
inputs:
type: object
required:
- workspaceGid
- projectGid
- fieldName
- fieldType
properties:
workspaceGid:
type: string
description: Workspace gid the custom field is created in.
projectGid:
type: string
description: Project gid to attach the custom field to.
fieldName:
type: string
description: Name of the custom field.
fieldType:
type: string
description: Field type, one of text, enum, multi_enum, number, date, people.
isImportant:
type: boolean
description: Whether the field appears in the project's task list as a column.
steps:
- stepId: createCustomField
description: Create the custom field in the workspace.
operationId: $sourceDescriptions.customFieldsApi.createCustomField
requestBody:
contentType: application/json
payload:
data:
name: $inputs.fieldName
resource_subtype: $inputs.fieldType
workspace: $inputs.workspaceGid
successCriteria:
- condition: $statusCode == 201
outputs:
customFieldGid: $response.body#/data/gid
- stepId: attachToProject
description: Attach the custom field to the project as a custom field setting.
operationId: $sourceDescriptions.projectsApi.addCustomFieldSettingForProject
parameters:
- name: project_gid
in: path
value: $inputs.projectGid
requestBody:
contentType: application/json
payload:
data:
custom_field: $steps.createCustomField.outputs.customFieldGid
is_important: $inputs.isImportant
successCriteria:
- condition: $statusCode == 200
outputs:
settingResult: $response.body#/data
outputs:
customFieldGid: $steps.createCustomField.outputs.customFieldGid
projectGid: $inputs.projectGid
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.