> ## Documentation Index
> Fetch the complete documentation index at: https://help.teable.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Put project workflow logic

> update a automation workflow logic



## OpenAPI

````yaml /swagger.json put /base/{baseId}/workflow/{workflowId}/logic/{logicId}
openapi: 3.0.0
info:
  version: 1.0.0
  title: Teable App
  description: Manage Data as easy as drink a cup of tea
  x-logo:
    backgroundColor: '#F0F0F0'
    altText: Teable logo
servers:
  - url: https://app.teable.ai/api
security: []
tags:
  - name: base
    x-group: project
  - name: base node
    x-group: project node
  - name: base-share
    x-group: project-share
paths:
  /base/{baseId}/workflow/{workflowId}/logic/{logicId}:
    put:
      tags:
        - automation
      description: |-
        update a automation workflow logic

        Required token scopes: `automation|update`
      parameters:
        - schema:
            type: string
          required: true
          name: baseId
          in: path
        - schema:
            type: string
          required: true
          name: workflowId
          in: path
        - schema:
            type: string
          required: true
          name: logicId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: name of the node
                description:
                  type: string
                  description: description of the node
                config:
                  nullable: true
                  description: node configuration
      responses:
        '200':
          description: Successful updated
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      name:
                        type: string
                        description: name of the node
                      description:
                        type: string
                        description: description of the node
                      config:
                        type: object
                        properties:
                          conditions:
                            type: object
                        required:
                          - conditions
                      id:
                        type: string
                        description: node id
                      category:
                        type: string
                        enum:
                          - logic
                      testResult:
                        type: object
                        properties:
                          spent:
                            type: number
                            description: spent time
                          inputRaw:
                            nullable: true
                          outputRaw:
                            nullable: true
                          inputVariables:
                            type: object
                            description: The variables snapshot when executed
                          outputVariables:
                            type: object
                            description: The variables snapshot when executed
                          errorMsg:
                            type: string
                          createdTime:
                            type: string
                        required:
                          - createdTime
                        description: action test result
                      outputVariables:
                        type: object
                        description: output variables
                      inputVariables:
                        type: object
                        description: input variables
                      createdTime:
                        type: string
                        description: created time
                      lastModifiedTime:
                        type: string
                        description: last modified time
                      type:
                        type: string
                        enum:
                          - condition
                        description: Condition logic
                    required:
                      - config
                      - id
                      - category
                      - createdTime
                      - type
                  - type: object
                    properties:
                      name:
                        type: string
                        description: name of the node
                      description:
                        type: string
                        description: description of the node
                      config:
                        type: object
                        properties:
                          fact:
                            oneOf:
                              - type: object
                                properties:
                                  resolvable:
                                    type: boolean
                                    enum:
                                      - true
                                    description: >-
                                      Need be resolved to static values before
                                      running
                                  type:
                                    type: string
                                    enum:
                                      - literal
                                  value:
                                    nullable: true
                                    description: Literal value
                                required:
                                  - resolvable
                                  - type
                              - type: object
                                properties:
                                  resolvable:
                                    type: boolean
                                    enum:
                                      - true
                                    description: >-
                                      Need be resolved to static values before
                                      running
                                  type:
                                    type: string
                                    enum:
                                      - fact
                                  path:
                                    type: string
                                    description: json-path syntax
                                  keyStack:
                                    type: array
                                    items:
                                      type: string
                                    description: save select stack
                                  params:
                                    type: object
                                    properties:
                                      pipes:
                                        type: array
                                        items:
                                          type: string
                                          enum:
                                            - uppercase
                                            - lowercase
                                            - capitalize
                                            - trim
                                            - length
                                            - toString
                                            - jsonStringify
                                            - encodeUrlComponent
                                            - formatDate
                                        description: >-
                                          Pipe functions to transform the fact
                                          value
                                      pipeOptions:
                                        type: object
                                        properties:
                                          formatDate:
                                            type: object
                                            properties:
                                              date:
                                                type: string
                                                description: >-
                                                  the display formatting of the date. you
                                                  can use the following presets: M/D/YYYY,
                                                  D/M/YYYY, YYYY/MM/DD, YYYY-MM-DD,
                                                  YYYY-MM, MM-DD, YYYY, MM, DD
                                              time:
                                                type: string
                                                enum:
                                                  - HH:mm
                                                  - hh:mm A
                                                  - None
                                                description: >-
                                                  the display formatting of the time. you
                                                  can use the following presets: HH:mm,
                                                  hh:mm A, None
                                              timeZone:
                                                type: string
                                                description: >-
                                                  The time zone that should be used to
                                                  format dates
                                            required:
                                              - date
                                              - time
                                              - timeZone
                                            description: >-
                                              caveat: the formatting is just a
                                              formatter, it dose not effect the
                                              storing value of the record
                                        description: Configuration options for pipes
                                  fact:
                                    type: string
                                    description: Fact name, actionId or triggerId
                                required:
                                  - resolvable
                                  - type
                                  - fact
                              - type: object
                                properties:
                                  resolvable:
                                    type: boolean
                                    enum:
                                      - true
                                    description: >-
                                      Need be resolved to static values before
                                      running
                                  type:
                                    type: string
                                    enum:
                                      - array
                                  nodes:
                                    type: array
                                    items:
                                      anyOf:
                                        - type: object
                                          properties:
                                            resolvable:
                                              type: boolean
                                              enum:
                                                - true
                                              description: >-
                                                Need be resolved to static values before
                                                running
                                            type:
                                              type: string
                                              enum:
                                                - literal
                                            value:
                                              nullable: true
                                              description: Literal value
                                          required:
                                            - resolvable
                                            - type
                                        - type: object
                                          properties:
                                            resolvable:
                                              type: boolean
                                              enum:
                                                - true
                                              description: >-
                                                Need be resolved to static values before
                                                running
                                            type:
                                              type: string
                                              enum:
                                                - fact
                                            path:
                                              type: string
                                              description: json-path syntax
                                            keyStack:
                                              type: array
                                              items:
                                                type: string
                                              description: save select stack
                                            params:
                                              type: object
                                              properties:
                                                pipes:
                                                  type: array
                                                  items:
                                                    type: string
                                                    enum:
                                                      - uppercase
                                                      - lowercase
                                                      - capitalize
                                                      - trim
                                                      - length
                                                      - toString
                                                      - jsonStringify
                                                      - encodeUrlComponent
                                                      - formatDate
                                                  description: >-
                                                    Pipe functions to transform the fact
                                                    value
                                                pipeOptions:
                                                  type: object
                                                  properties:
                                                    formatDate:
                                                      type: object
                                                      properties:
                                                        date:
                                                          type: string
                                                          description: >-
                                                            the display formatting of the date. you
                                                            can use the following presets: M/D/YYYY,
                                                            D/M/YYYY, YYYY/MM/DD, YYYY-MM-DD,
                                                            YYYY-MM, MM-DD, YYYY, MM, DD
                                                        time:
                                                          type: string
                                                          enum:
                                                            - HH:mm
                                                            - hh:mm A
                                                            - None
                                                          description: >-
                                                            the display formatting of the time. you
                                                            can use the following presets: HH:mm,
                                                            hh:mm A, None
                                                        timeZone:
                                                          type: string
                                                          description: >-
                                                            The time zone that should be used to
                                                            format dates
                                                      required:
                                                        - date
                                                        - time
                                                        - timeZone
                                                      description: >-
                                                        caveat: the formatting is just a
                                                        formatter, it dose not effect the
                                                        storing value of the record
                                                  description: Configuration options for pipes
                                            fact:
                                              type: string
                                              description: Fact name, actionId or triggerId
                                          required:
                                            - resolvable
                                            - type
                                            - fact
                                    description: >-
                                      Array of literal and fact nodes, all value
                                      will be stringify and join together
                                required:
                                  - resolvable
                                  - type
                                  - nodes
                              - nullable: true
                        required:
                          - fact
                      id:
                        type: string
                        description: node id
                      category:
                        type: string
                        enum:
                          - logic
                      testResult:
                        type: object
                        properties:
                          spent:
                            type: number
                            description: spent time
                          inputRaw:
                            nullable: true
                          outputRaw:
                            nullable: true
                          inputVariables:
                            type: object
                            description: The variables snapshot when executed
                          outputVariables:
                            type: object
                            description: The variables snapshot when executed
                          errorMsg:
                            type: string
                          createdTime:
                            type: string
                        required:
                          - createdTime
                        description: action test result
                      outputVariables:
                        type: object
                        description: output variables
                      inputVariables:
                        type: object
                        description: input variables
                      createdTime:
                        type: string
                        description: created time
                      lastModifiedTime:
                        type: string
                        description: last modified time
                      type:
                        type: string
                        enum:
                          - Repeat
                        description: >-
                          Actions in this group will repeat for each item in the
                          input list.
                    required:
                      - config
                      - id
                      - category
                      - createdTime
                      - type
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request PUT \
              --url https://app.teable.ai/api/base/%7BbaseId%7D/workflow/%7BworkflowId%7D/logic/%7BlogicId%7D \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"name":"string","description":"string","config":null}'
        - lang: JavaScript
          source: >-
            const url =
            'https://app.teable.ai/api/base/%7BbaseId%7D/workflow/%7BworkflowId%7D/logic/%7BlogicId%7D';

            const options = {
              method: 'PUT',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              },
              body: '{"name":"string","description":"string","config":null}'
            };


            try {
              const response = await fetch(url, options);
              const data = await response.json();
              console.log(data);
            } catch (error) {
              console.error(error);
            }
        - lang: Node.js
          source: >-
            const http = require('https');


            const options = {
              method: 'PUT',
              hostname: 'app.teable.ai',
              port: null,
              path: '/api/base/%7BbaseId%7D/workflow/%7BworkflowId%7D/logic/%7BlogicId%7D',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };


            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });


            req.write(JSON.stringify({name: 'string', description: 'string',
            config: null}));

            req.end();
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("app.teable.ai")


            payload =
            "{\"name\":\"string\",\"description\":\"string\",\"config\":null}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }


            conn.request("PUT",
            "/api/base/%7BbaseId%7D/workflow/%7BworkflowId%7D/logic/%7BlogicId%7D",
            payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````