Unable to start workflows via CLI

I have created a workflow which I can execute manually via the editor. However, when I try to start this workflow using the CLI, I received the following errors: The credentials of type “googleApi” are not known.

In the editor, I’ve already created my googleAPI credential, so I am not sure why it is complaining about this. Here is my code:

{
  "name": "Test",
  "nodes": [
    {
      "parameters": {},
      "name": "Start",
      "type": "n8n-nodes-base.start",
      "typeVersion": 1,
      "position": [
        250,
        150
      ]
    },
    {
      "parameters": {
        "fromEmail": "[email protected]",
        "toEmail": "[email protected]",
        "subject": "Test",
        "text": "=Timestamp: {{$node[\"Generate a GUID & Set Status to Pending\"].json[\"Timestamp\"]}}\nRequestor: {{$node[\"Generate a GUID & Set Status to Pending\"].json[\"Enter your full name\"]}}\nEmail: {{$node[\"Generate a GUID & Set Status to Pending\"].json[\"Enter your email address\"]}}\nDate/Time Selected: {{$node[\"Generate a GUID & Set Status to Pending\"].json[\"Select a date and time\"]}}\nGuid: {{$node[\"Generate a GUID & Set Status to Pending\"].json[\"Guid\"]}}\nStatus: {{$node[\"Generate a GUID & Set Status to Pending\"].json[\"Status\"]}}",
        "options": {}
      },
      "name": "Send Email",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 1,
      "position": [
        1450,
        400
      ],
      "credentials": {
        "smtp": "CFB Email"
      }
    },
    {
      "parameters": {
        "requestMethod": "POST",
        "url": "https://cloud.uipath.com/Coy/Coy/odata/Queues/UiPathODataSvc.AddQueueItem",
        "jsonParameters": true,
        "options": {
          "bodyContentType": "json"
        },
        "bodyParametersJson": "={\"itemData\":{\"Name\": \"Test\",\"Priority\":\"Normal\",\"SpecificContent\":{\"Timestamp\":\"{{$node[\"Generate a GUID & Set Status to Pending\"].json[\"Timestamp\"]}}\",\"Name\":\"{{$node[\"Generate a GUID & Set Status to Pending\"].json[\"Enter your full name\"]}}\",\"Email\": \"{{$node[\"Generate a GUID & Set Status to Pending\"].json[\"Enter your email address\"]}}\",\"DateTime\":\"{{$node[\"Generate a GUID & Set Status to Pending\"].json[\"Select a date and time\"]}}\",\"Guid\":\"{{$node[\"Generate a GUID & Set Status to Pending\"].json[\"Guid\"]}}\",\"Status\": \"{{$node[\"Generate a GUID & Set Status to Pending\"].json[\"Status\"]}}\"}}}",
        "headerParametersJson": "={\"Authorization\":\"bearer {{$node[\"Retrieve Access Token\"].json[\"access_token\"]}}\", \"X-UIPATH-OrganizationUnitId\": \"{{$node[\"Retrieve Organization Unit ID\"].json[\"value\"][0][\"Id\"]}}\"}"
      },
      "name": "Create Queue Item",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        1300,
        400
      ]
    },
    {
      "parameters": {
        "url": "https://cloud.uipath.com/Coy/Coy/odata/Folders?$filter=DisplayName eq 'Default'",
        "jsonParameters": true,
        "options": {},
        "headerParametersJson": "={\"Authorization\":\"bearer {{$json[\"access_token\"]}}\"}"
      },
      "name": "Retrieve Organization Unit ID",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        1150,
        400
      ]
    },
    {
      "parameters": {
        "requestMethod": "POST",
        "url": "https://account.uipath.com/oauth/token",
        "jsonParameters": true,
        "options": {
          "bodyContentType": "json",
          "timeout": 6000
        },
        "bodyParametersJson": "{\"grant_type\":\"refresh_token\",\"client_id\":\"8DEv1AMNXczW3y4U15LL3jYf62jK93n5\",\"refresh_token\":\"iTIup5J0eDkkDwP6UaoZSnM7bthlJhWFNLM4vpoDIpKEL\"}",
        "headerParametersJson": "={\"X-UIPATH-TenantName\":\"Coy\"}"
      },
      "name": "Retrieve Access Token",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        1000,
        400
      ]
    },
    {
      "parameters": {
        "sheetId": "1BDWazX_Zq5tLdSqGniVohkdL8ZJxgqOpIvKyiQj0rGI",
        "range": "A:Z",
        "options": {
          "valueRenderMode": "FORMATTED_VALUE"
        }
      },
      "name": "Read from Test",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 1,
      "position": [
        400,
        300
      ],
      "alwaysOutputData": true,
      "credentials": {
        "googleApi": "n8n Test Project"
      }
    },
    {
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{$json[\"Status\"]}}",
              "value2": "Rejected"
            },
            {
              "value1": "={{$json[\"Status\"]}}",
              "value2": "Approved"
            }
          ]
        },
        "combineOperation": "any"
      },
      "name": "Check if Status is Approved or Rejected",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        550,
        300
      ]
    },
    {
      "parameters": {
        "functionCode": "const uuid = require('uuid');\nitems[0].json.Guid = uuid.v4();\nitems[0].json.Status = \"Pending\";\nreturn items;\n"
      },
      "name": "Generate a GUID & Set Status to Pending",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        700,
        400
      ]
    },
    {
      "parameters": {
        "operation": "update",
        "sheetId": "1BDWazX_Zq5tLdSqGniVohkdL8ZJxgqOpIvKyiQj0rGI",
        "range": "=A:F",
        "key": "Enter your email address",
        "options": {}
      },
      "name": "Update Test",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 1,
      "position": [
        850,
        400
      ],
      "credentials": {
        "googleApi": "n8n Test Project"
      },
      "notes": "Email address is used as the key to identify which row to update"
    },
    {
      "parameters": {
        "triggerTimes": {
          "item": [
            {
              "hour": 8
            }
          ]
        }
      },
      "name": "Cron",
      "type": "n8n-nodes-base.cron",
      "typeVersion": 1,
      "position": [
        250,
        300
      ]
    }
  ],
  "connections": {
    "Retrieve Organization Unit ID": {
      "main": [
        [
          {
            "node": "Create Queue Item",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Retrieve Access Token": {
      "main": [
        [
          {
            "node": "Retrieve Organization Unit ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Queue Item": {
      "main": [
        [
          {
            "node": "Send Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read from Test": {
      "main": [
        [
          {
            "node": "Check if Status is Approved or Rejected",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if Status is Approved or Rejected": {
      "main": [
        [],
        [
          {
            "node": "Generate a GUID & Set Status to Pending",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate a GUID & Set Status to Pending": {
      "main": [
        [
          {
            "node": "Update Test",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Test": {
      "main": [
        [
          {
            "node": "Retrieve Access Token",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Cron": {
      "main": [
        [
          {
            "node": "Read from Test",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start": {
      "main": [
        [
          {
            "node": "Read from Test",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "timezone": "Asia/Singapore"
  },
  "id": "2"
}

@liusiyong welcome to the community.

Looks like it seems something wrong with the JSON. Can you please verify you copied it correctly?

My bad. Here u go.

{
  "nodes": [
    {
      "parameters": {},
      "name": "Start",
      "type": "n8n-nodes-base.start",
      "typeVersion": 1,
      "position": [
        250,
        150
      ]
    },
    {
      "parameters": {
        "fromEmail": "[email protected]",
        "toEmail": "[email protected]",
        "subject": "Test",
        "text": "=Timestamp: {{$node[\"Generate a GUID & Set Status to Pending\"].json[\"Timestamp\"]}}\nRequestor: {{$node[\"Generate a GUID & Set Status to Pending\"].json[\"Enter your full name\"]}}\nEmail: {{$node[\"Generate a GUID & Set Status to Pending\"].json[\"Enter your email address\"]}}\nDate/Time Selected: {{$node[\"Generate a GUID & Set Status to Pending\"].json[\"Select a date and time\"]}}\nGuid: {{$node[\"Generate a GUID & Set Status to Pending\"].json[\"Guid\"]}}\nStatus: {{$node[\"Generate a GUID & Set Status to Pending\"].json[\"Status\"]}}",
        "options": {}
      },
      "name": "Send Email",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 1,
      "position": [
        1450,
        400
      ],
      "credentials": {
        "smtp": "CFB Email"
      }
    },
    {
      "parameters": {
        "requestMethod": "POST",
        "url": "https://cloud.uipath.com/Coy/Coy/odata/Queues/UiPathODataSvc.AddQueueItem",
        "jsonParameters": true,
        "options": {
          "bodyContentType": "json"
        },
        "bodyParametersJson": "={\"itemData\":{\"Name\": \"Test\",\"Priority\":\"Normal\",\"SpecificContent\":{\"Timestamp\":\"{{$node[\"Generate a GUID & Set Status to Pending\"].json[\"Timestamp\"]}}\",\"Name\":\"{{$node[\"Generate a GUID & Set Status to Pending\"].json[\"Enter your full name\"]}}\",\"Email\": \"{{$node[\"Generate a GUID & Set Status to Pending\"].json[\"Enter your email address\"]}}\",\"DateTime\":\"{{$node[\"Generate a GUID & Set Status to Pending\"].json[\"Select a date and time\"]}}\",\"Guid\":\"{{$node[\"Generate a GUID & Set Status to Pending\"].json[\"Guid\"]}}\",\"Status\": \"{{$node[\"Generate a GUID & Set Status to Pending\"].json[\"Status\"]}}\"}}}",
        "headerParametersJson": "={\"Authorization\":\"bearer {{$node[\"Retrieve Access Token\"].json[\"access_token\"]}}\", \"X-UIPATH-OrganizationUnitId\": \"{{$node[\"Retrieve Organization Unit ID\"].json[\"value\"][0][\"Id\"]}}\"}"
      },
      "name": "Create Queue Item",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        1300,
        400
      ]
    },
    {
      "parameters": {
        "url": "https://cloud.uipath.com/Coy/Coy/odata/Folders?$filter=DisplayName eq 'Default'",
        "jsonParameters": true,
        "options": {},
        "headerParametersJson": "={\"Authorization\":\"bearer {{$json[\"access_token\"]}}\"}"
      },
      "name": "Retrieve Organization Unit ID",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        1150,
        400
      ]
    },
    {
      "parameters": {
        "requestMethod": "POST",
        "url": "https://account.uipath.com/oauth/token",
        "jsonParameters": true,
        "options": {
          "bodyContentType": "json",
          "timeout": 6000
        },
        "bodyParametersJson": "{\"grant_type\":\"refresh_token\",\"client_id\":\"8DEv1AMNXczW3y4U15LL3jYf62jK93n5\",\"refresh_token\":\"iTIup5J0eDkkDwP6UaoZSnM7bthlJhWFNLM4vpoDIpKEL\"}",
        "headerParametersJson": "={\"X-UIPATH-TenantName\":\"Coy\"}"
      },
      "name": "Retrieve Access Token",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        1000,
        400
      ]
    },
    {
      "parameters": {
        "sheetId": "1BDWazX_Zq5tLdSqGniVohkdL8ZJxgqOpIvKyiQj0rGI",
        "range": "A:Z",
        "options": {
          "valueRenderMode": "FORMATTED_VALUE"
        }
      },
      "name": "Read from Test",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 1,
      "position": [
        400,
        300
      ],
      "alwaysOutputData": true,
      "credentials": {
        "googleApi": "n8n Test Project"
      }
    },
    {
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{$json[\"Status\"]}}",
              "value2": "Rejected"
            },
            {
              "value1": "={{$json[\"Status\"]}}",
              "value2": "Approved"
            }
          ]
        },
        "combineOperation": "any"
      },
      "name": "Check if Status is Approved or Rejected",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        550,
        300
      ]
    },
    {
      "parameters": {
        "functionCode": "const uuid = require('uuid');\nitems[0].json.Guid = uuid.v4();\nitems[0].json.Status = \"Pending\";\nreturn items;\n"
      },
      "name": "Generate a GUID & Set Status to Pending",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        700,
        400
      ]
    },
    {
      "parameters": {
        "operation": "update",
        "sheetId": "1BDWazX_Zq5tLdSqGniVohkdL8ZJxgqOpIvKyiQj0rGI",
        "range": "=A:F",
        "key": "Enter your email address",
        "options": {}
      },
      "name": "Update Test",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 1,
      "position": [
        850,
        400
      ],
      "credentials": {
        "googleApi": "n8n Test Project"
      },
      "notes": "Email address is used as the key to identify which row to update"
    },
    {
      "parameters": {
        "triggerTimes": {
          "item": [
            {
              "hour": 8
            }
          ]
        }
      },
      "name": "Cron",
      "type": "n8n-nodes-base.cron",
      "typeVersion": 1,
      "position": [
        250,
        300
      ]
    }
  ],
  "connections": {
    "Start": {
      "main": [
        [
          {
            "node": "Read from Test",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Queue Item": {
      "main": [
        [
          {
            "node": "Send Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Retrieve Organization Unit ID": {
      "main": [
        [
          {
            "node": "Create Queue Item",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Retrieve Access Token": {
      "main": [
        [
          {
            "node": "Retrieve Organization Unit ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read from Test": {
      "main": [
        [
          {
            "node": "Check if Status is Approved or Rejected",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if Status is Approved or Rejected": {
      "main": [
        null,
        [
          {
            "node": "Generate a GUID & Set Status to Pending",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate a GUID & Set Status to Pending": {
      "main": [
        [
          {
            "node": "Update Test",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Test": {
      "main": [
        [
          {
            "node": "Retrieve Access Token",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Cron": {
      "main": [
        [
          {
            "node": "Read from Test",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Looks like a bug. I will have a look.

Bug got fixed and will be released with the next version. I will update here once it is ready.

Thanks. Looking forward to it.

Fix got released with [email protected]