# nodes

node_type: nodes-base.googleFirebaseCloudFirestore
package_name: n8n-nodes-base
display_name: Google Cloud Firestore
description: Interact with Google Firebase - Cloud Firestore API
category: input
development_style: programmatic
version: 1.1
outputs:
  [
  "main"
  ]

updated_at: 2026-03-30 13:12:49
properties_schema:
  [
    {
      "displayName": "Authentication",
      "name": "authentication",
      "type": "options",
      "default": "googleFirebaseCloudFirestoreOAuth2Api",
      "options": [
        {
          "name": "OAuth2 (recommended)",
          "value": "googleFirebaseCloudFirestoreOAuth2Api"
        },
        {
          "name": "Service Account",
          "value": "serviceAccount"
        }
      ]
    },
    {
      "displayName": "Resource",
      "name": "resource",
      "type": "options",
      "default": "document",
      "options": [
        {
          "name": "Document",
          "value": "document"
        },
        {
          "name": "Collection",
          "value": "collection"
        }
      ],
      "noDataExpression": true
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "get",
      "options": [
        {
          "name": "Create",
          "value": "create",
          "description": "Create a document",
          "action": "Create a document"
        },
        {
          "name": "Create or Update",
          "value": "upsert",
          "description": "Create a new document, or update the current one if it already exists (upsert)",
          "action": "Create or update a document"
        },
        {
          "name": "Delete",
          "value": "delete",
          "description": "Delete a document",
          "action": "Delete a document"
        },
        {
          "name": "Get",
          "value": "get",
          "description": "Get a document",
          "action": "Get a document"
        },
        {
          "name": "Get Many",
          "value": "getAll",
          "description": "Get many documents from a collection",
          "action": "Get many documents"
        },
        {
          "name": "Query",
          "value": "query",
          "description": "Runs a query against your documents",
          "action": "Query a document"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "document"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Project Name or ID",
      "name": "projectId",
      "type": "options",
      "default": "",
      "description": "As displayed in firebase console URL. Choose from the list, or specify an ID using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>.",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "document"
          ],
          "operation": [
            "create"
          ]
        }
      },
      "typeOptions": {
        "loadOptionsMethod": "getProjects"
      }
    },
    {
      "displayName": "Database",
      "name": "database",
      "type": "string",
      "default": "(default)",
      "description": "Usually the provided default value will work",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "document"
          ],
          "operation": [
            "create"
          ]
        }
      }
    },
    {
      "displayName": "Collection",
      "name": "collection",
      "type": "string",
      "default": "",
      "description": "Collection name",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "document"
          ],
          "operation": [
            "create"
          ]
        }
      }
    },
    {
      "displayName": "Document ID",
      "name": "documentId",
      "type": "string",
      "default": "",
      "displayOptions": {
        "show": {
          "resource": [
            "document"
          ],
          "operation": [
            "create"
          ]
        }
      }
    },
    {
      "displayName": "Columns / Attributes",
      "name": "columns",
      "type": "string",
      "default": "",
      "description": "List of attributes to save",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "document"
          ],
          "operation": [
            "create"
          ]
        }
      }
    },
    {
      "displayName": "Simplify",
      "name": "simple",
      "type": "boolean",
      "default": true,
      "description": "Whether to return a simplified version of the response instead of the raw data",
      "displayOptions": {
        "show": {
          "operation": [
            "create"
          ],
          "resource": [
            "document"
          ]
        }
      }
    },
    {
      "displayName": "Project Name or ID",
      "name": "projectId",
      "type": "options",
      "default": "",
      "description": "As displayed in firebase console URL. Choose from the list, or specify an ID using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>.",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "document"
          ],
          "operation": [
            "get"
          ]
        }
      },
      "typeOptions": {
        "loadOptionsMethod": "getProjects"
      }
    },
    {
      "displayName": "Database",
      "name": "database",
      "type": "string",
      "default": "(default)",
      "description": "Usually the provided default value will work",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "document"
          ],
          "operation": [
            "get"
          ]
        }
      }
    },
    {
      "displayName": "Collection",
      "name": "collection",
      "type": "string",
      "default": "",
      "description": "Collection name",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "document"
          ],
          "operation": [
            "get"
          ]
        }
      }
    },
    {
      "displayName": "Document ID",
      "name": "documentId",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "get"
          ],
          "resource": [
            "document"
          ]
        }
      }
    },
    {
      "displayName": "Simplify",
      "name": "simple",
      "type": "boolean",
      "default": true,
      "description": "Whether to return a simplified version of the response instead of the raw data",
      "displayOptions": {
        "show": {
          "operation": [
            "get"
          ],
          "resource": [
            "document"
          ]
        }
      }
    },
    {
      "displayName": "Project Name or ID",
      "name": "projectId",
      "type": "options",
      "default": "",
      "description": "As displayed in firebase console URL. Choose from the list, or specify an ID using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>.",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "document"
          ],
          "operation": [
            "getAll"
          ]
        }
      },
      "typeOptions": {
        "loadOptionsMethod": "getProjects"
      }
    },
    {
      "displayName": "Database",
      "name": "database",
      "type": "string",
      "default": "(default)",
      "description": "Usually the provided default value will work",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "document"
          ],
          "operation": [
            "getAll"
          ]
        }
      }
    },
    {
      "displayName": "Collection",
      "name": "collection",
      "type": "string",
      "default": "",
      "description": "Collection name",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "document"
          ],
          "operation": [
            "getAll"
          ]
        }
      }
    },
    {
      "displayName": "Return All",
      "name": "returnAll",
      "type": "boolean",
      "default": false,
      "description": "Whether to return all results or only up to a given limit",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "document"
          ],
          "operation": [
            "getAll"
          ]
        }
      }
    },
    {
      "displayName": "Limit",
      "name": "limit",
      "type": "number",
      "default": 100,
      "description": "Max number of results to return",
      "displayOptions": {
        "show": {
          "resource": [
            "document"
          ],
          "operation": [
            "getAll"
          ],
          "returnAll": [
            false
          ]
        }
      },
      "typeOptions": {
        "minValue": 1,
        "maxValue": 500
      }
    },
    {
      "displayName": "Simplify",
      "name": "simple",
      "type": "boolean",
      "default": true,
      "description": "Whether to return a simplified version of the response instead of the raw data",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "document"
          ]
        }
      }
    },
    {
      "displayName": "Project Name or ID",
      "name": "projectId",
      "type": "options",
      "default": "",
      "description": "As displayed in firebase console URL. Choose from the list, or specify an ID using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>.",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "document"
          ],
          "operation": [
            "delete"
          ]
        }
      },
      "typeOptions": {
        "loadOptionsMethod": "getProjects"
      }
    },
    {
      "displayName": "Database",
      "name": "database",
      "type": "string",
      "default": "(default)",
      "description": "Usually the provided default value will work",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "document"
          ],
          "operation": [
            "delete"
          ]
        }
      }
    },
    {
      "displayName": "Collection",
      "name": "collection",
      "type": "string",
      "default": "",
      "description": "Collection name",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "document"
          ],
          "operation": [
            "delete"
          ]
        }
      }
    },
    {
      "displayName": "Document ID",
      "name": "documentId",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "delete"
          ],
          "resource": [
            "document"
          ]
        }
      }
    },
    {
      "displayName": "Project Name or ID",
      "name": "projectId",
      "type": "options",
      "default": "",
      "description": "As displayed in firebase console URL. Choose from the list, or specify an ID using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>.",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "document"
          ],
          "operation": [
            "upsert"
          ]
        }
      },
      "typeOptions": {
        "loadOptionsMethod": "getProjects"
      }
    },
    {
      "displayName": "Database",
      "name": "database",
      "type": "string",
      "default": "(default)",
      "description": "Usually the provided default value will work",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "document"
          ],
          "operation": [
            "upsert"
          ]
        }
      }
    },
    {
      "displayName": "Collection",
      "name": "collection",
      "type": "string",
      "default": "",
      "description": "Collection name",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "document"
          ],
          "operation": [
            "upsert"
          ]
        }
      }
    },
    {
      "displayName": "Update Key",
      "name": "updateKey",
      "type": "string",
      "default": "",
      "description": "Name of the field in an input item that contains the document ID",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "document"
          ],
          "operation": [
            "upsert"
          ]
        }
      }
    },
    {
      "displayName": "Columns /Attributes",
      "name": "columns",
      "type": "string",
      "default": "",
      "description": "Columns to insert",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "document"
          ],
          "operation": [
            "upsert"
          ]
        }
      }
    },
    {
      "displayName": "Project Name or ID",
      "name": "projectId",
      "type": "options",
      "default": "",
      "description": "As displayed in firebase console URL. Choose from the list, or specify an ID using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>.",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "document"
          ],
          "operation": [
            "query"
          ]
        }
      },
      "typeOptions": {
        "loadOptionsMethod": "getProjects"
      }
    },
    {
      "displayName": "Database",
      "name": "database",
      "type": "string",
      "default": "(default)",
      "description": "Usually the provided default value will work",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "document"
          ],
          "operation": [
            "query"
          ]
        }
      }
    },
    {
      "displayName": "Query JSON",
      "name": "query",
      "type": "string",
      "default": "",
      "description": "JSON query to execute",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "document"
          ],
          "operation": [
            "query"
          ]
        }
      }
    },
    {
      "displayName": "Simplify",
      "name": "simple",
      "type": "boolean",
      "default": true,
      "description": "Whether to return a simplified version of the response instead of the raw data",
      "displayOptions": {
        "show": {
          "operation": [
            "query"
          ],
          "resource": [
            "document"
          ]
        }
      }
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "getAll",
      "options": [
        {
          "name": "Get Many",
          "value": "getAll",
          "description": "Get many root collections",
          "action": "Get many collections"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "collection"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Project Name or ID",
      "name": "projectId",
      "type": "options",
      "default": "",
      "description": "As displayed in firebase console URL. Choose from the list, or specify an ID using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>.",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "collection"
          ],
          "operation": [
            "getAll"
          ]
        }
      },
      "typeOptions": {
        "loadOptionsMethod": "getProjects"
      }
    },
    {
      "displayName": "Database",
      "name": "database",
      "type": "string",
      "default": "(default)",
      "description": "Usually the provided default value will work",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "collection"
          ],
          "operation": [
            "getAll"
          ]
        }
      }
    },
    {
      "displayName": "Return All",
      "name": "returnAll",
      "type": "boolean",
      "default": false,
      "description": "Whether to return all results or only up to a given limit",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "collection"
          ],
          "operation": [
            "getAll"
          ]
        }
      }
    },
    {
      "displayName": "Limit",
      "name": "limit",
      "type": "number",
      "default": 100,
      "description": "Max number of results to return",
      "displayOptions": {
        "show": {
          "resource": [
            "collection"
          ],
          "operation": [
            "getAll"
          ],
          "returnAll": [
            false
          ]
        }
      },
      "typeOptions": {
        "minValue": 1,
        "maxValue": 500
      }
    }
  ]

operations:
  [
    {
      "operation": "create",
      "name": "Create",
      "description": "Create a document",
      "resource": "document"
    },
    {
      "operation": "upsert",
      "name": "Create or Update",
      "description": "Create a new document, or update the current one if it already exists (upsert)",
      "resource": "document"
    },
    {
      "operation": "delete",
      "name": "Delete",
      "description": "Delete a document",
      "resource": "document"
    },
    {
      "operation": "get",
      "name": "Get",
      "description": "Get a document",
      "resource": "document"
    },
    {
      "operation": "getAll",
      "name": "Get Many",
      "description": "Get many documents from a collection",
      "resource": "document"
    },
    {
      "operation": "query",
      "name": "Query",
      "description": "Runs a query against your documents",
      "resource": "document"
    },
    {
      "operation": "getAll",
      "name": "Get Many",
      "description": "Get many root collections",
      "resource": "collection"
    }
  ]

credentials_required:
  [
    {
      "name": "googleFirebaseCloudFirestoreOAuth2Api",
      "required": true,
      "displayOptions": {
        "show": {
          "authentication": [
            "googleFirebaseCloudFirestoreOAuth2Api"
          ]
        }
      }
    },
    {
      "name": "googleApi",
      "required": true,
      "displayOptions": {
        "show": {
          "authentication": [
            "serviceAccount"
          ]
        }
      }
    }
  ]


node_type: nodes-base.googleFirebaseRealtimeDatabaseTool
package_name: n8n-nodes-base
display_name: Google Cloud Realtime Database Tool
description: Interact with Google Firebase - Realtime Database API (AI Tool variant for use with AI Agents)
category: input
development_style: programmatic
version: 1
credentials_required:
  [
  {
  "name": "googleFirebaseRealtimeDatabaseOAuth2Api"
  }
  ]

outputs:
  [
  {
  "type": "ai_tool",
  "displayName": "Tool"
  }
  ]

output_names:
  [
  "Tool"
  ]

updated_at: 2026-03-30 13:12:49
tool_variant_of: nodes-base.googleFirebaseRealtimeDatabase
properties_schema:
  [
    {
      "displayName": "Tool Description",
      "name": "toolDescription",
      "type": "string",
      "default": "",
      "required": false,
      "description": "Description for the AI to understand what this tool does and when to use it",
      "typeOptions": {
        "rows": 3
      },
      "placeholder": "e.g., Use this tool to query and manage data in the database"
    },
    {
      "displayName": "Project Name or ID",
      "name": "projectId",
      "type": "options",
      "default": "",
      "description": "As displayed in firebase console URL. Choose from the list, or specify an ID using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>.",
      "required": true,
      "typeOptions": {
        "loadOptionsMethod": "getProjects"
      }
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "create",
      "options": [
        {
          "name": "Create",
          "value": "create",
          "description": "Write data to a database",
          "action": "Write data to a database"
        },
        {
          "name": "Delete",
          "value": "delete",
          "description": "Delete data from a database",
          "action": "Delete data from a database"
        },
        {
          "name": "Get",
          "value": "get",
          "description": "Get a record from a database",
          "action": "Get a record from a database"
        },
        {
          "name": "Push",
          "value": "push",
          "description": "Append to a list of data",
          "action": "Append to a list of data"
        },
        {
          "name": "Update",
          "value": "update",
          "description": "Update item on a database",
          "action": "Update item in a database"
        }
      ],
      "required": true,
      "noDataExpression": true
    },
    {
      "displayName": "Object Path",
      "name": "path",
      "type": "string",
      "default": "",
      "description": "Object path on database. Do not append .json.",
      "required": true,
      "displayOptions": {
        "hide": {
          "operation": [
            "get"
          ]
        }
      }
    },
    {
      "displayName": "Object Path",
      "name": "path",
      "type": "string",
      "default": "",
      "description": "Object path on database. Do not append .json.",
      "displayOptions": {
        "show": {
          "operation": [
            "get"
          ]
        }
      }
    },
    {
      "displayName": "Columns / Attributes",
      "name": "attributes",
      "type": "string",
      "default": "",
      "description": "Attributes to save",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "create",
            "push",
            "update"
          ]
        }
      }
    }
  ]

operations:
  [
    {
      "operation": "create",
      "name": "Create",
      "description": "Write data to a database"
    },
    {
      "operation": "delete",
      "name": "Delete",
      "description": "Delete data from a database"
    },
    {
      "operation": "get",
      "name": "Get",
      "description": "Get a record from a database"
    },
    {
      "operation": "push",
      "name": "Push",
      "description": "Append to a list of data"
    },
    {
      "operation": "update",
      "name": "Update",
      "description": "Update item on a database"
    }
  ]


node_type: nodes-base.googleFirebaseRealtimeDatabase
package_name: n8n-nodes-base
display_name: Google Cloud Realtime Database
description: Interact with Google Firebase - Realtime Database API
category: input
development_style: programmatic
version: 1
credentials_required:
  [
  {
  "name": "googleFirebaseRealtimeDatabaseOAuth2Api"
  }
  ]

outputs:
  [
  "main"
  ]

updated_at: 2026-03-30 13:12:49
properties_schema:
  [
    {
      "displayName": "Project Name or ID",
      "name": "projectId",
      "type": "options",
      "default": "",
      "description": "As displayed in firebase console URL. Choose from the list, or specify an ID using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>.",
      "required": true,
      "typeOptions": {
        "loadOptionsMethod": "getProjects"
      }
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "create",
      "options": [
        {
          "name": "Create",
          "value": "create",
          "description": "Write data to a database",
          "action": "Write data to a database"
        },
        {
          "name": "Delete",
          "value": "delete",
          "description": "Delete data from a database",
          "action": "Delete data from a database"
        },
        {
          "name": "Get",
          "value": "get",
          "description": "Get a record from a database",
          "action": "Get a record from a database"
        },
        {
          "name": "Push",
          "value": "push",
          "description": "Append to a list of data",
          "action": "Append to a list of data"
        },
        {
          "name": "Update",
          "value": "update",
          "description": "Update item on a database",
          "action": "Update item in a database"
        }
      ],
      "required": true,
      "noDataExpression": true
    },
    {
      "displayName": "Object Path",
      "name": "path",
      "type": "string",
      "default": "",
      "description": "Object path on database. Do not append .json.",
      "required": true,
      "displayOptions": {
        "hide": {
          "operation": [
            "get"
          ]
        }
      }
    },
    {
      "displayName": "Object Path",
      "name": "path",
      "type": "string",
      "default": "",
      "description": "Object path on database. Do not append .json.",
      "displayOptions": {
        "show": {
          "operation": [
            "get"
          ]
        }
      }
    },
    {
      "displayName": "Columns / Attributes",
      "name": "attributes",
      "type": "string",
      "default": "",
      "description": "Attributes to save",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "create",
            "push",
            "update"
          ]
        }
      }
    }
  ]

operations:
  [
    {
      "operation": "create",
      "name": "Create",
      "description": "Write data to a database"
    },
    {
      "operation": "delete",
      "name": "Delete",
      "description": "Delete data from a database"
    },
    {
      "operation": "get",
      "name": "Get",
      "description": "Get a record from a database"
    },
    {
      "operation": "push",
      "name": "Push",
      "description": "Append to a list of data"
    },
    {
      "operation": "update",
      "name": "Update",
      "description": "Update item on a database"
    }
  ]


node_type: nodes-base.gmailTool
package_name: n8n-nodes-base
display_name: Gmail Tool
description: Consume the Gmail API (AI Tool variant for use with AI Agents)
category: transform
development_style: programmatic
version: 2.2
outputs:
  [
  {
  "type": "ai_tool",
  "displayName": "Tool"
  }
  ]

output_names:
  [
  "Tool"
  ]

updated_at: 2026-03-30 13:12:49
tool_variant_of: nodes-base.gmail
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Gmail node documentation
  description: Learn how to use the Gmail node in n8n. Follow technical documentation to integrate Gmail node into your workflows.
  contentType: [integration, reference]
  priority: high
  ---

  # Gmail node

  Use the Gmail node to automate work in Gmail, and integrate Gmail with other applications. n8n has built-in support for a wide range of Gmail features, including creating, updating, deleting, and getting drafts, messages, labels, thread.  

  On this page, you'll find a list of operations the Gmail node supports and links to more resources.

  /// note | Credentials
  Refer to [Google credentials](/integrations/builtin/credentials/google/index.md) for guidance on setting up authentication. 
  ///

  --8<-- "_snippets/integrations/builtin/app-nodes/ai-tools.md"

  ## Operations

  * **Draft**
  	* [**Create**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/draft-operations.md#create-a-draft) a draft
  	* [**Delete**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/draft-operations.md#delete-a-draft) a draft
  	* [**Get**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/draft-operations.md#get-a-draft) a draft
  	* [**Get Many**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/draft-operations.md#get-many-drafts) drafts
  * **Label**
  	* [**Create**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/label-operations.md#create-a-label) a label
  	* [**Delete**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/label-operations.md#delete-a-label) a label
  	* [**Get**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/label-operations.md#get-a-label) a label
  	* [**Get Many**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/label-operations.md#get-many-labels) labels
  * **Message**
  	* [**Add Label**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/message-operations.md#add-label-to-a-message) to a message
  	* [**Delete**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/message-operations.md#delete-a-message) a message
  	* [**Get**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/message-operations.md#get-a-message) a message
  	* [**Get Many**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/message-operations.md#get-many-messages) messages
  	* [**Mark as Read**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/message-operations.md#mark-as-read)
  	* [**Mark as Unread**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/message-operations.md#mark-as-unread)
  	* [**Remove Label**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/message-operations.md#remove-label-from-a-message) from a message
  	* [**Reply**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/message-operations.md#reply-to-a-message) to a message
  	* [**Send**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/message-operations.md#send-a-message) a message
  * **Thread**
  	* [**Add Label**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/thread-operations.md#add-label-to-a-thread) to a thread
  	* [**Delete**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/thread-operations.md#delete-a-thread) a thread
  	* [**Get**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/thread-operations.md#get-a-thread) a thread
  	* [**Get Many**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/thread-operations.md#get-many-threads) threads
  	* [**Remove Label**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/thread-operations.md#remove-label-from-a-thread) from thread
  	* [**Reply**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/thread-operations.md#reply-to-a-message) to a message
  	* [**Trash**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/thread-operations.md#trash-a-thread) a thread
  	* [**Untrash**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/thread-operations.md#untrash-a-thread) a thread

  ## Templates and examples

  <!-- see https://www.notion.so/n8n/Pull-in-templates-for-the-integrations-pages-37c716837b804d30a33b47475f6e3780 -->
  [[ templatesWidget(page.title, 'gmail') ]]

  ## Related resources

  Refer to Google's [Gmail API documentation](https://developers.google.com/gmail/api) for detailed information about the API that this node integrates with.

  n8n provides a trigger node for Gmail. You can find the trigger node docs [here](/integrations/builtin/trigger-nodes/n8n-nodes-base.gmailtrigger/index.md).

  --8<-- "_snippets/integrations/builtin/app-nodes/operation-not-supported.md"

  ## Common issues

  For common errors or issues and suggested resolution steps, refer to [Common Issues](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/common-issues.md).

properties_schema:
  [
    {
      "displayName": "Tool Description",
      "name": "toolDescription",
      "type": "string",
      "default": "",
      "required": false,
      "description": "Description for the AI to understand what this tool does and when to use it",
      "typeOptions": {
        "rows": 3
      },
      "placeholder": "e.g., Use this tool to send and manage emails"
    },
    {
      "displayName": "Authentication",
      "name": "authentication",
      "type": "options",
      "default": "oAuth2",
      "options": [
        {
          "name": "OAuth2 (recommended)",
          "value": "oAuth2"
        },
        {
          "name": "Service Account",
          "value": "serviceAccount"
        }
      ]
    },
    {
      "displayName": "Resource",
      "name": "resource",
      "type": "options",
      "default": "message",
      "options": [
        {
          "name": "Message",
          "value": "message"
        },
        {
          "name": "Label",
          "value": "label"
        },
        {
          "name": "Draft",
          "value": "draft"
        },
        {
          "name": "Thread",
          "value": "thread"
        }
      ],
      "noDataExpression": true
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "create",
      "options": [
        {
          "name": "Create",
          "value": "create",
          "action": "Create a draft"
        },
        {
          "name": "Delete",
          "value": "delete",
          "action": "Delete a draft"
        },
        {
          "name": "Get",
          "value": "get",
          "action": "Get a draft"
        },
        {
          "name": "Get Many",
          "value": "getAll",
          "action": "Get many drafts"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "draft"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Draft ID",
      "name": "messageId",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "draft"
          ],
          "operation": [
            "delete",
            "get"
          ]
        }
      }
    },
    {
      "displayName": "Subject",
      "name": "subject",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "draft"
          ],
          "operation": [
            "create"
          ]
        }
      }
    },
    {
      "displayName": "To reply to an existing thread, specify the Thread ID from the options below.",
      "name": "threadNotice",
      "type": "notice",
      "default": "",
      "displayOptions": {
        "show": {
          "resource": [
            "draft"
          ],
          "operation": [
            "create"
          ]
        }
      }
    },
    {
      "displayName": "Email Type",
      "name": "emailType",
      "type": "options",
      "default": "text",
      "options": [
        {
          "name": "HTML",
          "value": "html"
        },
        {
          "name": "Text",
          "value": "text"
        }
      ],
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "draft"
          ],
          "operation": [
            "create"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Message",
      "name": "message",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "draft"
          ],
          "operation": [
            "create"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Attachments",
          "name": "attachmentsUi",
          "placeholder": "Add Attachment",
          "type": "fixedCollection",
          "typeOptions": {
            "multipleValues": true
          },
          "options": [
            {
              "name": "attachmentsBinary",
              "displayName": "Attachment Binary",
              "values": [
                {
                  "displayName": "Attachment Field Name (in Input)",
                  "name": "property",
                  "type": "string",
                  "default": "",
                  "description": "Add the field name from the input node. Multiple properties can be set separated by comma."
                }
              ]
            }
          ],
          "default": {},
          "description": "Array of supported attachments to add to the message"
        },
        {
          "displayName": "BCC",
          "name": "bccList",
          "type": "string",
          "description": "The email addresses of the blind copy recipients. Multiple addresses can be separated by a comma. e.g. jay@getsby.com, jon@smith.com.",
          "placeholder": "info@example.com",
          "default": ""
        },
        {
          "displayName": "CC",
          "name": "ccList",
          "type": "string",
          "description": "The email addresses of the copy recipients. Multiple addresses can be separated by a comma. e.g. jay@getsby.com, jon@smith.com.",
          "placeholder": "info@example.com",
          "default": ""
        },
        {
          "displayName": "From Alias Name or ID",
          "name": "fromAlias",
          "type": "options",
          "default": "",
          "description": "Select the alias to send the email from. Choose from the list, or specify an ID using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>.",
          "typeOptions": {
            "loadOptionsMethod": "getGmailAliases"
          }
        },
        {
          "displayName": "Send Replies To",
          "name": "replyTo",
          "type": "string",
          "placeholder": "reply@example.com",
          "default": "",
          "description": "The email address that the reply message is sent to"
        },
        {
          "displayName": "Thread ID",
          "name": "threadId",
          "type": "string",
          "placeholder": "18cc573e2431878f",
          "default": "",
          "description": "The identifier of the thread to attach the draft"
        },
        {
          "displayName": "To Email",
          "name": "sendTo",
          "type": "string",
          "default": "",
          "placeholder": "info@example.com",
          "description": "The email addresses of the recipients. Multiple addresses can be separated by a comma. e.g. jay@getsby.com, jon@smith.com."
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "draft"
          ],
          "operation": [
            "create"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Attachment Prefix",
          "name": "dataPropertyAttachmentsPrefixName",
          "type": "string",
          "default": "attachment_",
          "description": "Prefix for name of the binary property to which to write the attachment. An index starting with 0 will be added. So if name is 'attachment_' the first attachment is saved to 'attachment_0'."
        },
        {
          "displayName": "Download Attachments",
          "name": "downloadAttachments",
          "type": "boolean",
          "default": false,
          "description": "Whether the draft's attachments will be downloaded"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "draft"
          ],
          "operation": [
            "get"
          ]
        }
      }
    },
    {
      "displayName": "Return All",
      "name": "returnAll",
      "type": "boolean",
      "default": false,
      "description": "Whether to return all results or only up to a given limit",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "draft"
          ]
        }
      }
    },
    {
      "displayName": "Limit",
      "name": "limit",
      "type": "number",
      "default": 50,
      "description": "Max number of results to return",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "draft"
          ],
          "returnAll": [
            false
          ]
        }
      },
      "typeOptions": {
        "minValue": 1,
        "maxValue": 500
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Attachment Prefix",
          "name": "dataPropertyAttachmentsPrefixName",
          "type": "string",
          "default": "attachment_",
          "description": "Prefix for name of the binary property to which to write the attachments. An index starting with 0 will be added. So if name is 'attachment_' the first attachment is saved to 'attachment_0'."
        },
        {
          "displayName": "Download Attachments",
          "name": "downloadAttachments",
          "type": "boolean",
          "default": false,
          "description": "Whether the draft's attachments will be downloaded"
        },
        {
          "displayName": "Include Spam and Trash",
          "name": "includeSpamTrash",
          "type": "boolean",
          "default": false,
          "description": "Whether to include messages from SPAM and TRASH in the results"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "draft"
          ]
        }
      }
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "getAll",
      "options": [
        {
          "name": "Create",
          "value": "create",
          "action": "Create a label"
        },
        {
          "name": "Delete",
          "value": "delete",
          "action": "Delete a label"
        },
        {
          "name": "Get",
          "value": "get",
          "action": "Get a label info"
        },
        {
          "name": "Get Many",
          "value": "getAll",
          "action": "Get many labels"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "label"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Name",
      "name": "name",
      "type": "string",
      "default": "",
      "description": "Label Name",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "label"
          ],
          "operation": [
            "create"
          ]
        }
      }
    },
    {
      "displayName": "Label ID",
      "name": "labelId",
      "type": "string",
      "default": "",
      "description": "The ID of the label",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "label"
          ],
          "operation": [
            "get",
            "delete"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Label List Visibility",
          "name": "labelListVisibility",
          "type": "options",
          "options": [
            {
              "name": "Hide",
              "value": "labelHide"
            },
            {
              "name": "Show",
              "value": "labelShow"
            },
            {
              "name": "Show If Unread",
              "value": "labelShowIfUnread"
            }
          ],
          "default": "labelShow",
          "description": "The visibility of the label in the label list in the Gmail web interface"
        },
        {
          "displayName": "Message List Visibility",
          "name": "messageListVisibility",
          "type": "options",
          "options": [
            {
              "name": "Hide",
              "value": "hide"
            },
            {
              "name": "Show",
              "value": "show"
            }
          ],
          "default": "show",
          "description": "The visibility of messages with this label in the message list in the Gmail web interface"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "label"
          ],
          "operation": [
            "create"
          ]
        }
      }
    },
    {
      "displayName": "Return All",
      "name": "returnAll",
      "type": "boolean",
      "default": false,
      "description": "Whether to return all results or only up to a given limit",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "label"
          ]
        }
      }
    },
    {
      "displayName": "Limit",
      "name": "limit",
      "type": "number",
      "default": 50,
      "description": "Max number of results to return",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "label"
          ],
          "returnAll": [
            false
          ]
        }
      },
      "typeOptions": {
        "minValue": 1,
        "maxValue": 500
      }
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "send",
      "options": [
        {
          "name": "Add Label",
          "value": "addLabels",
          "action": "Add label to message"
        },
        {
          "name": "Delete",
          "value": "delete",
          "action": "Delete a message"
        },
        {
          "name": "Get",
          "value": "get",
          "action": "Get a message"
        },
        {
          "name": "Get Many",
          "value": "getAll",
          "action": "Get many messages"
        },
        {
          "name": "Mark as Read",
          "value": "markAsRead",
          "action": "Mark a message as read"
        },
        {
          "name": "Mark as Unread",
          "value": "markAsUnread",
          "action": "Mark a message as unread"
        },
        {
          "name": "Remove Label",
          "value": "removeLabels",
          "action": "Remove label from message"
        },
        {
          "name": "Reply",
          "value": "reply",
          "action": "Reply to a message"
        },
        {
          "name": "Send",
          "value": "send",
          "action": "Send a message"
        },
        {
          "name": "Send and Wait for Response",
          "value": "sendAndWait",
          "action": "Send message and wait for response"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "message"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Message ID",
      "name": "messageId",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "message"
          ],
          "operation": [
            "get",
            "delete",
            "markAsRead",
            "markAsUnread"
          ]
        }
      }
    },
    {
      "displayName": "Message ID",
      "name": "messageId",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "message"
          ],
          "operation": [
            "reply"
          ]
        }
      }
    },
    {
      "displayName": "To",
      "name": "sendTo",
      "type": "string",
      "default": "",
      "description": "The email addresses of the recipients. Multiple addresses can be separated by a comma. e.g. jay@getsby.com, jon@smith.com.",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "message"
          ],
          "operation": [
            "send"
          ]
        }
      }
    },
    {
      "displayName": "Subject",
      "name": "subject",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "message"
          ],
          "operation": [
            "send"
          ]
        }
      }
    },
    {
      "displayName": "Email Type",
      "name": "emailType",
      "type": "options",
      "default": "html",
      "options": [
        {
          "name": "Text",
          "value": "text"
        },
        {
          "name": "HTML",
          "value": "html"
        }
      ],
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "message"
          ],
          "operation": [
            "send",
            "reply"
          ]
        },
        "hide": {
          "@version": [
            2
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Email Type",
      "name": "emailType",
      "type": "options",
      "default": "html",
      "options": [
        {
          "name": "Text",
          "value": "text"
        },
        {
          "name": "HTML",
          "value": "html"
        }
      ],
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "message"
          ],
          "operation": [
            "send",
            "reply"
          ],
          "@version": [
            2
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Message",
      "name": "message",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "message"
          ],
          "operation": [
            "reply",
            "send"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Append n8n Attribution",
          "name": "appendAttribution",
          "type": "boolean",
          "default": true,
          "description": "Whether to include the phrase “This email was sent automatically with n8n” to the end of the email"
        },
        {
          "displayName": "Attachments",
          "name": "attachmentsUi",
          "placeholder": "Add Attachment",
          "type": "fixedCollection",
          "typeOptions": {
            "multipleValues": true
          },
          "options": [
            {
              "name": "attachmentsBinary",
              "displayName": "Attachment Binary",
              "values": [
                {
                  "displayName": "Attachment Field Name",
                  "name": "property",
                  "type": "string",
                  "default": "data",
                  "description": "Add the field name from the input node. Multiple properties can be set separated by comma.",
                  "hint": "The name of the field with the attachment in the node input"
                }
              ]
            }
          ],
          "default": {},
          "description": "Array of supported attachments to add to the message"
        },
        {
          "displayName": "BCC",
          "name": "bccList",
          "type": "string",
          "description": "The email addresses of the blind copy recipients. Multiple addresses can be separated by a comma. e.g. jay@getsby.com, jon@smith.com.",
          "placeholder": "info@example.com",
          "default": ""
        },
        {
          "displayName": "CC",
          "name": "ccList",
          "type": "string",
          "description": "The email addresses of the copy recipients. Multiple addresses can be separated by a comma. e.g. jay@getsby.com, jon@smith.com.",
          "placeholder": "info@example.com",
          "default": ""
        },
        {
          "displayName": "Sender Name",
          "name": "senderName",
          "type": "string",
          "placeholder": "e.g. Nathan",
          "default": "",
          "description": "The name that will be shown in recipients' inboxes"
        },
        {
          "displayName": "Send Replies To",
          "name": "replyTo",
          "type": "string",
          "placeholder": "reply@example.com",
          "default": "",
          "description": "The email address that the reply message is sent to",
          "displayOptions": {
            "hide": {
              "/operation": [
                "reply"
              ]
            }
          }
        },
        {
          "displayName": "Reply to Sender Only",
          "name": "replyToSenderOnly",
          "type": "boolean",
          "default": false,
          "description": "Whether to reply to the sender only or to the entire list of recipients"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "message"
          ],
          "operation": [
            "send",
            "reply"
          ]
        }
      }
    },
    {
      "displayName": "Simplify",
      "name": "simple",
      "type": "boolean",
      "default": true,
      "description": "Whether to return a simplified version of the response instead of the raw data",
      "displayOptions": {
        "show": {
          "operation": [
            "get"
          ],
          "resource": [
            "message"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Attachment Prefix",
          "name": "dataPropertyAttachmentsPrefixName",
          "type": "string",
          "default": "attachment_",
          "description": "Prefix for name of the binary property to which to write the attachment. An index starting with 0 will be added. So if name is 'attachment_' the first attachment is saved to 'attachment_0'."
        },
        {
          "displayName": "Download Attachments",
          "name": "downloadAttachments",
          "type": "boolean",
          "default": false,
          "description": "Whether the email's attachments will be downloaded and included in the output"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "message"
          ],
          "operation": [
            "get"
          ]
        },
        "hide": {
          "simple": [
            true
          ]
        }
      }
    },
    {
      "displayName": "Return All",
      "name": "returnAll",
      "type": "boolean",
      "default": false,
      "description": "Whether to return all results or only up to a given limit",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "message"
          ]
        }
      }
    },
    {
      "displayName": "Limit",
      "name": "limit",
      "type": "number",
      "default": 50,
      "description": "Max number of results to return",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "message"
          ],
          "returnAll": [
            false
          ]
        }
      },
      "typeOptions": {
        "minValue": 1,
        "maxValue": 500
      }
    },
    {
      "displayName": "Simplify",
      "name": "simple",
      "type": "boolean",
      "default": true,
      "description": "Whether to return a simplified version of the response instead of the raw data",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "message"
          ]
        }
      }
    },
    {
      "displayName": "Fetching a lot of messages may take a long time. Consider using filters to speed things up",
      "name": "filtersNotice",
      "type": "notice",
      "default": "",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "message"
          ],
          "returnAll": [
            true
          ]
        }
      }
    },
    {
      "displayName": "Filters",
      "name": "filters",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Include Spam and Trash",
          "name": "includeSpamTrash",
          "type": "boolean",
          "default": false,
          "description": "Whether to include messages from SPAM and TRASH in the results"
        },
        {
          "displayName": "Label Names or IDs",
          "name": "labelIds",
          "type": "multiOptions",
          "typeOptions": {
            "loadOptionsMethod": "getLabels"
          },
          "default": [],
          "description": "Only return messages with labels that match all of the specified label IDs. Choose from the list, or specify IDs using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>."
        },
        {
          "displayName": "Search",
          "name": "q",
          "type": "string",
          "default": "",
          "placeholder": "has:attachment",
          "hint": "Use the same format as in the Gmail search box. <a href=\"https://support.google.com/mail/answer/7190?hl=en\">More info</a>.",
          "description": "Only return messages matching the specified query"
        },
        {
          "displayName": "Read Status",
          "name": "readStatus",
          "type": "options",
          "default": "unread",
          "hint": "Filter emails by whether they have been read or not",
          "options": [
            {
              "name": "Unread and read emails",
              "value": "both"
            },
            {
              "name": "Unread emails only",
              "value": "unread"
            },
            {
              "name": "Read emails only",
              "value": "read"
            }
          ]
        },
        {
          "displayName": "Received After",
          "name": "receivedAfter",
          "type": "dateTime",
          "default": "",
          "description": "Get all emails received after the specified date. In an expression you can set date using string in ISO format or a timestamp in miliseconds."
        },
        {
          "displayName": "Received Before",
          "name": "receivedBefore",
          "type": "dateTime",
          "default": "",
          "description": "Get all emails received before the specified date. In an expression you can set date using string in ISO format or a timestamp in miliseconds."
        },
        {
          "displayName": "Sender",
          "name": "sender",
          "type": "string",
          "default": "",
          "description": "Sender name or email to filter by",
          "hint": "Enter an email or part of a sender name"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "message"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Attachment Prefix",
          "name": "dataPropertyAttachmentsPrefixName",
          "type": "string",
          "default": "attachment_",
          "description": "Prefix for name of the binary property to which to write the attachment. An index starting with 0 will be added. So if name is 'attachment_' the first attachment is saved to 'attachment_0'."
        },
        {
          "displayName": "Download Attachments",
          "name": "downloadAttachments",
          "type": "boolean",
          "default": false,
          "description": "Whether the email's attachments will be downloaded and included in the output"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "message"
          ]
        },
        "hide": {
          "simple": [
            true
          ]
        }
      }
    },
    {
      "displayName": "Message ID",
      "name": "messageId",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "message"
          ],
          "operation": [
            "addLabels",
            "removeLabels"
          ]
        }
      }
    },
    {
      "displayName": "Label Names or IDs",
      "name": "labelIds",
      "type": "multiOptions",
      "default": [],
      "description": "Choose from the list, or specify IDs using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "message"
          ],
          "operation": [
            "addLabels",
            "removeLabels"
          ]
        }
      },
      "typeOptions": {
        "loadOptionsMethod": "getLabels"
      }
    },
    {
      "displayName": "To",
      "name": "sendTo",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "message"
          ],
          "operation": [
            "sendAndWait"
          ]
        }
      }
    },
    {
      "displayName": "Subject",
      "name": "subject",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "message"
          ],
          "operation": [
            "sendAndWait"
          ]
        }
      }
    },
    {
      "displayName": "Message",
      "name": "message",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "message"
          ],
          "operation": [
            "sendAndWait"
          ]
        }
      },
      "typeOptions": {
        "rows": 4
      }
    },
    {
      "displayName": "Response Type",
      "name": "responseType",
      "type": "options",
      "default": "approval",
      "options": [
        {
          "name": "Approval",
          "value": "approval",
          "description": "User can approve/disapprove from within the message"
        },
        {
          "name": "Free Text",
          "value": "freeText",
          "description": "User can submit a response via a form"
        },
        {
          "name": "Custom Form",
          "value": "customForm",
          "description": "User can submit a response via a custom form"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "message"
          ],
          "operation": [
            "sendAndWait"
          ]
        }
      }
    },
    {
      "displayName": "Define Form",
      "name": "defineForm",
      "type": "options",
      "default": "fields",
      "options": [
        {
          "name": "Using Fields Below",
          "value": "fields"
        },
        {
          "name": "Using JSON",
          "value": "json"
        }
      ],
      "displayOptions": {
        "show": {
          "responseType": [
            "customForm"
          ],
          "resource": [
            "message"
          ],
          "operation": [
            "sendAndWait"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Form Fields",
      "name": "jsonOutput",
      "type": "json",
      "default": "[\n  {\n    \"fieldLabel\": \"Name\",\n    \"placeholder\": \"enter your name\",\n    \"requiredField\": true\n  },\n  {\n    \"fieldLabel\": \"Age\",\n    \"fieldType\": \"number\",\n    \"placeholder\": \"enter your age\"\n  },\n  {\n    \"fieldLabel\": \"Email\",\n    \"fieldType\": \"email\",\n    \"requiredField\": true\n  },\n  {\n    \"fieldLabel\": \"Textarea\",\n    \"fieldType\": \"textarea\"\n  },\n  {\n    \"fieldLabel\": \"Dropdown Options\",\n    \"fieldType\": \"dropdown\",\n    \"fieldOptions\": {\n      \"values\": [\n        {\n          \"option\": \"option 1\"\n        },\n        {\n          \"option\": \"option 2\"\n        }\n      ]\n    },\n    \"requiredField\": true\n  },\n  {\n    \"fieldLabel\": \"Checkboxes\",\n    \"fieldType\": \"checkbox\",\n    \"fieldOptions\": {\n      \"values\": [\n        {\n          \"option\": \"option 1\"\n        },\n        {\n          \"option\": \"option 2\"\n        }\n      ]\n    }\n  },\n  {\n    \"fieldLabel\": \"Radio\",\n    \"fieldType\": \"radio\",\n    \"fieldOptions\": {\n      \"values\": [\n        {\n          \"option\": \"option 1\"\n        },\n        {\n          \"option\": \"option 2\"\n        }\n      ]\n    }\n  },\n  {\n    \"fieldLabel\": \"Email\",\n    \"fieldType\": \"email\",\n    \"placeholder\": \"me@mail.con\"\n  },\n  {\n    \"fieldLabel\": \"File\",\n    \"fieldType\": \"file\",\n    \"multipleFiles\": true,\n    \"acceptFileTypes\": \".jpg, .png\"\n  },\n  {\n    \"fieldLabel\": \"Number\",\n    \"fieldType\": \"number\"\n  },\n  {\n    \"fieldLabel\": \"Password\",\n    \"fieldType\": \"password\"\n  }\n]\n",
      "displayOptions": {
        "show": {
          "defineForm": [
            "json"
          ],
          "responseType": [
            "customForm"
          ],
          "resource": [
            "message"
          ],
          "operation": [
            "sendAndWait"
          ]
        }
      },
      "typeOptions": {
        "rows": 5
      }
    },
    {
      "displayName": "Form Elements",
      "name": "formFields",
      "type": "fixedCollection",
      "default": {},
      "options": [
        {
          "displayName": "Values",
          "name": "values",
          "values": [
            {
              "displayName": "Field Name",
              "name": "fieldName",
              "description": "The name of the field, used in input attributes and referenced by the workflow",
              "required": true,
              "type": "string",
              "default": "",
              "displayOptions": {
                "hide": {
                  "fieldType": [
                    "html"
                  ]
                },
                "show": {
                  "@version": [
                    2.4
                  ]
                }
              }
            },
            {
              "displayName": "Label",
              "name": "fieldLabel",
              "type": "string",
              "default": "",
              "placeholder": "e.g. What is your name?",
              "description": "Label that appears above the input field",
              "required": true,
              "displayOptions": {
                "hide": {
                  "fieldType": [
                    "hiddenField",
                    "html"
                  ]
                },
                "show": {
                  "@version": [
                    {
                      "_cnd": {
                        "gte": 2.4
                      }
                    }
                  ]
                }
              }
            },
            {
              "displayName": "Field Name",
              "name": "fieldLabel",
              "type": "string",
              "default": "",
              "placeholder": "e.g. What is your name?",
              "description": "Label that appears above the input field",
              "required": true,
              "displayOptions": {
                "hide": {
                  "fieldType": [
                    "hiddenField",
                    "html"
                  ]
                },
                "show": {
                  "@version": [
                    {
                      "_cnd": {
                        "lt": 2.4
                      }
                    }
                  ]
                }
              }
            },
            {
              "displayName": "Field Name",
              "name": "fieldName",
              "description": "The name of the field, used in input attributes and referenced by the workflow",
              "type": "string",
              "default": "",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "hiddenField"
                  ],
                  "@version": [
                    {
                      "_cnd": {
                        "lt": 2.4
                      }
                    }
                  ]
                }
              }
            },
            {
              "displayName": "Element Type",
              "name": "fieldType",
              "type": "options",
              "default": "text",
              "description": "The type of field to add to the form",
              "options": [
                {
                  "name": "Checkboxes",
                  "value": "checkbox"
                },
                {
                  "name": "Custom HTML",
                  "value": "html"
                },
                {
                  "name": "Date",
                  "value": "date"
                },
                {
                  "name": "Dropdown",
                  "value": "dropdown"
                },
                {
                  "name": "Email",
                  "value": "email"
                },
                {
                  "name": "File",
                  "value": "file"
                },
                {
                  "name": "Hidden Field",
                  "value": "hiddenField"
                },
                {
                  "name": "Number",
                  "value": "number"
                },
                {
                  "name": "Password",
                  "value": "password"
                },
                {
                  "name": "Radio Buttons",
                  "value": "radio"
                },
                {
                  "name": "Text Input",
                  "value": "text"
                },
                {
                  "name": "Textarea",
                  "value": "textarea"
                }
              ],
              "required": true
            },
            {
              "displayName": "Element Name",
              "name": "elementName",
              "type": "string",
              "default": "",
              "placeholder": "e.g. content-section",
              "description": "Optional field. It can be used to include the html in the output.",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "html"
                  ]
                }
              }
            },
            {
              "displayName": "Custom Field Name",
              "name": "fieldName",
              "description": "The name of the field, used in input attributes and referenced by the workflow",
              "type": "string",
              "default": "",
              "displayOptions": {
                "hide": {
                  "fieldType": [
                    "html"
                  ]
                },
                "show": {
                  "@version": [
                    {
                      "_cnd": {
                        "gte": 2.5
                      }
                    }
                  ]
                }
              }
            },
            {
              "displayName": "Placeholder",
              "name": "placeholder",
              "description": "Sample text to display inside the field",
              "type": "string",
              "default": "",
              "displayOptions": {
                "hide": {
                  "fieldType": [
                    "dropdown",
                    "date",
                    "file",
                    "html",
                    "hiddenField",
                    "radio",
                    "checkbox"
                  ]
                }
              }
            },
            {
              "displayName": "Default Value",
              "name": "defaultValue",
              "description": "Default value that will be pre-filled in the form field",
              "type": "string",
              "default": "",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "text",
                    "number",
                    "email",
                    "textarea"
                  ]
                }
              }
            },
            {
              "displayName": "Default Value",
              "name": "defaultValue",
              "description": "Default date value that will be pre-filled in the form field (format: YYYY-MM-DD)",
              "type": "dateTime",
              "typeOptions": {
                "dateOnly": true
              },
              "default": "",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "date"
                  ]
                }
              }
            },
            {
              "displayName": "Default Value",
              "name": "defaultValue",
              "description": "Default value that will be pre-selected. Must match one of the option labels.",
              "type": "string",
              "default": "",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "dropdown",
                    "radio"
                  ]
                }
              }
            },
            {
              "displayName": "Default Value",
              "name": "defaultValue",
              "description": "Default value(s) that will be pre-selected. Must match one or multiple of the option labels. Separate multiple pre-selected options with a comma.",
              "type": "string",
              "default": "",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "checkbox"
                  ]
                }
              }
            },
            {
              "displayName": "Field Value",
              "name": "fieldValue",
              "description": "Input value can be set here or will be passed as a query parameter via Field Name if no value is set",
              "type": "string",
              "default": "",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "hiddenField"
                  ]
                }
              }
            },
            {
              "displayName": "Field Options",
              "name": "fieldOptions",
              "placeholder": "Add Field Option",
              "description": "List of options that can be selected from the dropdown",
              "type": "fixedCollection",
              "default": {
                "values": [
                  {
                    "option": ""
                  }
                ]
              },
              "required": true,
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "dropdown"
                  ]
                }
              },
              "typeOptions": {
                "multipleValues": true,
                "sortable": true
              },
              "options": [
                {
                  "displayName": "Values",
                  "name": "values",
                  "values": [
                    {
                      "displayName": "Option",
                      "name": "option",
                      "type": "string",
                      "default": ""
                    }
                  ]
                }
              ]
            },
            {
              "displayName": "Checkboxes",
              "name": "fieldOptions",
              "placeholder": "Add Checkbox",
              "type": "fixedCollection",
              "default": {
                "values": [
                  {
                    "option": ""
                  }
                ]
              },
              "required": true,
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "checkbox"
                  ]
                }
              },
              "typeOptions": {
                "multipleValues": true,
                "sortable": true
              },
              "options": [
                {
                  "displayName": "Values",
                  "name": "values",
                  "values": [
                    {
                      "displayName": "Checkbox Label",
                      "name": "option",
                      "type": "string",
                      "default": ""
                    }
                  ]
                }
              ]
            },
            {
              "displayName": "Radio Buttons",
              "name": "fieldOptions",
              "placeholder": "Add Radio Button",
              "type": "fixedCollection",
              "default": {
                "values": [
                  {
                    "option": ""
                  }
                ]
              },
              "required": true,
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "radio"
                  ]
                }
              },
              "typeOptions": {
                "multipleValues": true,
                "sortable": true
              },
              "options": [
                {
                  "displayName": "Values",
                  "name": "values",
                  "values": [
                    {
                      "displayName": "Radio Button Label",
                      "name": "option",
                      "type": "string",
                      "default": ""
                    }
                  ]
                }
              ]
            },
            {
              "displayName": "Multiple Choice is a legacy option, please use Checkboxes or Radio Buttons field type instead",
              "name": "multiselectLegacyNotice",
              "type": "notice",
              "default": "",
              "displayOptions": {
                "show": {
                  "multiselect": [
                    true
                  ],
                  "fieldType": [
                    "dropdown"
                  ],
                  "@version": [
                    {
                      "_cnd": {
                        "lt": 2.3
                      }
                    }
                  ]
                }
              }
            },
            {
              "displayName": "Multiple Choice",
              "name": "multiselect",
              "type": "boolean",
              "default": false,
              "description": "Whether to allow the user to select multiple options from the dropdown list",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "dropdown"
                  ],
                  "@version": [
                    {
                      "_cnd": {
                        "lt": 2.3
                      }
                    }
                  ]
                }
              }
            },
            {
              "displayName": "Limit Selection",
              "name": "limitSelection",
              "type": "options",
              "default": "unlimited",
              "options": [
                {
                  "name": "Exact Number",
                  "value": "exact"
                },
                {
                  "name": "Range",
                  "value": "range"
                },
                {
                  "name": "Unlimited",
                  "value": "unlimited"
                }
              ],
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "checkbox"
                  ]
                }
              }
            },
            {
              "displayName": "Number of Selections",
              "name": "numberOfSelections",
              "type": "number",
              "default": 1,
              "typeOptions": {
                "numberPrecision": 0,
                "minValue": 1,
                "showEvenWhenOptional": true
              },
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "checkbox"
                  ],
                  "limitSelection": [
                    "exact"
                  ]
                }
              }
            },
            {
              "displayName": "Minimum Selections",
              "name": "minSelections",
              "type": "number",
              "default": 0,
              "typeOptions": {
                "numberPrecision": 0,
                "minValue": 0,
                "showEvenWhenOptional": true
              },
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "checkbox"
                  ],
                  "limitSelection": [
                    "range"
                  ]
                }
              }
            },
            {
              "displayName": "Maximum Selections",
              "name": "maxSelections",
              "type": "number",
              "default": 1,
              "typeOptions": {
                "numberPrecision": 0,
                "minValue": 1,
                "showEvenWhenOptional": true
              },
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "checkbox"
                  ],
                  "limitSelection": [
                    "range"
                  ]
                }
              }
            },
            {
              "displayName": "HTML",
              "name": "html",
              "typeOptions": {
                "editor": "htmlEditor"
              },
              "type": "string",
              "noDataExpression": true,
              "default": "<!-- Your custom HTML here --->\n\n\n",
              "description": "HTML elements to display on the form page",
              "hint": "Does not accept <code>&lt;script&gt;</code>, <code>&lt;style&gt;</code> or <code>&lt;input&gt;</code> tags",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "html"
                  ]
                }
              }
            },
            {
              "displayName": "Multiple Files",
              "name": "multipleFiles",
              "type": "boolean",
              "default": true,
              "description": "Whether to allow the user to select multiple files from the file input or just one",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "file"
                  ]
                }
              }
            },
            {
              "displayName": "Accepted File Types",
              "name": "acceptFileTypes",
              "type": "string",
              "default": "",
              "description": "Comma-separated list of allowed file extensions",
              "hint": "Leave empty to allow all file types",
              "placeholder": "e.g. .jpg, .png",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "file"
                  ]
                }
              }
            },
            {
              "displayName": "The displayed date is formatted based on the locale of the user's browser",
              "name": "formatDate",
              "type": "notice",
              "default": "",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "date"
                  ]
                }
              }
            },
            {
              "displayName": "Required Field",
              "name": "requiredField",
              "type": "boolean",
              "default": false,
              "description": "Whether to require the user to enter a value for this field before submitting the form",
              "displayOptions": {
                "hide": {
                  "fieldType": [
                    "html",
                    "hiddenField"
                  ]
                }
              }
            }
          ]
        }
      ],
      "displayOptions": {
        "show": {
          "@version": [
            {
              "_cnd": {
                "lt": 2.5
              }
            }
          ],
          "defineForm": [
            "fields"
          ],
          "responseType": [
            "customForm"
          ],
          "resource": [
            "message"
          ],
          "operation": [
            "sendAndWait"
          ]
        }
      },
      "typeOptions": {
        "multipleValues": true,
        "sortable": true,
        "fixedCollection": {
          "itemTitle": "={{ $collection.item.properties.find(p => p.name === \"fieldType\").options.find(o => o.value === $collection.item.value.fieldType).name }}"
        }
      }
    },
    {
      "displayName": "Form Elements",
      "name": "formFields",
      "type": "fixedCollection",
      "default": {},
      "options": [
        {
          "displayName": "Values",
          "name": "values",
          "values": [
            {
              "displayName": "Field Name",
              "name": "fieldName",
              "description": "The name of the field, used in input attributes and referenced by the workflow",
              "required": true,
              "type": "string",
              "default": "",
              "displayOptions": {
                "hide": {
                  "fieldType": [
                    "html"
                  ]
                },
                "show": {
                  "@version": [
                    2.4
                  ]
                }
              }
            },
            {
              "displayName": "Label",
              "name": "fieldLabel",
              "type": "string",
              "default": "",
              "placeholder": "e.g. What is your name?",
              "description": "Label that appears above the input field",
              "required": true,
              "displayOptions": {
                "hide": {
                  "fieldType": [
                    "hiddenField",
                    "html"
                  ]
                },
                "show": {
                  "@version": [
                    {
                      "_cnd": {
                        "gte": 2.4
                      }
                    }
                  ]
                }
              }
            },
            {
              "displayName": "Field Name",
              "name": "fieldLabel",
              "type": "string",
              "default": "",
              "placeholder": "e.g. What is your name?",
              "description": "Label that appears above the input field",
              "required": true,
              "displayOptions": {
                "hide": {
                  "fieldType": [
                    "hiddenField",
                    "html"
                  ]
                },
                "show": {
                  "@version": [
                    {
                      "_cnd": {
                        "lt": 2.4
                      }
                    }
                  ]
                }
              }
            },
            {
              "displayName": "Field Name",
              "name": "fieldName",
              "description": "The name of the field, used in input attributes and referenced by the workflow",
              "type": "string",
              "default": "",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "hiddenField"
                  ],
                  "@version": [
                    {
                      "_cnd": {
                        "lt": 2.4
                      }
                    }
                  ]
                }
              }
            },
            {
              "displayName": "Element Type",
              "name": "fieldType",
              "type": "options",
              "default": "text",
              "description": "The type of field to add to the form",
              "options": [
                {
                  "name": "Checkboxes",
                  "value": "checkbox"
                },
                {
                  "name": "Custom HTML",
                  "value": "html"
                },
                {
                  "name": "Date",
                  "value": "date"
                },
                {
                  "name": "Dropdown",
                  "value": "dropdown"
                },
                {
                  "name": "Email",
                  "value": "email"
                },
                {
                  "name": "File",
                  "value": "file"
                },
                {
                  "name": "Hidden Field",
                  "value": "hiddenField"
                },
                {
                  "name": "Number",
                  "value": "number"
                },
                {
                  "name": "Password",
                  "value": "password"
                },
                {
                  "name": "Radio Buttons",
                  "value": "radio"
                },
                {
                  "name": "Text Input",
                  "value": "text"
                },
                {
                  "name": "Textarea",
                  "value": "textarea"
                }
              ],
              "required": true
            },
            {
              "displayName": "Element Name",
              "name": "elementName",
              "type": "string",
              "default": "",
              "placeholder": "e.g. content-section",
              "description": "Optional field. It can be used to include the html in the output.",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "html"
                  ]
                }
              }
            },
            {
              "displayName": "Custom Field Name",
              "name": "fieldName",
              "description": "The name of the field, used in input attributes and referenced by the workflow",
              "type": "string",
              "default": "",
              "displayOptions": {
                "hide": {
                  "fieldType": [
                    "html"
                  ]
                },
                "show": {
                  "@version": [
                    {
                      "_cnd": {
                        "gte": 2.5
                      }
                    }
                  ]
                }
              }
            },
            {
              "displayName": "Placeholder",
              "name": "placeholder",
              "description": "Sample text to display inside the field",
              "type": "string",
              "default": "",
              "displayOptions": {
                "hide": {
                  "fieldType": [
                    "dropdown",
                    "date",
                    "file",
                    "html",
                    "hiddenField",
                    "radio",
                    "checkbox"
                  ]
                }
              }
            },
            {
              "displayName": "Default Value",
              "name": "defaultValue",
              "description": "Default value that will be pre-filled in the form field",
              "type": "string",
              "default": "",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "text",
                    "number",
                    "email",
                    "textarea"
                  ]
                }
              }
            },
            {
              "displayName": "Default Value",
              "name": "defaultValue",
              "description": "Default date value that will be pre-filled in the form field (format: YYYY-MM-DD)",
              "type": "dateTime",
              "typeOptions": {
                "dateOnly": true
              },
              "default": "",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "date"
                  ]
                }
              }
            },
            {
              "displayName": "Default Value",
              "name": "defaultValue",
              "description": "Default value that will be pre-selected. Must match one of the option labels.",
              "type": "string",
              "default": "",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "dropdown",
                    "radio"
                  ]
                }
              }
            },
            {
              "displayName": "Default Value",
              "name": "defaultValue",
              "description": "Default value(s) that will be pre-selected. Must match one or multiple of the option labels. Separate multiple pre-selected options with a comma.",
              "type": "string",
              "default": "",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "checkbox"
                  ]
                }
              }
            },
            {
              "displayName": "Field Value",
              "name": "fieldValue",
              "description": "Input value can be set here or will be passed as a query parameter via Field Name if no value is set",
              "type": "string",
              "default": "",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "hiddenField"
                  ]
                }
              }
            },
            {
              "displayName": "Field Options",
              "name": "fieldOptions",
              "placeholder": "Add Field Option",
              "description": "List of options that can be selected from the dropdown",
              "type": "fixedCollection",
              "default": {
                "values": [
                  {
                    "option": ""
                  }
                ]
              },
              "required": true,
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "dropdown"
                  ]
                }
              },
              "typeOptions": {
                "multipleValues": true,
                "sortable": true
              },
              "options": [
                {
                  "displayName": "Values",
                  "name": "values",
                  "values": [
                    {
                      "displayName": "Option",
                      "name": "option",
                      "type": "string",
                      "default": ""
                    }
                  ]
                }
              ]
            },
            {
              "displayName": "Checkboxes",
              "name": "fieldOptions",
              "placeholder": "Add Checkbox",
              "type": "fixedCollection",
              "default": {
                "values": [
                  {
                    "option": ""
                  }
                ]
              },
              "required": true,
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "checkbox"
                  ]
                }
              },
              "typeOptions": {
                "multipleValues": true,
                "sortable": true
              },
              "options": [
                {
                  "displayName": "Values",
                  "name": "values",
                  "values": [
                    {
                      "displayName": "Checkbox Label",
                      "name": "option",
                      "type": "string",
                      "default": ""
                    }
                  ]
                }
              ]
            },
            {
              "displayName": "Radio Buttons",
              "name": "fieldOptions",
              "placeholder": "Add Radio Button",
              "type": "fixedCollection",
              "default": {
                "values": [
                  {
                    "option": ""
                  }
                ]
              },
              "required": true,
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "radio"
                  ]
                }
              },
              "typeOptions": {
                "multipleValues": true,
                "sortable": true
              },
              "options": [
                {
                  "displayName": "Values",
                  "name": "values",
                  "values": [
                    {
                      "displayName": "Radio Button Label",
                      "name": "option",
                      "type": "string",
                      "default": ""
                    }
                  ]
                }
              ]
            },
            {
              "displayName": "Multiple Choice is a legacy option, please use Checkboxes or Radio Buttons field type instead",
              "name": "multiselectLegacyNotice",
              "type": "notice",
              "default": "",
              "displayOptions": {
                "show": {
                  "multiselect": [
                    true
                  ],
                  "fieldType": [
                    "dropdown"
                  ],
                  "@version": [
                    {
                      "_cnd": {
                        "lt": 2.3
                      }
                    }
                  ]
                }
              }
            },
            {
              "displayName": "Multiple Choice",
              "name": "multiselect",
              "type": "boolean",
              "default": false,
              "description": "Whether to allow the user to select multiple options from the dropdown list",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "dropdown"
                  ],
                  "@version": [
                    {
                      "_cnd": {
                        "lt": 2.3
                      }
                    }
                  ]
                }
              }
            },
            {
              "displayName": "Limit Selection",
              "name": "limitSelection",
              "type": "options",
              "default": "unlimited",
              "options": [
                {
                  "name": "Exact Number",
                  "value": "exact"
                },
                {
                  "name": "Range",
                  "value": "range"
                },
                {
                  "name": "Unlimited",
                  "value": "unlimited"
                }
              ],
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "checkbox"
                  ]
                }
              }
            },
            {
              "displayName": "Number of Selections",
              "name": "numberOfSelections",
              "type": "number",
              "default": 1,
              "typeOptions": {
                "numberPrecision": 0,
                "minValue": 1,
                "showEvenWhenOptional": true
              },
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "checkbox"
                  ],
                  "limitSelection": [
                    "exact"
                  ]
                }
              }
            },
            {
              "displayName": "Minimum Selections",
              "name": "minSelections",
              "type": "number",
              "default": 0,
              "typeOptions": {
                "numberPrecision": 0,
                "minValue": 0,
                "showEvenWhenOptional": true
              },
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "checkbox"
                  ],
                  "limitSelection": [
                    "range"
                  ]
                }
              }
            },
            {
              "displayName": "Maximum Selections",
              "name": "maxSelections",
              "type": "number",
              "default": 1,
              "typeOptions": {
                "numberPrecision": 0,
                "minValue": 1,
                "showEvenWhenOptional": true
              },
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "checkbox"
                  ],
                  "limitSelection": [
                    "range"
                  ]
                }
              }
            },
            {
              "displayName": "HTML",
              "name": "html",
              "typeOptions": {
                "editor": "htmlEditor"
              },
              "type": "string",
              "noDataExpression": true,
              "default": "<!-- Your custom HTML here --->\n\n\n",
              "description": "HTML elements to display on the form page",
              "hint": "Does not accept <code>&lt;script&gt;</code>, <code>&lt;style&gt;</code> or <code>&lt;input&gt;</code> tags",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "html"
                  ]
                }
              }
            },
            {
              "displayName": "Multiple Files",
              "name": "multipleFiles",
              "type": "boolean",
              "default": true,
              "description": "Whether to allow the user to select multiple files from the file input or just one",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "file"
                  ]
                }
              }
            },
            {
              "displayName": "Accepted File Types",
              "name": "acceptFileTypes",
              "type": "string",
              "default": "",
              "description": "Comma-separated list of allowed file extensions",
              "hint": "Leave empty to allow all file types",
              "placeholder": "e.g. .jpg, .png",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "file"
                  ]
                }
              }
            },
            {
              "displayName": "The displayed date is formatted based on the locale of the user's browser",
              "name": "formatDate",
              "type": "notice",
              "default": "",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "date"
                  ]
                }
              }
            },
            {
              "displayName": "Required Field",
              "name": "requiredField",
              "type": "boolean",
              "default": false,
              "description": "Whether to require the user to enter a value for this field before submitting the form",
              "displayOptions": {
                "hide": {
                  "fieldType": [
                    "html",
                    "hiddenField"
                  ]
                }
              }
            }
          ]
        }
      ],
      "displayOptions": {
        "show": {
          "@version": [
            {
              "_cnd": {
                "gte": 2.5
              }
            }
          ],
          "defineForm": [
            "fields"
          ],
          "responseType": [
            "customForm"
          ],
          "resource": [
            "message"
          ],
          "operation": [
            "sendAndWait"
          ]
        }
      },
      "typeOptions": {
        "multipleValues": true,
        "sortable": true,
        "hideOptionalFields": true,
        "addOptionalFieldButtonText": "Add Attributes",
        "fixedCollection": {
          "itemTitle": "={{ $collection.item.properties.find(p => p.name === \"fieldType\").options.find(o => o.value === $collection.item.value.fieldType).name }}"
        }
      }
    },
    {
      "displayName": "Approval Options",
      "name": "approvalOptions",
      "type": "fixedCollection",
      "default": {},
      "options": [
        {
          "displayName": "Values",
          "name": "values",
          "values": [
            {
              "displayName": "Type of Approval",
              "name": "approvalType",
              "type": "options",
              "placeholder": "Add option",
              "default": "single",
              "options": [
                {
                  "name": "Approve Only",
                  "value": "single"
                },
                {
                  "name": "Approve and Disapprove",
                  "value": "double"
                }
              ]
            },
            {
              "displayName": "Approve Button Label",
              "name": "approveLabel",
              "type": "string",
              "default": "Approve",
              "displayOptions": {
                "show": {
                  "approvalType": [
                    "single",
                    "double"
                  ]
                }
              }
            },
            {
              "displayName": "Approve Button Style",
              "name": "buttonApprovalStyle",
              "type": "options",
              "default": "primary",
              "options": [
                {
                  "name": "Primary",
                  "value": "primary"
                },
                {
                  "name": "Secondary",
                  "value": "secondary"
                }
              ],
              "displayOptions": {
                "show": {
                  "approvalType": [
                    "single",
                    "double"
                  ]
                }
              }
            },
            {
              "displayName": "Disapprove Button Label",
              "name": "disapproveLabel",
              "type": "string",
              "default": "Decline",
              "displayOptions": {
                "show": {
                  "approvalType": [
                    "double"
                  ]
                }
              }
            },
            {
              "displayName": "Disapprove Button Style",
              "name": "buttonDisapprovalStyle",
              "type": "options",
              "default": "secondary",
              "options": [
                {
                  "name": "Primary",
                  "value": "primary"
                },
                {
                  "name": "Secondary",
                  "value": "secondary"
                }
              ],
              "displayOptions": {
                "show": {
                  "approvalType": [
                    "double"
                  ]
                }
              }
            }
          ]
        }
      ],
      "displayOptions": {
        "show": {
          "responseType": [
            "approval"
          ],
          "resource": [
            "message"
          ],
          "operation": [
            "sendAndWait"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Limit Wait Time",
          "name": "limitWaitTime",
          "type": "fixedCollection",
          "description": "Whether to limit the time this node should wait for a user response before execution resumes",
          "default": {
            "values": {
              "limitType": "afterTimeInterval",
              "resumeAmount": 45,
              "resumeUnit": "minutes"
            }
          },
          "options": [
            {
              "displayName": "Values",
              "name": "values",
              "values": [
                {
                  "displayName": "Limit Type",
                  "name": "limitType",
                  "type": "options",
                  "default": "afterTimeInterval",
                  "description": "Sets the condition for the execution to resume. Can be a specified date or after some time.",
                  "options": [
                    {
                      "name": "After Time Interval",
                      "description": "Waits for a certain amount of time",
                      "value": "afterTimeInterval"
                    },
                    {
                      "name": "At Specified Time",
                      "description": "Waits until the set date and time to continue",
                      "value": "atSpecifiedTime"
                    }
                  ]
                },
                {
                  "displayName": "Amount",
                  "name": "resumeAmount",
                  "type": "number",
                  "displayOptions": {
                    "show": {
                      "limitType": [
                        "afterTimeInterval"
                      ]
                    }
                  },
                  "typeOptions": {
                    "minValue": 0,
                    "numberPrecision": 2
                  },
                  "default": 1,
                  "description": "The time to wait"
                },
                {
                  "displayName": "Unit",
                  "name": "resumeUnit",
                  "type": "options",
                  "displayOptions": {
                    "show": {
                      "limitType": [
                        "afterTimeInterval"
                      ]
                    }
                  },
                  "options": [
                    {
                      "name": "Minutes",
                      "value": "minutes"
                    },
                    {
                      "name": "Hours",
                      "value": "hours"
                    },
                    {
                      "name": "Days",
                      "value": "days"
                    }
                  ],
                  "default": "hours",
                  "description": "Unit of the interval value"
                },
                {
                  "displayName": "Max Date and Time",
                  "name": "maxDateAndTime",
                  "type": "dateTime",
                  "displayOptions": {
                    "show": {
                      "limitType": [
                        "atSpecifiedTime"
                      ]
                    }
                  },
                  "default": "",
                  "description": "Continue execution after the specified date and time"
                }
              ]
            }
          ]
        },
        {
          "displayName": "Append n8n Attribution",
          "name": "appendAttribution",
          "type": "boolean",
          "default": true,
          "description": "Whether to include the phrase \"This message was sent automatically with n8n\" to the end of the message"
        }
      ],
      "displayOptions": {
        "show": {
          "responseType": [
            "approval"
          ],
          "resource": [
            "message"
          ],
          "operation": [
            "sendAndWait"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Message Button Label",
          "name": "messageButtonLabel",
          "type": "string",
          "default": "Respond"
        },
        {
          "displayName": "Response Form Title",
          "name": "responseFormTitle",
          "description": "Title of the form that the user can access to provide their response",
          "type": "string",
          "default": ""
        },
        {
          "displayName": "Response Form Description",
          "name": "responseFormDescription",
          "description": "Description of the form that the user can access to provide their response",
          "type": "string",
          "default": ""
        },
        {
          "displayName": "Response Form Button Label",
          "name": "responseFormButtonLabel",
          "type": "string",
          "default": "Submit"
        },
        {
          "displayName": "Response Form Custom Styling",
          "name": "responseFormCustomCss",
          "type": "string",
          "typeOptions": {
            "rows": 10,
            "editor": "cssEditor"
          },
          "default": ":root {\n\t--font-family: 'Open Sans', sans-serif;\n\t--font-weight-normal: 400;\n\t--font-weight-bold: 600;\n\t--font-size-body: 12px;\n\t--font-size-label: 14px;\n\t--font-size-test-notice: 12px;\n\t--font-size-input: 14px;\n\t--font-size-header: 20px;\n\t--font-size-paragraph: 14px;\n\t--font-size-link: 12px;\n\t--font-size-error: 12px;\n\t--font-size-html-h1: 28px;\n\t--font-size-html-h2: 20px;\n\t--font-size-html-h3: 16px;\n\t--font-size-html-h4: 14px;\n\t--font-size-html-h5: 12px;\n\t--font-size-html-h6: 10px;\n\t--font-size-subheader: 14px;\n\n\t/* Colors */\n\t--color-background: #fbfcfe;\n\t--color-test-notice-text: #e6a23d;\n\t--color-test-notice-bg: #fefaf6;\n\t--color-test-notice-border: #f6dcb7;\n\t--color-card-bg: #ffffff;\n\t--color-card-border: #dbdfe7;\n\t--color-card-shadow: rgba(99, 77, 255, 0.06);\n\t--color-link: #7e8186;\n\t--color-header: #525356;\n\t--color-label: #555555;\n\t--color-input-border: #dbdfe7;\n\t--color-input-text: #71747A;\n\t--color-focus-border: rgb(90, 76, 194);\n\t--color-submit-btn-bg: #ff6d5a;\n\t--color-submit-btn-text: #ffffff;\n\t--color-error: #ea1f30;\n\t--color-required: #ff6d5a;\n\t--color-clear-button-bg: #7e8186;\n\t--color-html-text: #555;\n\t--color-html-link: #ff6d5a;\n\t--color-header-subtext: #7e8186;\n\n\t/* Border Radii */\n\t--border-radius-card: 8px;\n\t--border-radius-input: 6px;\n\t--border-radius-clear-btn: 50%;\n\t--card-border-radius: 8px;\n\n\t/* Spacing */\n\t--padding-container-top: 24px;\n\t--padding-card: 24px;\n\t--padding-test-notice-vertical: 12px;\n\t--padding-test-notice-horizontal: 24px;\n\t--margin-bottom-card: 16px;\n\t--padding-form-input: 12px;\n\t--card-padding: 24px;\n\t--card-margin-bottom: 16px;\n\n\t/* Dimensions */\n\t--container-width: 448px;\n\t--submit-btn-height: 48px;\n\t--checkbox-size: 18px;\n\n\t/* Others */\n\t--box-shadow-card: 0px 4px 16px 0px var(--color-card-shadow);\n\t--opacity-placeholder: 0.5;\n}",
          "description": "Override default styling of the response form with CSS"
        },
        {
          "displayName": "Limit Wait Time",
          "name": "limitWaitTime",
          "type": "fixedCollection",
          "description": "Whether to limit the time this node should wait for a user response before execution resumes",
          "default": {
            "values": {
              "limitType": "afterTimeInterval",
              "resumeAmount": 45,
              "resumeUnit": "minutes"
            }
          },
          "options": [
            {
              "displayName": "Values",
              "name": "values",
              "values": [
                {
                  "displayName": "Limit Type",
                  "name": "limitType",
                  "type": "options",
                  "default": "afterTimeInterval",
                  "description": "Sets the condition for the execution to resume. Can be a specified date or after some time.",
                  "options": [
                    {
                      "name": "After Time Interval",
                      "description": "Waits for a certain amount of time",
                      "value": "afterTimeInterval"
                    },
                    {
                      "name": "At Specified Time",
                      "description": "Waits until the set date and time to continue",
                      "value": "atSpecifiedTime"
                    }
                  ]
                },
                {
                  "displayName": "Amount",
                  "name": "resumeAmount",
                  "type": "number",
                  "displayOptions": {
                    "show": {
                      "limitType": [
                        "afterTimeInterval"
                      ]
                    }
                  },
                  "typeOptions": {
                    "minValue": 0,
                    "numberPrecision": 2
                  },
                  "default": 1,
                  "description": "The time to wait"
                },
                {
                  "displayName": "Unit",
                  "name": "resumeUnit",
                  "type": "options",
                  "displayOptions": {
                    "show": {
                      "limitType": [
                        "afterTimeInterval"
                      ]
                    }
                  },
                  "options": [
                    {
                      "name": "Minutes",
                      "value": "minutes"
                    },
                    {
                      "name": "Hours",
                      "value": "hours"
                    },
                    {
                      "name": "Days",
                      "value": "days"
                    }
                  ],
                  "default": "hours",
                  "description": "Unit of the interval value"
                },
                {
                  "displayName": "Max Date and Time",
                  "name": "maxDateAndTime",
                  "type": "dateTime",
                  "displayOptions": {
                    "show": {
                      "limitType": [
                        "atSpecifiedTime"
                      ]
                    }
                  },
                  "default": "",
                  "description": "Continue execution after the specified date and time"
                }
              ]
            }
          ]
        },
        {
          "displayName": "Append n8n Attribution",
          "name": "appendAttribution",
          "type": "boolean",
          "default": true,
          "description": "Whether to include the phrase \"This message was sent automatically with n8n\" to the end of the message"
        }
      ],
      "displayOptions": {
        "show": {
          "responseType": [
            "freeText",
            "customForm"
          ],
          "resource": [
            "message"
          ],
          "operation": [
            "sendAndWait"
          ]
        }
      }
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "getAll",
      "options": [
        {
          "name": "Add Label",
          "value": "addLabels",
          "action": "Add label to thread"
        },
        {
          "name": "Delete",
          "value": "delete",
          "action": "Delete a thread"
        },
        {
          "name": "Get",
          "value": "get",
          "action": "Get a thread"
        },
        {
          "name": "Get Many",
          "value": "getAll",
          "action": "Get many threads"
        },
        {
          "name": "Remove Label",
          "value": "removeLabels",
          "action": "Remove label from thread"
        },
        {
          "name": "Reply",
          "value": "reply",
          "action": "Reply to a message"
        },
        {
          "name": "Trash",
          "value": "trash",
          "action": "Trash a thread"
        },
        {
          "name": "Untrash",
          "value": "untrash",
          "action": "Untrash a thread"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "thread"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Thread ID",
      "name": "threadId",
      "type": "string",
      "default": "",
      "description": "The ID of the thread you are operating on",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "thread"
          ],
          "operation": [
            "get",
            "delete",
            "reply",
            "trash",
            "untrash"
          ]
        }
      }
    },
    {
      "displayName": "Message Snippet or ID",
      "name": "messageId",
      "type": "options",
      "default": "",
      "description": "Choose from the list, or specify an ID using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>",
      "displayOptions": {
        "show": {
          "resource": [
            "thread"
          ],
          "operation": [
            "reply"
          ]
        }
      },
      "typeOptions": {
        "loadOptionsMethod": "getThreadMessages",
        "loadOptionsDependsOn": [
          "threadId"
        ]
      }
    },
    {
      "displayName": "Email Type",
      "name": "emailType",
      "type": "options",
      "default": "text",
      "options": [
        {
          "name": "Text",
          "value": "text"
        },
        {
          "name": "HTML",
          "value": "html"
        }
      ],
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "thread"
          ],
          "operation": [
            "reply"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Message",
      "name": "message",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "thread"
          ],
          "operation": [
            "reply"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Attachments",
          "name": "attachmentsUi",
          "placeholder": "Add Attachment",
          "type": "fixedCollection",
          "typeOptions": {
            "multipleValues": true
          },
          "options": [
            {
              "name": "attachmentsBinary",
              "displayName": "Attachment Binary",
              "values": [
                {
                  "displayName": "Attachment Field Name",
                  "name": "property",
                  "type": "string",
                  "default": "",
                  "description": "Add the field name from the input node. Multiple properties can be set separated by comma."
                }
              ]
            }
          ],
          "default": {},
          "description": "Array of supported attachments to add to the message"
        },
        {
          "displayName": "BCC",
          "name": "bccList",
          "type": "string",
          "description": "The email addresses of the blind copy recipients. Multiple addresses can be separated by a comma. e.g. jay@getsby.com, jon@smith.com.",
          "placeholder": "info@example.com",
          "default": ""
        },
        {
          "displayName": "CC",
          "name": "ccList",
          "type": "string",
          "description": "The email addresses of the copy recipients. Multiple addresses can be separated by a comma. e.g. jay@getsby.com, jon@smith.com.",
          "placeholder": "info@example.com",
          "default": ""
        },
        {
          "displayName": "Sender Name",
          "name": "senderName",
          "type": "string",
          "placeholder": "e.g. Nathan",
          "default": "",
          "description": "The name displayed in your contacts inboxes"
        },
        {
          "displayName": "Reply to Sender Only",
          "name": "replyToSenderOnly",
          "type": "boolean",
          "default": false,
          "description": "Whether to reply to the sender only or to the entire list of recipients",
          "displayOptions": {
            "hide": {
              "replyToRecipientsOnly": [
                true
              ]
            }
          }
        },
        {
          "displayName": "Reply to Recipients Only",
          "name": "replyToRecipientsOnly",
          "type": "boolean",
          "default": false,
          "description": "Whether to exclude the sender from the reply",
          "displayOptions": {
            "hide": {
              "replyToSenderOnly": [
                true
              ]
            }
          }
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "thread"
          ],
          "operation": [
            "reply"
          ]
        }
      }
    },
    {
      "displayName": "Simplify",
      "name": "simple",
      "type": "boolean",
      "default": true,
      "description": "Whether to return a simplified version of the response instead of the raw data",
      "displayOptions": {
        "show": {
          "operation": [
            "get"
          ],
          "resource": [
            "thread"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Return Only Messages",
          "name": "returnOnlyMessages",
          "type": "boolean",
          "default": true,
          "description": "Whether to return only thread messages"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "thread"
          ],
          "operation": [
            "get"
          ]
        }
      }
    },
    {
      "displayName": "Return All",
      "name": "returnAll",
      "type": "boolean",
      "default": false,
      "description": "Whether to return all results or only up to a given limit",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "thread"
          ]
        }
      }
    },
    {
      "displayName": "Limit",
      "name": "limit",
      "type": "number",
      "default": 50,
      "description": "Max number of results to return",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "thread"
          ],
          "returnAll": [
            false
          ]
        }
      },
      "typeOptions": {
        "minValue": 1,
        "maxValue": 500
      }
    },
    {
      "displayName": "Fetching a lot of messages may take a long time. Consider using filters to speed things up",
      "name": "filtersNotice",
      "type": "notice",
      "default": "",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "thread"
          ],
          "returnAll": [
            true
          ]
        }
      }
    },
    {
      "displayName": "Filters",
      "name": "filters",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Include Spam and Trash",
          "name": "includeSpamTrash",
          "type": "boolean",
          "default": false,
          "description": "Whether to include threads from SPAM and TRASH in the results"
        },
        {
          "displayName": "Label ID Names or IDs",
          "name": "labelIds",
          "type": "multiOptions",
          "typeOptions": {
            "loadOptionsMethod": "getLabels"
          },
          "default": [],
          "description": "Only return threads with labels that match all of the specified label IDs. Choose from the list, or specify IDs using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>."
        },
        {
          "displayName": "Search",
          "name": "q",
          "type": "string",
          "default": "",
          "placeholder": "has:attachment",
          "hint": "Use the same format as in the Gmail search box. <a href=\"https://support.google.com/mail/answer/7190?hl=en\">More info</a>.",
          "description": "Only return messages matching the specified query"
        },
        {
          "displayName": "Read Status",
          "name": "readStatus",
          "type": "options",
          "default": "unread",
          "hint": "Filter emails by whether they have been read or not",
          "options": [
            {
              "name": "Unread and read emails",
              "value": "both"
            },
            {
              "name": "Unread emails only",
              "value": "unread"
            },
            {
              "name": "Read emails only",
              "value": "read"
            }
          ]
        },
        {
          "displayName": "Received After",
          "name": "receivedAfter",
          "type": "dateTime",
          "default": "",
          "description": "Get all emails received after the specified date. In an expression you can set date using string in ISO format or a timestamp in miliseconds."
        },
        {
          "displayName": "Received Before",
          "name": "receivedBefore",
          "type": "dateTime",
          "default": "",
          "description": "Get all emails received before the specified date. In an expression you can set date using string in ISO format or a timestamp in miliseconds."
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "thread"
          ]
        }
      }
    },
    {
      "displayName": "Thread ID",
      "name": "threadId",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "thread"
          ],
          "operation": [
            "addLabels",
            "removeLabels"
          ]
        }
      }
    },
    {
      "displayName": "Label Names or IDs",
      "name": "labelIds",
      "type": "multiOptions",
      "default": [],
      "description": "Choose from the list, or specify IDs using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "thread"
          ],
          "operation": [
            "addLabels",
            "removeLabels"
          ]
        }
      },
      "typeOptions": {
        "loadOptionsMethod": "getLabels"
      }
    }
  ]

operations:
  [
    {
      "operation": "create",
      "name": "Create",
      "resource": "draft"
    },
    {
      "operation": "delete",
      "name": "Delete",
      "resource": "draft"
    },
    {
      "operation": "get",
      "name": "Get",
      "resource": "draft"
    },
    {
      "operation": "getAll",
      "name": "Get Many",
      "resource": "draft"
    },
    {
      "operation": "create",
      "name": "Create",
      "resource": "label"
    },
    {
      "operation": "delete",
      "name": "Delete",
      "resource": "label"
    },
    {
      "operation": "get",
      "name": "Get",
      "resource": "label"
    },
    {
      "operation": "getAll",
      "name": "Get Many",
      "resource": "label"
    },
    {
      "operation": "addLabels",
      "name": "Add Label",
      "resource": "message"
    },
    {
      "operation": "delete",
      "name": "Delete",
      "resource": "message"
    },
    {
      "operation": "get",
      "name": "Get",
      "resource": "message"
    },
    {
      "operation": "getAll",
      "name": "Get Many",
      "resource": "message"
    },
    {
      "operation": "markAsRead",
      "name": "Mark as Read",
      "resource": "message"
    },
    {
      "operation": "markAsUnread",
      "name": "Mark as Unread",
      "resource": "message"
    },
    {
      "operation": "removeLabels",
      "name": "Remove Label",
      "resource": "message"
    },
    {
      "operation": "reply",
      "name": "Reply",
      "resource": "message"
    },
    {
      "operation": "send",
      "name": "Send",
      "resource": "message"
    },
    {
      "operation": "sendAndWait",
      "name": "Send and Wait for Response",
      "resource": "message"
    },
    {
      "operation": "addLabels",
      "name": "Add Label",
      "resource": "thread"
    },
    {
      "operation": "delete",
      "name": "Delete",
      "resource": "thread"
    },
    {
      "operation": "get",
      "name": "Get",
      "resource": "thread"
    },
    {
      "operation": "getAll",
      "name": "Get Many",
      "resource": "thread"
    },
    {
      "operation": "removeLabels",
      "name": "Remove Label",
      "resource": "thread"
    },
    {
      "operation": "reply",
      "name": "Reply",
      "resource": "thread"
    },
    {
      "operation": "trash",
      "name": "Trash",
      "resource": "thread"
    },
    {
      "operation": "untrash",
      "name": "Untrash",
      "resource": "thread"
    }
  ]

credentials_required:
  [
    {
      "name": "googleApi",
      "required": true,
      "displayOptions": {
        "show": {
          "authentication": [
            "serviceAccount"
          ]
        }
      }
    },
    {
      "name": "gmailOAuth2",
      "required": true,
      "displayOptions": {
        "show": {
          "authentication": [
            "oAuth2"
          ]
        }
      }
    }
  ]


node_type: nodes-base.gmail
package_name: n8n-nodes-base
display_name: Gmail
description: Consume the Gmail API
category: transform
development_style: programmatic
version: 2.2
outputs:
  [
  "main"
  ]

updated_at: 2026-03-30 13:12:49
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Gmail node documentation
  description: Learn how to use the Gmail node in n8n. Follow technical documentation to integrate Gmail node into your workflows.
  contentType: [integration, reference]
  priority: high
  ---

  # Gmail node

  Use the Gmail node to automate work in Gmail, and integrate Gmail with other applications. n8n has built-in support for a wide range of Gmail features, including creating, updating, deleting, and getting drafts, messages, labels, thread.  

  On this page, you'll find a list of operations the Gmail node supports and links to more resources.

  /// note | Credentials
  Refer to [Google credentials](/integrations/builtin/credentials/google/index.md) for guidance on setting up authentication. 
  ///

  --8<-- "_snippets/integrations/builtin/app-nodes/ai-tools.md"

  ## Operations

  * **Draft**
  	* [**Create**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/draft-operations.md#create-a-draft) a draft
  	* [**Delete**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/draft-operations.md#delete-a-draft) a draft
  	* [**Get**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/draft-operations.md#get-a-draft) a draft
  	* [**Get Many**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/draft-operations.md#get-many-drafts) drafts
  * **Label**
  	* [**Create**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/label-operations.md#create-a-label) a label
  	* [**Delete**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/label-operations.md#delete-a-label) a label
  	* [**Get**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/label-operations.md#get-a-label) a label
  	* [**Get Many**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/label-operations.md#get-many-labels) labels
  * **Message**
  	* [**Add Label**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/message-operations.md#add-label-to-a-message) to a message
  	* [**Delete**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/message-operations.md#delete-a-message) a message
  	* [**Get**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/message-operations.md#get-a-message) a message
  	* [**Get Many**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/message-operations.md#get-many-messages) messages
  	* [**Mark as Read**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/message-operations.md#mark-as-read)
  	* [**Mark as Unread**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/message-operations.md#mark-as-unread)
  	* [**Remove Label**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/message-operations.md#remove-label-from-a-message) from a message
  	* [**Reply**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/message-operations.md#reply-to-a-message) to a message
  	* [**Send**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/message-operations.md#send-a-message) a message
  * **Thread**
  	* [**Add Label**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/thread-operations.md#add-label-to-a-thread) to a thread
  	* [**Delete**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/thread-operations.md#delete-a-thread) a thread
  	* [**Get**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/thread-operations.md#get-a-thread) a thread
  	* [**Get Many**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/thread-operations.md#get-many-threads) threads
  	* [**Remove Label**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/thread-operations.md#remove-label-from-a-thread) from thread
  	* [**Reply**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/thread-operations.md#reply-to-a-message) to a message
  	* [**Trash**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/thread-operations.md#trash-a-thread) a thread
  	* [**Untrash**](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/thread-operations.md#untrash-a-thread) a thread

  ## Templates and examples

  <!-- see https://www.notion.so/n8n/Pull-in-templates-for-the-integrations-pages-37c716837b804d30a33b47475f6e3780 -->
  [[ templatesWidget(page.title, 'gmail') ]]

  ## Related resources

  Refer to Google's [Gmail API documentation](https://developers.google.com/gmail/api) for detailed information about the API that this node integrates with.

  n8n provides a trigger node for Gmail. You can find the trigger node docs [here](/integrations/builtin/trigger-nodes/n8n-nodes-base.gmailtrigger/index.md).

  --8<-- "_snippets/integrations/builtin/app-nodes/operation-not-supported.md"

  ## Common issues

  For common errors or issues and suggested resolution steps, refer to [Common Issues](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/common-issues.md).

properties_schema:
  [
    {
      "displayName": "Authentication",
      "name": "authentication",
      "type": "options",
      "default": "oAuth2",
      "options": [
        {
          "name": "OAuth2 (recommended)",
          "value": "oAuth2"
        },
        {
          "name": "Service Account",
          "value": "serviceAccount"
        }
      ]
    },
    {
      "displayName": "Resource",
      "name": "resource",
      "type": "options",
      "default": "message",
      "options": [
        {
          "name": "Message",
          "value": "message"
        },
        {
          "name": "Label",
          "value": "label"
        },
        {
          "name": "Draft",
          "value": "draft"
        },
        {
          "name": "Thread",
          "value": "thread"
        }
      ],
      "noDataExpression": true
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "create",
      "options": [
        {
          "name": "Create",
          "value": "create",
          "action": "Create a draft"
        },
        {
          "name": "Delete",
          "value": "delete",
          "action": "Delete a draft"
        },
        {
          "name": "Get",
          "value": "get",
          "action": "Get a draft"
        },
        {
          "name": "Get Many",
          "value": "getAll",
          "action": "Get many drafts"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "draft"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Draft ID",
      "name": "messageId",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "draft"
          ],
          "operation": [
            "delete",
            "get"
          ]
        }
      }
    },
    {
      "displayName": "Subject",
      "name": "subject",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "draft"
          ],
          "operation": [
            "create"
          ]
        }
      }
    },
    {
      "displayName": "To reply to an existing thread, specify the Thread ID from the options below.",
      "name": "threadNotice",
      "type": "notice",
      "default": "",
      "displayOptions": {
        "show": {
          "resource": [
            "draft"
          ],
          "operation": [
            "create"
          ]
        }
      }
    },
    {
      "displayName": "Email Type",
      "name": "emailType",
      "type": "options",
      "default": "text",
      "options": [
        {
          "name": "HTML",
          "value": "html"
        },
        {
          "name": "Text",
          "value": "text"
        }
      ],
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "draft"
          ],
          "operation": [
            "create"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Message",
      "name": "message",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "draft"
          ],
          "operation": [
            "create"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Attachments",
          "name": "attachmentsUi",
          "placeholder": "Add Attachment",
          "type": "fixedCollection",
          "typeOptions": {
            "multipleValues": true
          },
          "options": [
            {
              "name": "attachmentsBinary",
              "displayName": "Attachment Binary",
              "values": [
                {
                  "displayName": "Attachment Field Name (in Input)",
                  "name": "property",
                  "type": "string",
                  "default": "",
                  "description": "Add the field name from the input node. Multiple properties can be set separated by comma."
                }
              ]
            }
          ],
          "default": {},
          "description": "Array of supported attachments to add to the message"
        },
        {
          "displayName": "BCC",
          "name": "bccList",
          "type": "string",
          "description": "The email addresses of the blind copy recipients. Multiple addresses can be separated by a comma. e.g. jay@getsby.com, jon@smith.com.",
          "placeholder": "info@example.com",
          "default": ""
        },
        {
          "displayName": "CC",
          "name": "ccList",
          "type": "string",
          "description": "The email addresses of the copy recipients. Multiple addresses can be separated by a comma. e.g. jay@getsby.com, jon@smith.com.",
          "placeholder": "info@example.com",
          "default": ""
        },
        {
          "displayName": "From Alias Name or ID",
          "name": "fromAlias",
          "type": "options",
          "default": "",
          "description": "Select the alias to send the email from. Choose from the list, or specify an ID using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>.",
          "typeOptions": {
            "loadOptionsMethod": "getGmailAliases"
          }
        },
        {
          "displayName": "Send Replies To",
          "name": "replyTo",
          "type": "string",
          "placeholder": "reply@example.com",
          "default": "",
          "description": "The email address that the reply message is sent to"
        },
        {
          "displayName": "Thread ID",
          "name": "threadId",
          "type": "string",
          "placeholder": "18cc573e2431878f",
          "default": "",
          "description": "The identifier of the thread to attach the draft"
        },
        {
          "displayName": "To Email",
          "name": "sendTo",
          "type": "string",
          "default": "",
          "placeholder": "info@example.com",
          "description": "The email addresses of the recipients. Multiple addresses can be separated by a comma. e.g. jay@getsby.com, jon@smith.com."
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "draft"
          ],
          "operation": [
            "create"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Attachment Prefix",
          "name": "dataPropertyAttachmentsPrefixName",
          "type": "string",
          "default": "attachment_",
          "description": "Prefix for name of the binary property to which to write the attachment. An index starting with 0 will be added. So if name is 'attachment_' the first attachment is saved to 'attachment_0'."
        },
        {
          "displayName": "Download Attachments",
          "name": "downloadAttachments",
          "type": "boolean",
          "default": false,
          "description": "Whether the draft's attachments will be downloaded"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "draft"
          ],
          "operation": [
            "get"
          ]
        }
      }
    },
    {
      "displayName": "Return All",
      "name": "returnAll",
      "type": "boolean",
      "default": false,
      "description": "Whether to return all results or only up to a given limit",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "draft"
          ]
        }
      }
    },
    {
      "displayName": "Limit",
      "name": "limit",
      "type": "number",
      "default": 50,
      "description": "Max number of results to return",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "draft"
          ],
          "returnAll": [
            false
          ]
        }
      },
      "typeOptions": {
        "minValue": 1,
        "maxValue": 500
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Attachment Prefix",
          "name": "dataPropertyAttachmentsPrefixName",
          "type": "string",
          "default": "attachment_",
          "description": "Prefix for name of the binary property to which to write the attachments. An index starting with 0 will be added. So if name is 'attachment_' the first attachment is saved to 'attachment_0'."
        },
        {
          "displayName": "Download Attachments",
          "name": "downloadAttachments",
          "type": "boolean",
          "default": false,
          "description": "Whether the draft's attachments will be downloaded"
        },
        {
          "displayName": "Include Spam and Trash",
          "name": "includeSpamTrash",
          "type": "boolean",
          "default": false,
          "description": "Whether to include messages from SPAM and TRASH in the results"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "draft"
          ]
        }
      }
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "getAll",
      "options": [
        {
          "name": "Create",
          "value": "create",
          "action": "Create a label"
        },
        {
          "name": "Delete",
          "value": "delete",
          "action": "Delete a label"
        },
        {
          "name": "Get",
          "value": "get",
          "action": "Get a label info"
        },
        {
          "name": "Get Many",
          "value": "getAll",
          "action": "Get many labels"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "label"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Name",
      "name": "name",
      "type": "string",
      "default": "",
      "description": "Label Name",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "label"
          ],
          "operation": [
            "create"
          ]
        }
      }
    },
    {
      "displayName": "Label ID",
      "name": "labelId",
      "type": "string",
      "default": "",
      "description": "The ID of the label",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "label"
          ],
          "operation": [
            "get",
            "delete"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Label List Visibility",
          "name": "labelListVisibility",
          "type": "options",
          "options": [
            {
              "name": "Hide",
              "value": "labelHide"
            },
            {
              "name": "Show",
              "value": "labelShow"
            },
            {
              "name": "Show If Unread",
              "value": "labelShowIfUnread"
            }
          ],
          "default": "labelShow",
          "description": "The visibility of the label in the label list in the Gmail web interface"
        },
        {
          "displayName": "Message List Visibility",
          "name": "messageListVisibility",
          "type": "options",
          "options": [
            {
              "name": "Hide",
              "value": "hide"
            },
            {
              "name": "Show",
              "value": "show"
            }
          ],
          "default": "show",
          "description": "The visibility of messages with this label in the message list in the Gmail web interface"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "label"
          ],
          "operation": [
            "create"
          ]
        }
      }
    },
    {
      "displayName": "Return All",
      "name": "returnAll",
      "type": "boolean",
      "default": false,
      "description": "Whether to return all results or only up to a given limit",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "label"
          ]
        }
      }
    },
    {
      "displayName": "Limit",
      "name": "limit",
      "type": "number",
      "default": 50,
      "description": "Max number of results to return",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "label"
          ],
          "returnAll": [
            false
          ]
        }
      },
      "typeOptions": {
        "minValue": 1,
        "maxValue": 500
      }
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "send",
      "options": [
        {
          "name": "Add Label",
          "value": "addLabels",
          "action": "Add label to message"
        },
        {
          "name": "Delete",
          "value": "delete",
          "action": "Delete a message"
        },
        {
          "name": "Get",
          "value": "get",
          "action": "Get a message"
        },
        {
          "name": "Get Many",
          "value": "getAll",
          "action": "Get many messages"
        },
        {
          "name": "Mark as Read",
          "value": "markAsRead",
          "action": "Mark a message as read"
        },
        {
          "name": "Mark as Unread",
          "value": "markAsUnread",
          "action": "Mark a message as unread"
        },
        {
          "name": "Remove Label",
          "value": "removeLabels",
          "action": "Remove label from message"
        },
        {
          "name": "Reply",
          "value": "reply",
          "action": "Reply to a message"
        },
        {
          "name": "Send",
          "value": "send",
          "action": "Send a message"
        },
        {
          "name": "Send and Wait for Response",
          "value": "sendAndWait",
          "action": "Send message and wait for response"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "message"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Message ID",
      "name": "messageId",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "message"
          ],
          "operation": [
            "get",
            "delete",
            "markAsRead",
            "markAsUnread"
          ]
        }
      }
    },
    {
      "displayName": "Message ID",
      "name": "messageId",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "message"
          ],
          "operation": [
            "reply"
          ]
        }
      }
    },
    {
      "displayName": "To",
      "name": "sendTo",
      "type": "string",
      "default": "",
      "description": "The email addresses of the recipients. Multiple addresses can be separated by a comma. e.g. jay@getsby.com, jon@smith.com.",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "message"
          ],
          "operation": [
            "send"
          ]
        }
      }
    },
    {
      "displayName": "Subject",
      "name": "subject",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "message"
          ],
          "operation": [
            "send"
          ]
        }
      }
    },
    {
      "displayName": "Email Type",
      "name": "emailType",
      "type": "options",
      "default": "html",
      "options": [
        {
          "name": "Text",
          "value": "text"
        },
        {
          "name": "HTML",
          "value": "html"
        }
      ],
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "message"
          ],
          "operation": [
            "send",
            "reply"
          ]
        },
        "hide": {
          "@version": [
            2
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Email Type",
      "name": "emailType",
      "type": "options",
      "default": "html",
      "options": [
        {
          "name": "Text",
          "value": "text"
        },
        {
          "name": "HTML",
          "value": "html"
        }
      ],
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "message"
          ],
          "operation": [
            "send",
            "reply"
          ],
          "@version": [
            2
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Message",
      "name": "message",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "message"
          ],
          "operation": [
            "reply",
            "send"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Append n8n Attribution",
          "name": "appendAttribution",
          "type": "boolean",
          "default": true,
          "description": "Whether to include the phrase “This email was sent automatically with n8n” to the end of the email"
        },
        {
          "displayName": "Attachments",
          "name": "attachmentsUi",
          "placeholder": "Add Attachment",
          "type": "fixedCollection",
          "typeOptions": {
            "multipleValues": true
          },
          "options": [
            {
              "name": "attachmentsBinary",
              "displayName": "Attachment Binary",
              "values": [
                {
                  "displayName": "Attachment Field Name",
                  "name": "property",
                  "type": "string",
                  "default": "data",
                  "description": "Add the field name from the input node. Multiple properties can be set separated by comma.",
                  "hint": "The name of the field with the attachment in the node input"
                }
              ]
            }
          ],
          "default": {},
          "description": "Array of supported attachments to add to the message"
        },
        {
          "displayName": "BCC",
          "name": "bccList",
          "type": "string",
          "description": "The email addresses of the blind copy recipients. Multiple addresses can be separated by a comma. e.g. jay@getsby.com, jon@smith.com.",
          "placeholder": "info@example.com",
          "default": ""
        },
        {
          "displayName": "CC",
          "name": "ccList",
          "type": "string",
          "description": "The email addresses of the copy recipients. Multiple addresses can be separated by a comma. e.g. jay@getsby.com, jon@smith.com.",
          "placeholder": "info@example.com",
          "default": ""
        },
        {
          "displayName": "Sender Name",
          "name": "senderName",
          "type": "string",
          "placeholder": "e.g. Nathan",
          "default": "",
          "description": "The name that will be shown in recipients' inboxes"
        },
        {
          "displayName": "Send Replies To",
          "name": "replyTo",
          "type": "string",
          "placeholder": "reply@example.com",
          "default": "",
          "description": "The email address that the reply message is sent to",
          "displayOptions": {
            "hide": {
              "/operation": [
                "reply"
              ]
            }
          }
        },
        {
          "displayName": "Reply to Sender Only",
          "name": "replyToSenderOnly",
          "type": "boolean",
          "default": false,
          "description": "Whether to reply to the sender only or to the entire list of recipients"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "message"
          ],
          "operation": [
            "send",
            "reply"
          ]
        }
      }
    },
    {
      "displayName": "Simplify",
      "name": "simple",
      "type": "boolean",
      "default": true,
      "description": "Whether to return a simplified version of the response instead of the raw data",
      "displayOptions": {
        "show": {
          "operation": [
            "get"
          ],
          "resource": [
            "message"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Attachment Prefix",
          "name": "dataPropertyAttachmentsPrefixName",
          "type": "string",
          "default": "attachment_",
          "description": "Prefix for name of the binary property to which to write the attachment. An index starting with 0 will be added. So if name is 'attachment_' the first attachment is saved to 'attachment_0'."
        },
        {
          "displayName": "Download Attachments",
          "name": "downloadAttachments",
          "type": "boolean",
          "default": false,
          "description": "Whether the email's attachments will be downloaded and included in the output"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "message"
          ],
          "operation": [
            "get"
          ]
        },
        "hide": {
          "simple": [
            true
          ]
        }
      }
    },
    {
      "displayName": "Return All",
      "name": "returnAll",
      "type": "boolean",
      "default": false,
      "description": "Whether to return all results or only up to a given limit",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "message"
          ]
        }
      }
    },
    {
      "displayName": "Limit",
      "name": "limit",
      "type": "number",
      "default": 50,
      "description": "Max number of results to return",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "message"
          ],
          "returnAll": [
            false
          ]
        }
      },
      "typeOptions": {
        "minValue": 1,
        "maxValue": 500
      }
    },
    {
      "displayName": "Simplify",
      "name": "simple",
      "type": "boolean",
      "default": true,
      "description": "Whether to return a simplified version of the response instead of the raw data",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "message"
          ]
        }
      }
    },
    {
      "displayName": "Fetching a lot of messages may take a long time. Consider using filters to speed things up",
      "name": "filtersNotice",
      "type": "notice",
      "default": "",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "message"
          ],
          "returnAll": [
            true
          ]
        }
      }
    },
    {
      "displayName": "Filters",
      "name": "filters",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Include Spam and Trash",
          "name": "includeSpamTrash",
          "type": "boolean",
          "default": false,
          "description": "Whether to include messages from SPAM and TRASH in the results"
        },
        {
          "displayName": "Label Names or IDs",
          "name": "labelIds",
          "type": "multiOptions",
          "typeOptions": {
            "loadOptionsMethod": "getLabels"
          },
          "default": [],
          "description": "Only return messages with labels that match all of the specified label IDs. Choose from the list, or specify IDs using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>."
        },
        {
          "displayName": "Search",
          "name": "q",
          "type": "string",
          "default": "",
          "placeholder": "has:attachment",
          "hint": "Use the same format as in the Gmail search box. <a href=\"https://support.google.com/mail/answer/7190?hl=en\">More info</a>.",
          "description": "Only return messages matching the specified query"
        },
        {
          "displayName": "Read Status",
          "name": "readStatus",
          "type": "options",
          "default": "unread",
          "hint": "Filter emails by whether they have been read or not",
          "options": [
            {
              "name": "Unread and read emails",
              "value": "both"
            },
            {
              "name": "Unread emails only",
              "value": "unread"
            },
            {
              "name": "Read emails only",
              "value": "read"
            }
          ]
        },
        {
          "displayName": "Received After",
          "name": "receivedAfter",
          "type": "dateTime",
          "default": "",
          "description": "Get all emails received after the specified date. In an expression you can set date using string in ISO format or a timestamp in miliseconds."
        },
        {
          "displayName": "Received Before",
          "name": "receivedBefore",
          "type": "dateTime",
          "default": "",
          "description": "Get all emails received before the specified date. In an expression you can set date using string in ISO format or a timestamp in miliseconds."
        },
        {
          "displayName": "Sender",
          "name": "sender",
          "type": "string",
          "default": "",
          "description": "Sender name or email to filter by",
          "hint": "Enter an email or part of a sender name"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "message"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Attachment Prefix",
          "name": "dataPropertyAttachmentsPrefixName",
          "type": "string",
          "default": "attachment_",
          "description": "Prefix for name of the binary property to which to write the attachment. An index starting with 0 will be added. So if name is 'attachment_' the first attachment is saved to 'attachment_0'."
        },
        {
          "displayName": "Download Attachments",
          "name": "downloadAttachments",
          "type": "boolean",
          "default": false,
          "description": "Whether the email's attachments will be downloaded and included in the output"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "message"
          ]
        },
        "hide": {
          "simple": [
            true
          ]
        }
      }
    },
    {
      "displayName": "Message ID",
      "name": "messageId",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "message"
          ],
          "operation": [
            "addLabels",
            "removeLabels"
          ]
        }
      }
    },
    {
      "displayName": "Label Names or IDs",
      "name": "labelIds",
      "type": "multiOptions",
      "default": [],
      "description": "Choose from the list, or specify IDs using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "message"
          ],
          "operation": [
            "addLabels",
            "removeLabels"
          ]
        }
      },
      "typeOptions": {
        "loadOptionsMethod": "getLabels"
      }
    },
    {
      "displayName": "To",
      "name": "sendTo",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "message"
          ],
          "operation": [
            "sendAndWait"
          ]
        }
      }
    },
    {
      "displayName": "Subject",
      "name": "subject",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "message"
          ],
          "operation": [
            "sendAndWait"
          ]
        }
      }
    },
    {
      "displayName": "Message",
      "name": "message",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "message"
          ],
          "operation": [
            "sendAndWait"
          ]
        }
      },
      "typeOptions": {
        "rows": 4
      }
    },
    {
      "displayName": "Response Type",
      "name": "responseType",
      "type": "options",
      "default": "approval",
      "options": [
        {
          "name": "Approval",
          "value": "approval",
          "description": "User can approve/disapprove from within the message"
        },
        {
          "name": "Free Text",
          "value": "freeText",
          "description": "User can submit a response via a form"
        },
        {
          "name": "Custom Form",
          "value": "customForm",
          "description": "User can submit a response via a custom form"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "message"
          ],
          "operation": [
            "sendAndWait"
          ]
        }
      }
    },
    {
      "displayName": "Define Form",
      "name": "defineForm",
      "type": "options",
      "default": "fields",
      "options": [
        {
          "name": "Using Fields Below",
          "value": "fields"
        },
        {
          "name": "Using JSON",
          "value": "json"
        }
      ],
      "displayOptions": {
        "show": {
          "responseType": [
            "customForm"
          ],
          "resource": [
            "message"
          ],
          "operation": [
            "sendAndWait"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Form Fields",
      "name": "jsonOutput",
      "type": "json",
      "default": "[\n  {\n    \"fieldLabel\": \"Name\",\n    \"placeholder\": \"enter your name\",\n    \"requiredField\": true\n  },\n  {\n    \"fieldLabel\": \"Age\",\n    \"fieldType\": \"number\",\n    \"placeholder\": \"enter your age\"\n  },\n  {\n    \"fieldLabel\": \"Email\",\n    \"fieldType\": \"email\",\n    \"requiredField\": true\n  },\n  {\n    \"fieldLabel\": \"Textarea\",\n    \"fieldType\": \"textarea\"\n  },\n  {\n    \"fieldLabel\": \"Dropdown Options\",\n    \"fieldType\": \"dropdown\",\n    \"fieldOptions\": {\n      \"values\": [\n        {\n          \"option\": \"option 1\"\n        },\n        {\n          \"option\": \"option 2\"\n        }\n      ]\n    },\n    \"requiredField\": true\n  },\n  {\n    \"fieldLabel\": \"Checkboxes\",\n    \"fieldType\": \"checkbox\",\n    \"fieldOptions\": {\n      \"values\": [\n        {\n          \"option\": \"option 1\"\n        },\n        {\n          \"option\": \"option 2\"\n        }\n      ]\n    }\n  },\n  {\n    \"fieldLabel\": \"Radio\",\n    \"fieldType\": \"radio\",\n    \"fieldOptions\": {\n      \"values\": [\n        {\n          \"option\": \"option 1\"\n        },\n        {\n          \"option\": \"option 2\"\n        }\n      ]\n    }\n  },\n  {\n    \"fieldLabel\": \"Email\",\n    \"fieldType\": \"email\",\n    \"placeholder\": \"me@mail.con\"\n  },\n  {\n    \"fieldLabel\": \"File\",\n    \"fieldType\": \"file\",\n    \"multipleFiles\": true,\n    \"acceptFileTypes\": \".jpg, .png\"\n  },\n  {\n    \"fieldLabel\": \"Number\",\n    \"fieldType\": \"number\"\n  },\n  {\n    \"fieldLabel\": \"Password\",\n    \"fieldType\": \"password\"\n  }\n]\n",
      "displayOptions": {
        "show": {
          "defineForm": [
            "json"
          ],
          "responseType": [
            "customForm"
          ],
          "resource": [
            "message"
          ],
          "operation": [
            "sendAndWait"
          ]
        }
      },
      "typeOptions": {
        "rows": 5
      }
    },
    {
      "displayName": "Form Elements",
      "name": "formFields",
      "type": "fixedCollection",
      "default": {},
      "options": [
        {
          "displayName": "Values",
          "name": "values",
          "values": [
            {
              "displayName": "Field Name",
              "name": "fieldName",
              "description": "The name of the field, used in input attributes and referenced by the workflow",
              "required": true,
              "type": "string",
              "default": "",
              "displayOptions": {
                "hide": {
                  "fieldType": [
                    "html"
                  ]
                },
                "show": {
                  "@version": [
                    2.4
                  ]
                }
              }
            },
            {
              "displayName": "Label",
              "name": "fieldLabel",
              "type": "string",
              "default": "",
              "placeholder": "e.g. What is your name?",
              "description": "Label that appears above the input field",
              "required": true,
              "displayOptions": {
                "hide": {
                  "fieldType": [
                    "hiddenField",
                    "html"
                  ]
                },
                "show": {
                  "@version": [
                    {
                      "_cnd": {
                        "gte": 2.4
                      }
                    }
                  ]
                }
              }
            },
            {
              "displayName": "Field Name",
              "name": "fieldLabel",
              "type": "string",
              "default": "",
              "placeholder": "e.g. What is your name?",
              "description": "Label that appears above the input field",
              "required": true,
              "displayOptions": {
                "hide": {
                  "fieldType": [
                    "hiddenField",
                    "html"
                  ]
                },
                "show": {
                  "@version": [
                    {
                      "_cnd": {
                        "lt": 2.4
                      }
                    }
                  ]
                }
              }
            },
            {
              "displayName": "Field Name",
              "name": "fieldName",
              "description": "The name of the field, used in input attributes and referenced by the workflow",
              "type": "string",
              "default": "",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "hiddenField"
                  ],
                  "@version": [
                    {
                      "_cnd": {
                        "lt": 2.4
                      }
                    }
                  ]
                }
              }
            },
            {
              "displayName": "Element Type",
              "name": "fieldType",
              "type": "options",
              "default": "text",
              "description": "The type of field to add to the form",
              "options": [
                {
                  "name": "Checkboxes",
                  "value": "checkbox"
                },
                {
                  "name": "Custom HTML",
                  "value": "html"
                },
                {
                  "name": "Date",
                  "value": "date"
                },
                {
                  "name": "Dropdown",
                  "value": "dropdown"
                },
                {
                  "name": "Email",
                  "value": "email"
                },
                {
                  "name": "File",
                  "value": "file"
                },
                {
                  "name": "Hidden Field",
                  "value": "hiddenField"
                },
                {
                  "name": "Number",
                  "value": "number"
                },
                {
                  "name": "Password",
                  "value": "password"
                },
                {
                  "name": "Radio Buttons",
                  "value": "radio"
                },
                {
                  "name": "Text Input",
                  "value": "text"
                },
                {
                  "name": "Textarea",
                  "value": "textarea"
                }
              ],
              "required": true
            },
            {
              "displayName": "Element Name",
              "name": "elementName",
              "type": "string",
              "default": "",
              "placeholder": "e.g. content-section",
              "description": "Optional field. It can be used to include the html in the output.",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "html"
                  ]
                }
              }
            },
            {
              "displayName": "Custom Field Name",
              "name": "fieldName",
              "description": "The name of the field, used in input attributes and referenced by the workflow",
              "type": "string",
              "default": "",
              "displayOptions": {
                "hide": {
                  "fieldType": [
                    "html"
                  ]
                },
                "show": {
                  "@version": [
                    {
                      "_cnd": {
                        "gte": 2.5
                      }
                    }
                  ]
                }
              }
            },
            {
              "displayName": "Placeholder",
              "name": "placeholder",
              "description": "Sample text to display inside the field",
              "type": "string",
              "default": "",
              "displayOptions": {
                "hide": {
                  "fieldType": [
                    "dropdown",
                    "date",
                    "file",
                    "html",
                    "hiddenField",
                    "radio",
                    "checkbox"
                  ]
                }
              }
            },
            {
              "displayName": "Default Value",
              "name": "defaultValue",
              "description": "Default value that will be pre-filled in the form field",
              "type": "string",
              "default": "",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "text",
                    "number",
                    "email",
                    "textarea"
                  ]
                }
              }
            },
            {
              "displayName": "Default Value",
              "name": "defaultValue",
              "description": "Default date value that will be pre-filled in the form field (format: YYYY-MM-DD)",
              "type": "dateTime",
              "typeOptions": {
                "dateOnly": true
              },
              "default": "",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "date"
                  ]
                }
              }
            },
            {
              "displayName": "Default Value",
              "name": "defaultValue",
              "description": "Default value that will be pre-selected. Must match one of the option labels.",
              "type": "string",
              "default": "",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "dropdown",
                    "radio"
                  ]
                }
              }
            },
            {
              "displayName": "Default Value",
              "name": "defaultValue",
              "description": "Default value(s) that will be pre-selected. Must match one or multiple of the option labels. Separate multiple pre-selected options with a comma.",
              "type": "string",
              "default": "",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "checkbox"
                  ]
                }
              }
            },
            {
              "displayName": "Field Value",
              "name": "fieldValue",
              "description": "Input value can be set here or will be passed as a query parameter via Field Name if no value is set",
              "type": "string",
              "default": "",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "hiddenField"
                  ]
                }
              }
            },
            {
              "displayName": "Field Options",
              "name": "fieldOptions",
              "placeholder": "Add Field Option",
              "description": "List of options that can be selected from the dropdown",
              "type": "fixedCollection",
              "default": {
                "values": [
                  {
                    "option": ""
                  }
                ]
              },
              "required": true,
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "dropdown"
                  ]
                }
              },
              "typeOptions": {
                "multipleValues": true,
                "sortable": true
              },
              "options": [
                {
                  "displayName": "Values",
                  "name": "values",
                  "values": [
                    {
                      "displayName": "Option",
                      "name": "option",
                      "type": "string",
                      "default": ""
                    }
                  ]
                }
              ]
            },
            {
              "displayName": "Checkboxes",
              "name": "fieldOptions",
              "placeholder": "Add Checkbox",
              "type": "fixedCollection",
              "default": {
                "values": [
                  {
                    "option": ""
                  }
                ]
              },
              "required": true,
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "checkbox"
                  ]
                }
              },
              "typeOptions": {
                "multipleValues": true,
                "sortable": true
              },
              "options": [
                {
                  "displayName": "Values",
                  "name": "values",
                  "values": [
                    {
                      "displayName": "Checkbox Label",
                      "name": "option",
                      "type": "string",
                      "default": ""
                    }
                  ]
                }
              ]
            },
            {
              "displayName": "Radio Buttons",
              "name": "fieldOptions",
              "placeholder": "Add Radio Button",
              "type": "fixedCollection",
              "default": {
                "values": [
                  {
                    "option": ""
                  }
                ]
              },
              "required": true,
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "radio"
                  ]
                }
              },
              "typeOptions": {
                "multipleValues": true,
                "sortable": true
              },
              "options": [
                {
                  "displayName": "Values",
                  "name": "values",
                  "values": [
                    {
                      "displayName": "Radio Button Label",
                      "name": "option",
                      "type": "string",
                      "default": ""
                    }
                  ]
                }
              ]
            },
            {
              "displayName": "Multiple Choice is a legacy option, please use Checkboxes or Radio Buttons field type instead",
              "name": "multiselectLegacyNotice",
              "type": "notice",
              "default": "",
              "displayOptions": {
                "show": {
                  "multiselect": [
                    true
                  ],
                  "fieldType": [
                    "dropdown"
                  ],
                  "@version": [
                    {
                      "_cnd": {
                        "lt": 2.3
                      }
                    }
                  ]
                }
              }
            },
            {
              "displayName": "Multiple Choice",
              "name": "multiselect",
              "type": "boolean",
              "default": false,
              "description": "Whether to allow the user to select multiple options from the dropdown list",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "dropdown"
                  ],
                  "@version": [
                    {
                      "_cnd": {
                        "lt": 2.3
                      }
                    }
                  ]
                }
              }
            },
            {
              "displayName": "Limit Selection",
              "name": "limitSelection",
              "type": "options",
              "default": "unlimited",
              "options": [
                {
                  "name": "Exact Number",
                  "value": "exact"
                },
                {
                  "name": "Range",
                  "value": "range"
                },
                {
                  "name": "Unlimited",
                  "value": "unlimited"
                }
              ],
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "checkbox"
                  ]
                }
              }
            },
            {
              "displayName": "Number of Selections",
              "name": "numberOfSelections",
              "type": "number",
              "default": 1,
              "typeOptions": {
                "numberPrecision": 0,
                "minValue": 1,
                "showEvenWhenOptional": true
              },
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "checkbox"
                  ],
                  "limitSelection": [
                    "exact"
                  ]
                }
              }
            },
            {
              "displayName": "Minimum Selections",
              "name": "minSelections",
              "type": "number",
              "default": 0,
              "typeOptions": {
                "numberPrecision": 0,
                "minValue": 0,
                "showEvenWhenOptional": true
              },
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "checkbox"
                  ],
                  "limitSelection": [
                    "range"
                  ]
                }
              }
            },
            {
              "displayName": "Maximum Selections",
              "name": "maxSelections",
              "type": "number",
              "default": 1,
              "typeOptions": {
                "numberPrecision": 0,
                "minValue": 1,
                "showEvenWhenOptional": true
              },
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "checkbox"
                  ],
                  "limitSelection": [
                    "range"
                  ]
                }
              }
            },
            {
              "displayName": "HTML",
              "name": "html",
              "typeOptions": {
                "editor": "htmlEditor"
              },
              "type": "string",
              "noDataExpression": true,
              "default": "<!-- Your custom HTML here --->\n\n\n",
              "description": "HTML elements to display on the form page",
              "hint": "Does not accept <code>&lt;script&gt;</code>, <code>&lt;style&gt;</code> or <code>&lt;input&gt;</code> tags",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "html"
                  ]
                }
              }
            },
            {
              "displayName": "Multiple Files",
              "name": "multipleFiles",
              "type": "boolean",
              "default": true,
              "description": "Whether to allow the user to select multiple files from the file input or just one",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "file"
                  ]
                }
              }
            },
            {
              "displayName": "Accepted File Types",
              "name": "acceptFileTypes",
              "type": "string",
              "default": "",
              "description": "Comma-separated list of allowed file extensions",
              "hint": "Leave empty to allow all file types",
              "placeholder": "e.g. .jpg, .png",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "file"
                  ]
                }
              }
            },
            {
              "displayName": "The displayed date is formatted based on the locale of the user's browser",
              "name": "formatDate",
              "type": "notice",
              "default": "",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "date"
                  ]
                }
              }
            },
            {
              "displayName": "Required Field",
              "name": "requiredField",
              "type": "boolean",
              "default": false,
              "description": "Whether to require the user to enter a value for this field before submitting the form",
              "displayOptions": {
                "hide": {
                  "fieldType": [
                    "html",
                    "hiddenField"
                  ]
                }
              }
            }
          ]
        }
      ],
      "displayOptions": {
        "show": {
          "@version": [
            {
              "_cnd": {
                "lt": 2.5
              }
            }
          ],
          "defineForm": [
            "fields"
          ],
          "responseType": [
            "customForm"
          ],
          "resource": [
            "message"
          ],
          "operation": [
            "sendAndWait"
          ]
        }
      },
      "typeOptions": {
        "multipleValues": true,
        "sortable": true,
        "fixedCollection": {
          "itemTitle": "={{ $collection.item.properties.find(p => p.name === \"fieldType\").options.find(o => o.value === $collection.item.value.fieldType).name }}"
        }
      }
    },
    {
      "displayName": "Form Elements",
      "name": "formFields",
      "type": "fixedCollection",
      "default": {},
      "options": [
        {
          "displayName": "Values",
          "name": "values",
          "values": [
            {
              "displayName": "Field Name",
              "name": "fieldName",
              "description": "The name of the field, used in input attributes and referenced by the workflow",
              "required": true,
              "type": "string",
              "default": "",
              "displayOptions": {
                "hide": {
                  "fieldType": [
                    "html"
                  ]
                },
                "show": {
                  "@version": [
                    2.4
                  ]
                }
              }
            },
            {
              "displayName": "Label",
              "name": "fieldLabel",
              "type": "string",
              "default": "",
              "placeholder": "e.g. What is your name?",
              "description": "Label that appears above the input field",
              "required": true,
              "displayOptions": {
                "hide": {
                  "fieldType": [
                    "hiddenField",
                    "html"
                  ]
                },
                "show": {
                  "@version": [
                    {
                      "_cnd": {
                        "gte": 2.4
                      }
                    }
                  ]
                }
              }
            },
            {
              "displayName": "Field Name",
              "name": "fieldLabel",
              "type": "string",
              "default": "",
              "placeholder": "e.g. What is your name?",
              "description": "Label that appears above the input field",
              "required": true,
              "displayOptions": {
                "hide": {
                  "fieldType": [
                    "hiddenField",
                    "html"
                  ]
                },
                "show": {
                  "@version": [
                    {
                      "_cnd": {
                        "lt": 2.4
                      }
                    }
                  ]
                }
              }
            },
            {
              "displayName": "Field Name",
              "name": "fieldName",
              "description": "The name of the field, used in input attributes and referenced by the workflow",
              "type": "string",
              "default": "",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "hiddenField"
                  ],
                  "@version": [
                    {
                      "_cnd": {
                        "lt": 2.4
                      }
                    }
                  ]
                }
              }
            },
            {
              "displayName": "Element Type",
              "name": "fieldType",
              "type": "options",
              "default": "text",
              "description": "The type of field to add to the form",
              "options": [
                {
                  "name": "Checkboxes",
                  "value": "checkbox"
                },
                {
                  "name": "Custom HTML",
                  "value": "html"
                },
                {
                  "name": "Date",
                  "value": "date"
                },
                {
                  "name": "Dropdown",
                  "value": "dropdown"
                },
                {
                  "name": "Email",
                  "value": "email"
                },
                {
                  "name": "File",
                  "value": "file"
                },
                {
                  "name": "Hidden Field",
                  "value": "hiddenField"
                },
                {
                  "name": "Number",
                  "value": "number"
                },
                {
                  "name": "Password",
                  "value": "password"
                },
                {
                  "name": "Radio Buttons",
                  "value": "radio"
                },
                {
                  "name": "Text Input",
                  "value": "text"
                },
                {
                  "name": "Textarea",
                  "value": "textarea"
                }
              ],
              "required": true
            },
            {
              "displayName": "Element Name",
              "name": "elementName",
              "type": "string",
              "default": "",
              "placeholder": "e.g. content-section",
              "description": "Optional field. It can be used to include the html in the output.",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "html"
                  ]
                }
              }
            },
            {
              "displayName": "Custom Field Name",
              "name": "fieldName",
              "description": "The name of the field, used in input attributes and referenced by the workflow",
              "type": "string",
              "default": "",
              "displayOptions": {
                "hide": {
                  "fieldType": [
                    "html"
                  ]
                },
                "show": {
                  "@version": [
                    {
                      "_cnd": {
                        "gte": 2.5
                      }
                    }
                  ]
                }
              }
            },
            {
              "displayName": "Placeholder",
              "name": "placeholder",
              "description": "Sample text to display inside the field",
              "type": "string",
              "default": "",
              "displayOptions": {
                "hide": {
                  "fieldType": [
                    "dropdown",
                    "date",
                    "file",
                    "html",
                    "hiddenField",
                    "radio",
                    "checkbox"
                  ]
                }
              }
            },
            {
              "displayName": "Default Value",
              "name": "defaultValue",
              "description": "Default value that will be pre-filled in the form field",
              "type": "string",
              "default": "",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "text",
                    "number",
                    "email",
                    "textarea"
                  ]
                }
              }
            },
            {
              "displayName": "Default Value",
              "name": "defaultValue",
              "description": "Default date value that will be pre-filled in the form field (format: YYYY-MM-DD)",
              "type": "dateTime",
              "typeOptions": {
                "dateOnly": true
              },
              "default": "",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "date"
                  ]
                }
              }
            },
            {
              "displayName": "Default Value",
              "name": "defaultValue",
              "description": "Default value that will be pre-selected. Must match one of the option labels.",
              "type": "string",
              "default": "",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "dropdown",
                    "radio"
                  ]
                }
              }
            },
            {
              "displayName": "Default Value",
              "name": "defaultValue",
              "description": "Default value(s) that will be pre-selected. Must match one or multiple of the option labels. Separate multiple pre-selected options with a comma.",
              "type": "string",
              "default": "",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "checkbox"
                  ]
                }
              }
            },
            {
              "displayName": "Field Value",
              "name": "fieldValue",
              "description": "Input value can be set here or will be passed as a query parameter via Field Name if no value is set",
              "type": "string",
              "default": "",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "hiddenField"
                  ]
                }
              }
            },
            {
              "displayName": "Field Options",
              "name": "fieldOptions",
              "placeholder": "Add Field Option",
              "description": "List of options that can be selected from the dropdown",
              "type": "fixedCollection",
              "default": {
                "values": [
                  {
                    "option": ""
                  }
                ]
              },
              "required": true,
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "dropdown"
                  ]
                }
              },
              "typeOptions": {
                "multipleValues": true,
                "sortable": true
              },
              "options": [
                {
                  "displayName": "Values",
                  "name": "values",
                  "values": [
                    {
                      "displayName": "Option",
                      "name": "option",
                      "type": "string",
                      "default": ""
                    }
                  ]
                }
              ]
            },
            {
              "displayName": "Checkboxes",
              "name": "fieldOptions",
              "placeholder": "Add Checkbox",
              "type": "fixedCollection",
              "default": {
                "values": [
                  {
                    "option": ""
                  }
                ]
              },
              "required": true,
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "checkbox"
                  ]
                }
              },
              "typeOptions": {
                "multipleValues": true,
                "sortable": true
              },
              "options": [
                {
                  "displayName": "Values",
                  "name": "values",
                  "values": [
                    {
                      "displayName": "Checkbox Label",
                      "name": "option",
                      "type": "string",
                      "default": ""
                    }
                  ]
                }
              ]
            },
            {
              "displayName": "Radio Buttons",
              "name": "fieldOptions",
              "placeholder": "Add Radio Button",
              "type": "fixedCollection",
              "default": {
                "values": [
                  {
                    "option": ""
                  }
                ]
              },
              "required": true,
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "radio"
                  ]
                }
              },
              "typeOptions": {
                "multipleValues": true,
                "sortable": true
              },
              "options": [
                {
                  "displayName": "Values",
                  "name": "values",
                  "values": [
                    {
                      "displayName": "Radio Button Label",
                      "name": "option",
                      "type": "string",
                      "default": ""
                    }
                  ]
                }
              ]
            },
            {
              "displayName": "Multiple Choice is a legacy option, please use Checkboxes or Radio Buttons field type instead",
              "name": "multiselectLegacyNotice",
              "type": "notice",
              "default": "",
              "displayOptions": {
                "show": {
                  "multiselect": [
                    true
                  ],
                  "fieldType": [
                    "dropdown"
                  ],
                  "@version": [
                    {
                      "_cnd": {
                        "lt": 2.3
                      }
                    }
                  ]
                }
              }
            },
            {
              "displayName": "Multiple Choice",
              "name": "multiselect",
              "type": "boolean",
              "default": false,
              "description": "Whether to allow the user to select multiple options from the dropdown list",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "dropdown"
                  ],
                  "@version": [
                    {
                      "_cnd": {
                        "lt": 2.3
                      }
                    }
                  ]
                }
              }
            },
            {
              "displayName": "Limit Selection",
              "name": "limitSelection",
              "type": "options",
              "default": "unlimited",
              "options": [
                {
                  "name": "Exact Number",
                  "value": "exact"
                },
                {
                  "name": "Range",
                  "value": "range"
                },
                {
                  "name": "Unlimited",
                  "value": "unlimited"
                }
              ],
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "checkbox"
                  ]
                }
              }
            },
            {
              "displayName": "Number of Selections",
              "name": "numberOfSelections",
              "type": "number",
              "default": 1,
              "typeOptions": {
                "numberPrecision": 0,
                "minValue": 1,
                "showEvenWhenOptional": true
              },
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "checkbox"
                  ],
                  "limitSelection": [
                    "exact"
                  ]
                }
              }
            },
            {
              "displayName": "Minimum Selections",
              "name": "minSelections",
              "type": "number",
              "default": 0,
              "typeOptions": {
                "numberPrecision": 0,
                "minValue": 0,
                "showEvenWhenOptional": true
              },
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "checkbox"
                  ],
                  "limitSelection": [
                    "range"
                  ]
                }
              }
            },
            {
              "displayName": "Maximum Selections",
              "name": "maxSelections",
              "type": "number",
              "default": 1,
              "typeOptions": {
                "numberPrecision": 0,
                "minValue": 1,
                "showEvenWhenOptional": true
              },
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "checkbox"
                  ],
                  "limitSelection": [
                    "range"
                  ]
                }
              }
            },
            {
              "displayName": "HTML",
              "name": "html",
              "typeOptions": {
                "editor": "htmlEditor"
              },
              "type": "string",
              "noDataExpression": true,
              "default": "<!-- Your custom HTML here --->\n\n\n",
              "description": "HTML elements to display on the form page",
              "hint": "Does not accept <code>&lt;script&gt;</code>, <code>&lt;style&gt;</code> or <code>&lt;input&gt;</code> tags",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "html"
                  ]
                }
              }
            },
            {
              "displayName": "Multiple Files",
              "name": "multipleFiles",
              "type": "boolean",
              "default": true,
              "description": "Whether to allow the user to select multiple files from the file input or just one",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "file"
                  ]
                }
              }
            },
            {
              "displayName": "Accepted File Types",
              "name": "acceptFileTypes",
              "type": "string",
              "default": "",
              "description": "Comma-separated list of allowed file extensions",
              "hint": "Leave empty to allow all file types",
              "placeholder": "e.g. .jpg, .png",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "file"
                  ]
                }
              }
            },
            {
              "displayName": "The displayed date is formatted based on the locale of the user's browser",
              "name": "formatDate",
              "type": "notice",
              "default": "",
              "displayOptions": {
                "show": {
                  "fieldType": [
                    "date"
                  ]
                }
              }
            },
            {
              "displayName": "Required Field",
              "name": "requiredField",
              "type": "boolean",
              "default": false,
              "description": "Whether to require the user to enter a value for this field before submitting the form",
              "displayOptions": {
                "hide": {
                  "fieldType": [
                    "html",
                    "hiddenField"
                  ]
                }
              }
            }
          ]
        }
      ],
      "displayOptions": {
        "show": {
          "@version": [
            {
              "_cnd": {
                "gte": 2.5
              }
            }
          ],
          "defineForm": [
            "fields"
          ],
          "responseType": [
            "customForm"
          ],
          "resource": [
            "message"
          ],
          "operation": [
            "sendAndWait"
          ]
        }
      },
      "typeOptions": {
        "multipleValues": true,
        "sortable": true,
        "hideOptionalFields": true,
        "addOptionalFieldButtonText": "Add Attributes",
        "fixedCollection": {
          "itemTitle": "={{ $collection.item.properties.find(p => p.name === \"fieldType\").options.find(o => o.value === $collection.item.value.fieldType).name }}"
        }
      }
    },
    {
      "displayName": "Approval Options",
      "name": "approvalOptions",
      "type": "fixedCollection",
      "default": {},
      "options": [
        {
          "displayName": "Values",
          "name": "values",
          "values": [
            {
              "displayName": "Type of Approval",
              "name": "approvalType",
              "type": "options",
              "placeholder": "Add option",
              "default": "single",
              "options": [
                {
                  "name": "Approve Only",
                  "value": "single"
                },
                {
                  "name": "Approve and Disapprove",
                  "value": "double"
                }
              ]
            },
            {
              "displayName": "Approve Button Label",
              "name": "approveLabel",
              "type": "string",
              "default": "Approve",
              "displayOptions": {
                "show": {
                  "approvalType": [
                    "single",
                    "double"
                  ]
                }
              }
            },
            {
              "displayName": "Approve Button Style",
              "name": "buttonApprovalStyle",
              "type": "options",
              "default": "primary",
              "options": [
                {
                  "name": "Primary",
                  "value": "primary"
                },
                {
                  "name": "Secondary",
                  "value": "secondary"
                }
              ],
              "displayOptions": {
                "show": {
                  "approvalType": [
                    "single",
                    "double"
                  ]
                }
              }
            },
            {
              "displayName": "Disapprove Button Label",
              "name": "disapproveLabel",
              "type": "string",
              "default": "Decline",
              "displayOptions": {
                "show": {
                  "approvalType": [
                    "double"
                  ]
                }
              }
            },
            {
              "displayName": "Disapprove Button Style",
              "name": "buttonDisapprovalStyle",
              "type": "options",
              "default": "secondary",
              "options": [
                {
                  "name": "Primary",
                  "value": "primary"
                },
                {
                  "name": "Secondary",
                  "value": "secondary"
                }
              ],
              "displayOptions": {
                "show": {
                  "approvalType": [
                    "double"
                  ]
                }
              }
            }
          ]
        }
      ],
      "displayOptions": {
        "show": {
          "responseType": [
            "approval"
          ],
          "resource": [
            "message"
          ],
          "operation": [
            "sendAndWait"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Limit Wait Time",
          "name": "limitWaitTime",
          "type": "fixedCollection",
          "description": "Whether to limit the time this node should wait for a user response before execution resumes",
          "default": {
            "values": {
              "limitType": "afterTimeInterval",
              "resumeAmount": 45,
              "resumeUnit": "minutes"
            }
          },
          "options": [
            {
              "displayName": "Values",
              "name": "values",
              "values": [
                {
                  "displayName": "Limit Type",
                  "name": "limitType",
                  "type": "options",
                  "default": "afterTimeInterval",
                  "description": "Sets the condition for the execution to resume. Can be a specified date or after some time.",
                  "options": [
                    {
                      "name": "After Time Interval",
                      "description": "Waits for a certain amount of time",
                      "value": "afterTimeInterval"
                    },
                    {
                      "name": "At Specified Time",
                      "description": "Waits until the set date and time to continue",
                      "value": "atSpecifiedTime"
                    }
                  ]
                },
                {
                  "displayName": "Amount",
                  "name": "resumeAmount",
                  "type": "number",
                  "displayOptions": {
                    "show": {
                      "limitType": [
                        "afterTimeInterval"
                      ]
                    }
                  },
                  "typeOptions": {
                    "minValue": 0,
                    "numberPrecision": 2
                  },
                  "default": 1,
                  "description": "The time to wait"
                },
                {
                  "displayName": "Unit",
                  "name": "resumeUnit",
                  "type": "options",
                  "displayOptions": {
                    "show": {
                      "limitType": [
                        "afterTimeInterval"
                      ]
                    }
                  },
                  "options": [
                    {
                      "name": "Minutes",
                      "value": "minutes"
                    },
                    {
                      "name": "Hours",
                      "value": "hours"
                    },
                    {
                      "name": "Days",
                      "value": "days"
                    }
                  ],
                  "default": "hours",
                  "description": "Unit of the interval value"
                },
                {
                  "displayName": "Max Date and Time",
                  "name": "maxDateAndTime",
                  "type": "dateTime",
                  "displayOptions": {
                    "show": {
                      "limitType": [
                        "atSpecifiedTime"
                      ]
                    }
                  },
                  "default": "",
                  "description": "Continue execution after the specified date and time"
                }
              ]
            }
          ]
        },
        {
          "displayName": "Append n8n Attribution",
          "name": "appendAttribution",
          "type": "boolean",
          "default": true,
          "description": "Whether to include the phrase \"This message was sent automatically with n8n\" to the end of the message"
        }
      ],
      "displayOptions": {
        "show": {
          "responseType": [
            "approval"
          ],
          "resource": [
            "message"
          ],
          "operation": [
            "sendAndWait"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Message Button Label",
          "name": "messageButtonLabel",
          "type": "string",
          "default": "Respond"
        },
        {
          "displayName": "Response Form Title",
          "name": "responseFormTitle",
          "description": "Title of the form that the user can access to provide their response",
          "type": "string",
          "default": ""
        },
        {
          "displayName": "Response Form Description",
          "name": "responseFormDescription",
          "description": "Description of the form that the user can access to provide their response",
          "type": "string",
          "default": ""
        },
        {
          "displayName": "Response Form Button Label",
          "name": "responseFormButtonLabel",
          "type": "string",
          "default": "Submit"
        },
        {
          "displayName": "Response Form Custom Styling",
          "name": "responseFormCustomCss",
          "type": "string",
          "typeOptions": {
            "rows": 10,
            "editor": "cssEditor"
          },
          "default": ":root {\n\t--font-family: 'Open Sans', sans-serif;\n\t--font-weight-normal: 400;\n\t--font-weight-bold: 600;\n\t--font-size-body: 12px;\n\t--font-size-label: 14px;\n\t--font-size-test-notice: 12px;\n\t--font-size-input: 14px;\n\t--font-size-header: 20px;\n\t--font-size-paragraph: 14px;\n\t--font-size-link: 12px;\n\t--font-size-error: 12px;\n\t--font-size-html-h1: 28px;\n\t--font-size-html-h2: 20px;\n\t--font-size-html-h3: 16px;\n\t--font-size-html-h4: 14px;\n\t--font-size-html-h5: 12px;\n\t--font-size-html-h6: 10px;\n\t--font-size-subheader: 14px;\n\n\t/* Colors */\n\t--color-background: #fbfcfe;\n\t--color-test-notice-text: #e6a23d;\n\t--color-test-notice-bg: #fefaf6;\n\t--color-test-notice-border: #f6dcb7;\n\t--color-card-bg: #ffffff;\n\t--color-card-border: #dbdfe7;\n\t--color-card-shadow: rgba(99, 77, 255, 0.06);\n\t--color-link: #7e8186;\n\t--color-header: #525356;\n\t--color-label: #555555;\n\t--color-input-border: #dbdfe7;\n\t--color-input-text: #71747A;\n\t--color-focus-border: rgb(90, 76, 194);\n\t--color-submit-btn-bg: #ff6d5a;\n\t--color-submit-btn-text: #ffffff;\n\t--color-error: #ea1f30;\n\t--color-required: #ff6d5a;\n\t--color-clear-button-bg: #7e8186;\n\t--color-html-text: #555;\n\t--color-html-link: #ff6d5a;\n\t--color-header-subtext: #7e8186;\n\n\t/* Border Radii */\n\t--border-radius-card: 8px;\n\t--border-radius-input: 6px;\n\t--border-radius-clear-btn: 50%;\n\t--card-border-radius: 8px;\n\n\t/* Spacing */\n\t--padding-container-top: 24px;\n\t--padding-card: 24px;\n\t--padding-test-notice-vertical: 12px;\n\t--padding-test-notice-horizontal: 24px;\n\t--margin-bottom-card: 16px;\n\t--padding-form-input: 12px;\n\t--card-padding: 24px;\n\t--card-margin-bottom: 16px;\n\n\t/* Dimensions */\n\t--container-width: 448px;\n\t--submit-btn-height: 48px;\n\t--checkbox-size: 18px;\n\n\t/* Others */\n\t--box-shadow-card: 0px 4px 16px 0px var(--color-card-shadow);\n\t--opacity-placeholder: 0.5;\n}",
          "description": "Override default styling of the response form with CSS"
        },
        {
          "displayName": "Limit Wait Time",
          "name": "limitWaitTime",
          "type": "fixedCollection",
          "description": "Whether to limit the time this node should wait for a user response before execution resumes",
          "default": {
            "values": {
              "limitType": "afterTimeInterval",
              "resumeAmount": 45,
              "resumeUnit": "minutes"
            }
          },
          "options": [
            {
              "displayName": "Values",
              "name": "values",
              "values": [
                {
                  "displayName": "Limit Type",
                  "name": "limitType",
                  "type": "options",
                  "default": "afterTimeInterval",
                  "description": "Sets the condition for the execution to resume. Can be a specified date or after some time.",
                  "options": [
                    {
                      "name": "After Time Interval",
                      "description": "Waits for a certain amount of time",
                      "value": "afterTimeInterval"
                    },
                    {
                      "name": "At Specified Time",
                      "description": "Waits until the set date and time to continue",
                      "value": "atSpecifiedTime"
                    }
                  ]
                },
                {
                  "displayName": "Amount",
                  "name": "resumeAmount",
                  "type": "number",
                  "displayOptions": {
                    "show": {
                      "limitType": [
                        "afterTimeInterval"
                      ]
                    }
                  },
                  "typeOptions": {
                    "minValue": 0,
                    "numberPrecision": 2
                  },
                  "default": 1,
                  "description": "The time to wait"
                },
                {
                  "displayName": "Unit",
                  "name": "resumeUnit",
                  "type": "options",
                  "displayOptions": {
                    "show": {
                      "limitType": [
                        "afterTimeInterval"
                      ]
                    }
                  },
                  "options": [
                    {
                      "name": "Minutes",
                      "value": "minutes"
                    },
                    {
                      "name": "Hours",
                      "value": "hours"
                    },
                    {
                      "name": "Days",
                      "value": "days"
                    }
                  ],
                  "default": "hours",
                  "description": "Unit of the interval value"
                },
                {
                  "displayName": "Max Date and Time",
                  "name": "maxDateAndTime",
                  "type": "dateTime",
                  "displayOptions": {
                    "show": {
                      "limitType": [
                        "atSpecifiedTime"
                      ]
                    }
                  },
                  "default": "",
                  "description": "Continue execution after the specified date and time"
                }
              ]
            }
          ]
        },
        {
          "displayName": "Append n8n Attribution",
          "name": "appendAttribution",
          "type": "boolean",
          "default": true,
          "description": "Whether to include the phrase \"This message was sent automatically with n8n\" to the end of the message"
        }
      ],
      "displayOptions": {
        "show": {
          "responseType": [
            "freeText",
            "customForm"
          ],
          "resource": [
            "message"
          ],
          "operation": [
            "sendAndWait"
          ]
        }
      }
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "getAll",
      "options": [
        {
          "name": "Add Label",
          "value": "addLabels",
          "action": "Add label to thread"
        },
        {
          "name": "Delete",
          "value": "delete",
          "action": "Delete a thread"
        },
        {
          "name": "Get",
          "value": "get",
          "action": "Get a thread"
        },
        {
          "name": "Get Many",
          "value": "getAll",
          "action": "Get many threads"
        },
        {
          "name": "Remove Label",
          "value": "removeLabels",
          "action": "Remove label from thread"
        },
        {
          "name": "Reply",
          "value": "reply",
          "action": "Reply to a message"
        },
        {
          "name": "Trash",
          "value": "trash",
          "action": "Trash a thread"
        },
        {
          "name": "Untrash",
          "value": "untrash",
          "action": "Untrash a thread"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "thread"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Thread ID",
      "name": "threadId",
      "type": "string",
      "default": "",
      "description": "The ID of the thread you are operating on",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "thread"
          ],
          "operation": [
            "get",
            "delete",
            "reply",
            "trash",
            "untrash"
          ]
        }
      }
    },
    {
      "displayName": "Message Snippet or ID",
      "name": "messageId",
      "type": "options",
      "default": "",
      "description": "Choose from the list, or specify an ID using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>",
      "displayOptions": {
        "show": {
          "resource": [
            "thread"
          ],
          "operation": [
            "reply"
          ]
        }
      },
      "typeOptions": {
        "loadOptionsMethod": "getThreadMessages",
        "loadOptionsDependsOn": [
          "threadId"
        ]
      }
    },
    {
      "displayName": "Email Type",
      "name": "emailType",
      "type": "options",
      "default": "text",
      "options": [
        {
          "name": "Text",
          "value": "text"
        },
        {
          "name": "HTML",
          "value": "html"
        }
      ],
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "thread"
          ],
          "operation": [
            "reply"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Message",
      "name": "message",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "thread"
          ],
          "operation": [
            "reply"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Attachments",
          "name": "attachmentsUi",
          "placeholder": "Add Attachment",
          "type": "fixedCollection",
          "typeOptions": {
            "multipleValues": true
          },
          "options": [
            {
              "name": "attachmentsBinary",
              "displayName": "Attachment Binary",
              "values": [
                {
                  "displayName": "Attachment Field Name",
                  "name": "property",
                  "type": "string",
                  "default": "",
                  "description": "Add the field name from the input node. Multiple properties can be set separated by comma."
                }
              ]
            }
          ],
          "default": {},
          "description": "Array of supported attachments to add to the message"
        },
        {
          "displayName": "BCC",
          "name": "bccList",
          "type": "string",
          "description": "The email addresses of the blind copy recipients. Multiple addresses can be separated by a comma. e.g. jay@getsby.com, jon@smith.com.",
          "placeholder": "info@example.com",
          "default": ""
        },
        {
          "displayName": "CC",
          "name": "ccList",
          "type": "string",
          "description": "The email addresses of the copy recipients. Multiple addresses can be separated by a comma. e.g. jay@getsby.com, jon@smith.com.",
          "placeholder": "info@example.com",
          "default": ""
        },
        {
          "displayName": "Sender Name",
          "name": "senderName",
          "type": "string",
          "placeholder": "e.g. Nathan",
          "default": "",
          "description": "The name displayed in your contacts inboxes"
        },
        {
          "displayName": "Reply to Sender Only",
          "name": "replyToSenderOnly",
          "type": "boolean",
          "default": false,
          "description": "Whether to reply to the sender only or to the entire list of recipients",
          "displayOptions": {
            "hide": {
              "replyToRecipientsOnly": [
                true
              ]
            }
          }
        },
        {
          "displayName": "Reply to Recipients Only",
          "name": "replyToRecipientsOnly",
          "type": "boolean",
          "default": false,
          "description": "Whether to exclude the sender from the reply",
          "displayOptions": {
            "hide": {
              "replyToSenderOnly": [
                true
              ]
            }
          }
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "thread"
          ],
          "operation": [
            "reply"
          ]
        }
      }
    },
    {
      "displayName": "Simplify",
      "name": "simple",
      "type": "boolean",
      "default": true,
      "description": "Whether to return a simplified version of the response instead of the raw data",
      "displayOptions": {
        "show": {
          "operation": [
            "get"
          ],
          "resource": [
            "thread"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Return Only Messages",
          "name": "returnOnlyMessages",
          "type": "boolean",
          "default": true,
          "description": "Whether to return only thread messages"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "thread"
          ],
          "operation": [
            "get"
          ]
        }
      }
    },
    {
      "displayName": "Return All",
      "name": "returnAll",
      "type": "boolean",
      "default": false,
      "description": "Whether to return all results or only up to a given limit",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "thread"
          ]
        }
      }
    },
    {
      "displayName": "Limit",
      "name": "limit",
      "type": "number",
      "default": 50,
      "description": "Max number of results to return",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "thread"
          ],
          "returnAll": [
            false
          ]
        }
      },
      "typeOptions": {
        "minValue": 1,
        "maxValue": 500
      }
    },
    {
      "displayName": "Fetching a lot of messages may take a long time. Consider using filters to speed things up",
      "name": "filtersNotice",
      "type": "notice",
      "default": "",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "thread"
          ],
          "returnAll": [
            true
          ]
        }
      }
    },
    {
      "displayName": "Filters",
      "name": "filters",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Include Spam and Trash",
          "name": "includeSpamTrash",
          "type": "boolean",
          "default": false,
          "description": "Whether to include threads from SPAM and TRASH in the results"
        },
        {
          "displayName": "Label ID Names or IDs",
          "name": "labelIds",
          "type": "multiOptions",
          "typeOptions": {
            "loadOptionsMethod": "getLabels"
          },
          "default": [],
          "description": "Only return threads with labels that match all of the specified label IDs. Choose from the list, or specify IDs using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>."
        },
        {
          "displayName": "Search",
          "name": "q",
          "type": "string",
          "default": "",
          "placeholder": "has:attachment",
          "hint": "Use the same format as in the Gmail search box. <a href=\"https://support.google.com/mail/answer/7190?hl=en\">More info</a>.",
          "description": "Only return messages matching the specified query"
        },
        {
          "displayName": "Read Status",
          "name": "readStatus",
          "type": "options",
          "default": "unread",
          "hint": "Filter emails by whether they have been read or not",
          "options": [
            {
              "name": "Unread and read emails",
              "value": "both"
            },
            {
              "name": "Unread emails only",
              "value": "unread"
            },
            {
              "name": "Read emails only",
              "value": "read"
            }
          ]
        },
        {
          "displayName": "Received After",
          "name": "receivedAfter",
          "type": "dateTime",
          "default": "",
          "description": "Get all emails received after the specified date. In an expression you can set date using string in ISO format or a timestamp in miliseconds."
        },
        {
          "displayName": "Received Before",
          "name": "receivedBefore",
          "type": "dateTime",
          "default": "",
          "description": "Get all emails received before the specified date. In an expression you can set date using string in ISO format or a timestamp in miliseconds."
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "thread"
          ]
        }
      }
    },
    {
      "displayName": "Thread ID",
      "name": "threadId",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "thread"
          ],
          "operation": [
            "addLabels",
            "removeLabels"
          ]
        }
      }
    },
    {
      "displayName": "Label Names or IDs",
      "name": "labelIds",
      "type": "multiOptions",
      "default": [],
      "description": "Choose from the list, or specify IDs using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "thread"
          ],
          "operation": [
            "addLabels",
            "removeLabels"
          ]
        }
      },
      "typeOptions": {
        "loadOptionsMethod": "getLabels"
      }
    }
  ]

operations:
  [
    {
      "operation": "create",
      "name": "Create",
      "resource": "draft"
    },
    {
      "operation": "delete",
      "name": "Delete",
      "resource": "draft"
    },
    {
      "operation": "get",
      "name": "Get",
      "resource": "draft"
    },
    {
      "operation": "getAll",
      "name": "Get Many",
      "resource": "draft"
    },
    {
      "operation": "create",
      "name": "Create",
      "resource": "label"
    },
    {
      "operation": "delete",
      "name": "Delete",
      "resource": "label"
    },
    {
      "operation": "get",
      "name": "Get",
      "resource": "label"
    },
    {
      "operation": "getAll",
      "name": "Get Many",
      "resource": "label"
    },
    {
      "operation": "addLabels",
      "name": "Add Label",
      "resource": "message"
    },
    {
      "operation": "delete",
      "name": "Delete",
      "resource": "message"
    },
    {
      "operation": "get",
      "name": "Get",
      "resource": "message"
    },
    {
      "operation": "getAll",
      "name": "Get Many",
      "resource": "message"
    },
    {
      "operation": "markAsRead",
      "name": "Mark as Read",
      "resource": "message"
    },
    {
      "operation": "markAsUnread",
      "name": "Mark as Unread",
      "resource": "message"
    },
    {
      "operation": "removeLabels",
      "name": "Remove Label",
      "resource": "message"
    },
    {
      "operation": "reply",
      "name": "Reply",
      "resource": "message"
    },
    {
      "operation": "send",
      "name": "Send",
      "resource": "message"
    },
    {
      "operation": "sendAndWait",
      "name": "Send and Wait for Response",
      "resource": "message"
    },
    {
      "operation": "addLabels",
      "name": "Add Label",
      "resource": "thread"
    },
    {
      "operation": "delete",
      "name": "Delete",
      "resource": "thread"
    },
    {
      "operation": "get",
      "name": "Get",
      "resource": "thread"
    },
    {
      "operation": "getAll",
      "name": "Get Many",
      "resource": "thread"
    },
    {
      "operation": "removeLabels",
      "name": "Remove Label",
      "resource": "thread"
    },
    {
      "operation": "reply",
      "name": "Reply",
      "resource": "thread"
    },
    {
      "operation": "trash",
      "name": "Trash",
      "resource": "thread"
    },
    {
      "operation": "untrash",
      "name": "Untrash",
      "resource": "thread"
    }
  ]

credentials_required:
  [
    {
      "name": "googleApi",
      "required": true,
      "displayOptions": {
        "show": {
          "authentication": [
            "serviceAccount"
          ]
        }
      }
    },
    {
      "name": "gmailOAuth2",
      "required": true,
      "displayOptions": {
        "show": {
          "authentication": [
            "oAuth2"
          ]
        }
      }
    }
  ]


node_type: nodes-base.gmailTrigger
package_name: n8n-nodes-base
display_name: Gmail Trigger
description: Fetches emails from Gmail and starts the workflow on specified polling intervals.
category: trigger
development_style: programmatic
version: 1.3
operations: []
outputs:
  [
  "main"
  ]

updated_at: 2026-03-30 13:12:49
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Gmail Trigger node documentation
  description: Learn how to use the Gmail Trigger node in n8n. Follow technical documentation to integrate Gmail Trigger node into your workflows.
  contentType: [integration, reference]
  priority: high
  ---

  # Gmail Trigger node

  [Gmail](https://www.gmail.com){:target=_blank .external-link} is an email service developed by Google. The Gmail Trigger node can start a workflow based on events in Gmail.

  /// note | Credentials
  You can find authentication information for this node [here](/integrations/builtin/credentials/google/index.md).
  ///

  ///  note  | Examples and templates
  For usage examples and templates to help you get started, refer to n8n's [Gmail Trigger integrations](https://n8n.io/integrations/gmail-trigger/){:target=_blank .external-link} page.
  ///

  ## Events

  * **Message Received**: The node triggers for new messages at the selected **Poll Time**.

  ## Node parameters

  Configure the node with these parameters:

  * **Credential to connect with**: Select or create a new Google credential to use for the trigger. Refer to [Google credentials](/integrations/builtin/credentials/google/index.md) for more information on setting up a new credential.
  * **Poll Times**: Select a poll **Mode** to set how often to trigger the poll. Your **Mode** selection will add or remove relevant fields. Refer to [Poll Mode options](/integrations/builtin/trigger-nodes/n8n-nodes-base.gmailtrigger/poll-mode-options.md) to configure the parameters for each mode type.
  * **Simplify**: Choose whether to return a simplified version of the response (turned on, default) or the raw data (turned off).
      * The simplified version returns email message IDs, labels, and email headers, including: From, To, CC, BCC, and Subject.

  ## Node filters

  Use these filters to further refine the node's behavior:

  * **Include Spam and Trash**: Select whether the node should trigger on new messages in the Spam and Trash folders (turned on) or not (turned off).
  * **Label Names or IDs**: Only trigger on messages with the selected labels added to them. Select the Label names you want to apply or enter an expression to specify IDs. The dropdown populates based on the **Credential** you selected.
  * **Search**: Enter Gmail search refine filters, like `from:`, to trigger the node on the filtered conditions only. Refer to [Refine searches in Gmail](https://support.google.com/mail/answer/7190?hl=en){:target=_blank .external-link} for more information.
  * **Read Status**: Choose whether to receive **Unread and read emails**, **Unread emails only** (default), or **Read emails only**.
  * **Sender**: Enter an email or a part of a sender name to trigger only on messages from that sender.

  ## Related resources

  n8n provides an app node for Gmail. You can find the node docs [here](/integrations/builtin/app-nodes/n8n-nodes-base.gmail/index.md).

  View [example workflows and related content](https://n8n.io/integrations/gmail-trigger/){:target=_blank .external-link} on n8n's website.

  Refer to [Google's Gmail API documentation](https://developers.google.com/gmail/api/guides){:target=_blank .external-link} for details about their API.

  ## Common issues

  For common questions or issues and suggested solutions, refer to [Common issues](/integrations/builtin/trigger-nodes/n8n-nodes-base.gmailtrigger/common-issues.md).

properties_schema:
  [
    {
      "displayName": "Authentication",
      "name": "authentication",
      "type": "options",
      "default": "oAuth2",
      "options": [
        {
          "name": "OAuth2 (recommended)",
          "value": "oAuth2"
        },
        {
          "name": "Service Account",
          "value": "serviceAccount"
        }
      ]
    },
    {
      "displayName": "Event",
      "name": "event",
      "type": "options",
      "default": "messageReceived",
      "options": [
        {
          "name": "Message Received",
          "value": "messageReceived"
        }
      ]
    },
    {
      "displayName": "Simplify",
      "name": "simple",
      "type": "boolean",
      "default": true,
      "description": "Whether to return a simplified version of the response instead of the raw data"
    },
    {
      "displayName": "Filters",
      "name": "filters",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Include Spam and Trash",
          "name": "includeSpamTrash",
          "type": "boolean",
          "default": false,
          "description": "Whether to include messages from SPAM and TRASH in the results"
        },
        {
          "displayName": "Include Drafts",
          "name": "includeDrafts",
          "type": "boolean",
          "default": false,
          "description": "Whether to include email drafts in the results"
        },
        {
          "displayName": "Label Names or IDs",
          "name": "labelIds",
          "type": "multiOptions",
          "typeOptions": {
            "loadOptionsMethod": "getLabels"
          },
          "default": [],
          "description": "Only return messages with labels that match all of the specified label IDs. Choose from the list, or specify IDs using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>."
        },
        {
          "displayName": "Search",
          "name": "q",
          "type": "string",
          "default": "",
          "placeholder": "has:attachment",
          "builderHint": {
            "message": "Always set a search query to filter emails. Uses Gmail search syntax, e.g. \"from:example@gmail.com\", \"subject:invoice\", \"has:attachment\", \"label:important\", \"newer_than:1d\". Combine with spaces for AND: \"from:shop@example.com subject:delivery\". Without this filter, ALL incoming emails will trigger the workflow."
          },
          "hint": "Use the same format as in the Gmail search box. <a href=\"https://support.google.com/mail/answer/7190?hl=en\">More info</a>.",
          "description": "Only return messages matching the specified query"
        },
        {
          "displayName": "Read Status",
          "name": "readStatus",
          "type": "options",
          "default": "unread",
          "hint": "Filter emails by whether they have been read or not",
          "options": [
            {
              "name": "Unread and read emails",
              "value": "both"
            },
            {
              "name": "Unread emails only",
              "value": "unread"
            },
            {
              "name": "Read emails only",
              "value": "read"
            }
          ]
        },
        {
          "displayName": "Sender",
          "name": "sender",
          "type": "string",
          "default": "",
          "description": "Sender name or email to filter by",
          "hint": "Enter an email or part of a sender name"
        }
      ]
    },
    {
      "displayName": "Options",
      "name": "options",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Attachment Prefix",
          "name": "dataPropertyAttachmentsPrefixName",
          "type": "string",
          "default": "attachment_",
          "description": "Prefix for name of the binary property to which to write the attachment. An index starting with 0 will be added. So if name is 'attachment_' the first attachment is saved to 'attachment_0'."
        },
        {
          "displayName": "Download Attachments",
          "name": "downloadAttachments",
          "type": "boolean",
          "default": false,
          "description": "Whether the email's attachments will be downloaded"
        }
      ],
      "displayOptions": {
        "hide": {
          "simple": [
            true
          ]
        }
      }
    }
  ]

credentials_required:
  [
    {
      "name": "googleApi",
      "required": true,
      "displayOptions": {
        "show": {
          "authentication": [
            "serviceAccount"
          ]
        }
      }
    },
    {
      "name": "gmailOAuth2",
      "required": true,
      "displayOptions": {
        "show": {
          "authentication": [
            "oAuth2"
          ]
        }
      }
    }
  ]


node_type: nodes-base.gSuiteAdminTool
package_name: n8n-nodes-base
display_name: Google Workspace Admin Tool
description: Consume Google Workspace Admin API (AI Tool variant for use with AI Agents)
category: input
development_style: programmatic
version: 1
credentials_required:
  [
  {
  "name": "gSuiteAdminOAuth2Api",
  "required": true
  }
  ]

outputs:
  [
  {
  "type": "ai_tool",
  "displayName": "Tool"
  }
  ]

output_names:
  [
  "Tool"
  ]

updated_at: 2026-03-30 13:12:49
tool_variant_of: nodes-base.gSuiteAdmin
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Google Workspace Admin node documentation
  description: Learn how to use the Google Workspace Admin node in n8n. Follow technical documentation to integrate Google Workspace Admin node into your workflows.
  contentType: [integration, reference]
  ---

  # Google Workspace Admin node

  Use the Google Workspace Admin node to automate work in Google Workspace Admin, and integrate Google Workspace Admin with other applications. n8n has built-in support for a wide range of Google Workspace Admin features, including creating, updating, deleting, and getting users, and groups. 

  On this page, you'll find a list of operations the Google Workspace Admin node supports and links to more resources.

  /// note | Credentials
  Refer to [Google credentials](/integrations/builtin/credentials/google/index.md) for guidance on setting up authentication. 
  ///

  --8<-- "_snippets/integrations/builtin/app-nodes/ai-tools.md"

  ## Operations

  * Group
      * Create a group
      * Delete a group
      * Get a group
      * Get all groups
      * Update a group
  * User
      * Create a user
      * Delete a user
      * Get a user
      * Get all users
      * Update a user

  ## Templates and examples

  <!-- see https://www.notion.so/n8n/Pull-in-templates-for-the-integrations-pages-37c716837b804d30a33b47475f6e3780 -->
  [[ templatesWidget(page.title, 'google-workspace-admin') ]]

  ## How to project a user's information

  There are three different ways to project a user's information:

  - **Basic**: Doesn't include any custom fields.
  - **Custom**: Includes the custom fields from schemas in `customField`.
  - **Full**: Include all the fields associated with the user.

  To include custom fields, follow these steps:

  1. Select **Custom** from the **Projection** dropdown list.
  2. Select the **Add Options** button and select **Custom Schemas** from the dropdown list.
  3. Select the schema names you want to include from the **Custom Schemas** dropdown list.

properties_schema:
  [
    {
      "displayName": "Tool Description",
      "name": "toolDescription",
      "type": "string",
      "default": "",
      "required": false,
      "description": "Description for the AI to understand what this tool does and when to use it",
      "typeOptions": {
        "rows": 3
      },
      "placeholder": "e.g., Use this tool to interact with Google Workspace Admin"
    },
    {
      "displayName": "Resource",
      "name": "resource",
      "type": "options",
      "default": "user",
      "options": [
        {
          "name": "ChromeOS Device",
          "value": "device"
        },
        {
          "name": "Group",
          "value": "group"
        },
        {
          "name": "User",
          "value": "user"
        }
      ],
      "noDataExpression": true
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "get",
      "options": [
        {
          "name": "Get",
          "value": "get",
          "description": "Get a ChromeOS device",
          "action": "Get ChromeOS device"
        },
        {
          "name": "Get Many",
          "value": "getAll",
          "description": "Get many ChromeOS devices",
          "action": "Get many ChromeOS devices"
        },
        {
          "name": "Update",
          "value": "update",
          "description": "Update a ChromeOS device",
          "action": "Update ChromeOS device"
        },
        {
          "name": "Change Status",
          "value": "changeStatus",
          "description": "Change the status of a ChromeOS device",
          "action": "Change status of ChromeOS device"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "device"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Device",
      "name": "deviceId",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "description": "Select the device you want to retrieve",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "get",
            "update",
            "changeStatus"
          ],
          "resource": [
            "device"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From List",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "searchDevices"
          }
        },
        {
          "displayName": "By ID",
          "name": "deviceId",
          "type": "string",
          "hint": "Enter the device id",
          "placeholder": "e.g. 123e4567-e89b-12d3-a456-426614174000"
        }
      ]
    },
    {
      "displayName": "Return All",
      "name": "returnAll",
      "type": "boolean",
      "default": false,
      "description": "Whether to return all results or only up to a given limit",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "device"
          ]
        }
      }
    },
    {
      "displayName": "Limit",
      "name": "limit",
      "type": "number",
      "default": 100,
      "description": "Max number of results to return",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "device"
          ],
          "returnAll": [
            false
          ]
        }
      },
      "typeOptions": {
        "minValue": 1,
        "maxValue": 500
      }
    },
    {
      "displayName": "Output",
      "name": "projection",
      "type": "options",
      "default": "basic",
      "description": "What subset of fields to fetch for this device",
      "options": [
        {
          "name": "Basic",
          "value": "basic",
          "description": "Do not include any custom fields for the user"
        },
        {
          "name": "Full",
          "value": "full",
          "description": "Include all fields associated with this user"
        }
      ],
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "get",
            "getAll"
          ],
          "resource": [
            "device"
          ]
        }
      }
    },
    {
      "displayName": "Include Children",
      "name": "includeChildOrgunits",
      "type": "boolean",
      "default": false,
      "description": "Whether to include devices from organizational units below your specified organizational unit",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "device"
          ]
        }
      }
    },
    {
      "displayName": "Filter",
      "name": "filter",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Organizational Unit Name or ID",
          "name": "orgUnitPath",
          "type": "options",
          "typeOptions": {
            "loadOptionsMethod": "getOrgUnits"
          },
          "default": [],
          "description": "Specify the organizational unit name or ID. Choose from the list or use an expression. Choose from the list, or specify an ID using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>."
        },
        {
          "displayName": "Query",
          "name": "query",
          "type": "string",
          "placeholder": "e.g. name:contact* email:contact*",
          "default": "",
          "description": "Use Google's querying syntax to filter results"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "device"
          ]
        }
      }
    },
    {
      "displayName": "Sort",
      "name": "sort",
      "type": "fixedCollection",
      "default": {},
      "description": "Define sorting rules for the results",
      "options": [
        {
          "name": "sortRules",
          "displayName": "Sort Rules",
          "values": [
            {
              "displayName": "Order By",
              "name": "orderBy",
              "type": "options",
              "options": [
                {
                  "name": "Annotated Location",
                  "value": "annotatedLocation"
                },
                {
                  "name": "Annotated User",
                  "value": "annotatedUser"
                },
                {
                  "name": "Last Sync",
                  "value": "lastSync"
                },
                {
                  "name": "Notes",
                  "value": "notes"
                },
                {
                  "name": "Serial Number",
                  "value": "serialNumber"
                },
                {
                  "name": "Status",
                  "value": "status"
                }
              ],
              "default": "",
              "description": "Field to sort the results by"
            },
            {
              "displayName": "Sort Order",
              "name": "sortBy",
              "type": "options",
              "options": [
                {
                  "name": "Ascending",
                  "value": "ascending"
                },
                {
                  "name": "Descending",
                  "value": "descending"
                }
              ],
              "default": "",
              "description": "Sort order direction"
            }
          ]
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "device"
          ]
        }
      }
    },
    {
      "displayName": "Update Fields",
      "name": "updateOptions",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Move to Organizational Unit Name or ID",
          "name": "orgUnitPath",
          "type": "options",
          "typeOptions": {
            "loadOptionsMethod": "getOrgUnits"
          },
          "default": [],
          "description": "The full path to the organizational unit. Choose from the list, or specify an ID using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>."
        },
        {
          "displayName": "Annotated User",
          "name": "annotatedUser",
          "type": "string",
          "default": "",
          "description": "The annotated user of the device",
          "placeholder": "e.g. help desk"
        },
        {
          "displayName": "Annotated Location",
          "name": "annotatedLocation",
          "type": "string",
          "default": "",
          "description": "The annotated location of the device",
          "placeholder": "e.g. Mountain View help desk Chromebook"
        },
        {
          "displayName": "Annotated Asset ID",
          "name": "annotatedAssetId",
          "type": "string",
          "default": "",
          "description": "The annotated asset ID of a device",
          "placeholder": "e.g. 1234567890"
        },
        {
          "displayName": "Notes",
          "name": "notes",
          "type": "string",
          "default": "",
          "description": "Add notes to a device",
          "placeholder": "e.g. Loaned from support"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "update"
          ],
          "resource": [
            "device"
          ]
        }
      }
    },
    {
      "displayName": "Status",
      "name": "action",
      "type": "options",
      "default": "reenable",
      "description": "Set the status of a device",
      "options": [
        {
          "name": "Enabled",
          "value": "reenable",
          "description": "Re-enable a disabled chromebook",
          "action": "Enable a device"
        },
        {
          "name": "Disabled",
          "value": "disable",
          "description": "Disable a chromebook",
          "action": "Disable a device"
        }
      ],
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "changeStatus"
          ],
          "resource": [
            "device"
          ]
        }
      }
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "create",
      "options": [
        {
          "name": "Create",
          "value": "create",
          "description": "Create a group",
          "action": "Create a group"
        },
        {
          "name": "Delete",
          "value": "delete",
          "description": "Delete a group",
          "action": "Delete a group"
        },
        {
          "name": "Get",
          "value": "get",
          "description": "Get a group",
          "action": "Get a group"
        },
        {
          "name": "Get Many",
          "value": "getAll",
          "description": "Get many groups",
          "action": "Get many groups"
        },
        {
          "name": "Update",
          "value": "update",
          "description": "Update a group",
          "action": "Update a group"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "group"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Group",
      "name": "groupId",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "description": "Select the group to perform the operation on",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "delete",
            "get",
            "update"
          ],
          "resource": [
            "group"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From list",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "searchGroups"
          }
        },
        {
          "displayName": "By ID",
          "name": "GroupId",
          "type": "string",
          "placeholder": "e.g. 0123kx3o1habcdf"
        }
      ]
    },
    {
      "displayName": "Group Name",
      "name": "name",
      "type": "string",
      "default": "",
      "description": "The group's display name",
      "displayOptions": {
        "show": {
          "operation": [
            "create"
          ],
          "resource": [
            "group"
          ]
        }
      }
    },
    {
      "displayName": "Group Email",
      "name": "email",
      "type": "string",
      "default": "",
      "description": "The group's email address. If your account has multiple domains, select the appropriate domain for the email address. The email must be unique",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "create"
          ],
          "resource": [
            "group"
          ]
        }
      }
    },
    {
      "displayName": "Additional Fields",
      "name": "additionalFields",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Description",
          "name": "description",
          "type": "string",
          "default": "",
          "description": "An extended description to help users determine the purpose of a group. For example, you can include information about who should join the group, the types of messages to send to the group, links to FAQs about the group, or related groups."
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "create"
          ],
          "resource": [
            "group"
          ]
        }
      }
    },
    {
      "displayName": "Return All",
      "name": "returnAll",
      "type": "boolean",
      "default": false,
      "description": "Whether to return all results or only up to a given limit",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "group"
          ]
        }
      }
    },
    {
      "displayName": "Limit",
      "name": "limit",
      "type": "number",
      "default": 100,
      "description": "Max number of results to return",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "group"
          ],
          "returnAll": [
            false
          ]
        }
      },
      "typeOptions": {
        "minValue": 1,
        "maxValue": 500
      }
    },
    {
      "displayName": "Filter",
      "name": "filter",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Customer",
          "name": "customer",
          "type": "string",
          "default": "",
          "description": "The unique ID for the customer's Google Workspace account"
        },
        {
          "displayName": "Domain",
          "name": "domain",
          "type": "string",
          "default": "",
          "description": "The domain name. Use this field to get groups from a specific domain."
        },
        {
          "displayName": "Query",
          "name": "query",
          "type": "string",
          "placeholder": "e.g. name:contact* email:contact*",
          "default": "",
          "description": "Query string to filter the results. Follow Google Admin SDK documentation. <a href=\"https://developers.google.com/admin-sdk/directory/v1/guides/search-groups#examples\" target=\"_blank\">More info</a>."
        },
        {
          "displayName": "User ID",
          "name": "userId",
          "type": "string",
          "default": "",
          "description": "Email or immutable ID of a user to list groups they are a member of"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "group"
          ]
        }
      }
    },
    {
      "displayName": "Sort",
      "name": "sort",
      "type": "fixedCollection",
      "default": {},
      "options": [
        {
          "name": "sortRules",
          "displayName": "Sort Rules",
          "values": [
            {
              "displayName": "Order By",
              "name": "orderBy",
              "type": "options",
              "options": [
                {
                  "name": "Email",
                  "value": "email"
                }
              ],
              "default": "email",
              "description": "Field to sort the results by"
            },
            {
              "displayName": "Sort Order",
              "name": "sortOrder",
              "type": "options",
              "options": [
                {
                  "name": "Ascending",
                  "value": "ASCENDING"
                },
                {
                  "name": "Descending",
                  "value": "DESCENDING"
                }
              ],
              "default": "ASCENDING",
              "description": "Sort order direction"
            }
          ]
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "group"
          ]
        }
      }
    },
    {
      "displayName": "Update Fields",
      "name": "updateFields",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Description",
          "name": "description",
          "type": "string",
          "default": "",
          "typeOptions": {
            "rows": 2
          },
          "description": "An extended description to help users determine the purpose of a group. For example, you can include information about who should join the group, the types of messages to send to the group, links to FAQs about the group, or related groups."
        },
        {
          "displayName": "Email",
          "name": "email",
          "type": "string",
          "placeholder": "e.g. sales@example.com",
          "default": "",
          "description": "The group's email address. If your account has multiple domains, select the appropriate domain for the email address. The email must be unique."
        },
        {
          "displayName": "Name",
          "name": "name",
          "type": "string",
          "placeholder": "e.g. Sales",
          "default": "",
          "description": "The group's display name"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "update"
          ],
          "resource": [
            "group"
          ]
        }
      }
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "create",
      "options": [
        {
          "name": "Add to Group",
          "value": "addToGroup",
          "description": "Add an existing user to a group",
          "action": "Add user to group"
        },
        {
          "name": "Create",
          "value": "create",
          "description": "Create a user",
          "action": "Create a user"
        },
        {
          "name": "Delete",
          "value": "delete",
          "description": "Delete a user",
          "action": "Delete a user"
        },
        {
          "name": "Get",
          "value": "get",
          "description": "Get a user",
          "action": "Get a user"
        },
        {
          "name": "Get Many",
          "value": "getAll",
          "description": "Get many users",
          "action": "Get many users"
        },
        {
          "name": "Remove From Group",
          "value": "removeFromGroup",
          "description": "Remove a user from a group",
          "action": "Remove user from group"
        },
        {
          "name": "Update",
          "value": "update",
          "description": "Update a user",
          "action": "Update a user"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "user"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "User",
      "name": "userId",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "description": "Select the user to perform the operation on",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "user"
          ],
          "operation": [
            "addToGroup",
            "delete",
            "get",
            "removeFromGroup",
            "update"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From list",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "searchUsers"
          }
        },
        {
          "displayName": "By Email",
          "name": "userEmail",
          "type": "string",
          "hint": "Enter the user email",
          "placeholder": "e.g. sales@example.com",
          "validation": [
            {
              "type": "regex",
              "properties": {
                "regex": "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",
                "errorMessage": "Please enter a valid email address."
              }
            }
          ]
        },
        {
          "displayName": "By ID",
          "name": "userId",
          "type": "string",
          "hint": "Enter the user id",
          "placeholder": "e.g. 123456789879230471055"
        }
      ]
    },
    {
      "displayName": "Group",
      "name": "groupId",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "description": "Select the group to perform the operation on",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "user"
          ],
          "operation": [
            "addToGroup",
            "removeFromGroup"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From list",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "searchGroups"
          }
        },
        {
          "displayName": "By ID",
          "name": "groupId",
          "type": "string",
          "placeholder": "e.g. 0123kx3o1habcdf"
        }
      ]
    },
    {
      "displayName": "First Name",
      "name": "firstName",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "create"
          ],
          "resource": [
            "user"
          ]
        }
      }
    },
    {
      "displayName": "Last Name",
      "name": "lastName",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "create"
          ],
          "resource": [
            "user"
          ]
        }
      }
    },
    {
      "displayName": "Password",
      "name": "password",
      "type": "string",
      "default": "",
      "description": "Stores the password for the user account. A minimum of 8 characters is required. The maximum length is 100 characters.",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "create"
          ],
          "resource": [
            "user"
          ]
        }
      },
      "typeOptions": {
        "password": true
      }
    },
    {
      "displayName": "Username",
      "name": "username",
      "type": "string",
      "default": "",
      "description": "The username that will be set to the user. Example: If you domain is example.com and you set the username to n.smith then the user's final email address will be n.smith@example.com.",
      "displayOptions": {
        "show": {
          "operation": [
            "create"
          ],
          "resource": [
            "user"
          ]
        }
      }
    },
    {
      "displayName": "Domain Name or ID",
      "name": "domain",
      "type": "options",
      "default": "",
      "description": "Choose from the list, or specify an ID using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "create"
          ],
          "resource": [
            "user"
          ]
        }
      },
      "typeOptions": {
        "loadOptionsMethod": "getDomains"
      }
    },
    {
      "displayName": "Additional Fields",
      "name": "additionalFields",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Change Password at Next Login",
          "name": "changePasswordAtNextLogin",
          "type": "boolean",
          "default": false,
          "description": "Whether the user is forced to change their password at next login"
        },
        {
          "displayName": "Phones",
          "name": "phoneUi",
          "placeholder": "Add Phone",
          "type": "fixedCollection",
          "typeOptions": {
            "multipleValues": true
          },
          "default": {},
          "options": [
            {
              "name": "phoneValues",
              "displayName": "Phone",
              "values": [
                {
                  "displayName": "Type",
                  "name": "type",
                  "type": "options",
                  "options": [
                    {
                      "name": "Assistant",
                      "value": "assistant"
                    },
                    {
                      "name": "Callback",
                      "value": "callback"
                    },
                    {
                      "name": "Car",
                      "value": "car"
                    },
                    {
                      "name": "Company Main",
                      "value": "company_main"
                    },
                    {
                      "name": "Custom",
                      "value": "custom"
                    },
                    {
                      "name": "Grand Central",
                      "value": "grand_central"
                    },
                    {
                      "name": "Home",
                      "value": "home"
                    },
                    {
                      "name": "Home Fax",
                      "value": "home_fax"
                    },
                    {
                      "name": "ISDN",
                      "value": "isdn"
                    },
                    {
                      "name": "Main",
                      "value": "main"
                    },
                    {
                      "name": "Mobile",
                      "value": "mobile"
                    },
                    {
                      "name": "Other",
                      "value": "other"
                    },
                    {
                      "name": "Other Fax",
                      "value": "other_fax"
                    },
                    {
                      "name": "Pager",
                      "value": "pager"
                    },
                    {
                      "name": "Radio",
                      "value": "radio"
                    },
                    {
                      "name": "Telex",
                      "value": "telex"
                    },
                    {
                      "name": "TTY TDD",
                      "value": "tty_tdd"
                    },
                    {
                      "name": "Work",
                      "value": "work"
                    },
                    {
                      "name": "Work Fax",
                      "value": "work_fax"
                    },
                    {
                      "name": "Work Mobile",
                      "value": "work_mobile"
                    },
                    {
                      "name": "Work Pager",
                      "value": "work_pager"
                    }
                  ],
                  "default": "work",
                  "description": "The type of phone number"
                },
                {
                  "displayName": "Phone Number",
                  "name": "value",
                  "type": "string",
                  "default": ""
                },
                {
                  "displayName": "Primary",
                  "name": "primary",
                  "type": "boolean",
                  "default": false,
                  "description": "Whether this is the user's primary phone number"
                }
              ]
            }
          ]
        },
        {
          "displayName": "Secondary Emails",
          "name": "emailUi",
          "placeholder": "Add Email",
          "type": "fixedCollection",
          "typeOptions": {
            "multipleValues": true
          },
          "default": {},
          "options": [
            {
              "name": "emailValues",
              "displayName": "Email",
              "values": [
                {
                  "displayName": "Type",
                  "name": "type",
                  "type": "options",
                  "options": [
                    {
                      "name": "Home",
                      "value": "home"
                    },
                    {
                      "name": "Work",
                      "value": "work"
                    },
                    {
                      "name": "Other",
                      "value": "other"
                    }
                  ],
                  "default": "work",
                  "description": "The type of the email account"
                },
                {
                  "displayName": "Email",
                  "name": "address",
                  "type": "string",
                  "default": ""
                }
              ]
            }
          ]
        },
        {
          "displayName": "Roles",
          "name": "roles",
          "type": "multiOptions",
          "default": [],
          "description": "Select the roles you want to assign to the user",
          "options": [
            {
              "name": "Directory Sync Admin",
              "value": "directorySyncAdmin",
              "description": "Whether to assign the Directory Sync Admin role"
            },
            {
              "name": "Groups Admin",
              "value": "groupsAdmin",
              "description": "Whether to assign the Groups Admin role"
            },
            {
              "name": "Groups Editor",
              "value": "groupsEditor",
              "description": "Whether to assign the Groups Editor role"
            },
            {
              "name": "Groups Reader",
              "value": "groupsReader",
              "description": "Whether to assign the Groups Reader role"
            },
            {
              "name": "Help Desk Admin",
              "value": "helpDeskAdmin",
              "description": "Whether to assign the Help Desk Admin role"
            },
            {
              "name": "Inventory Reporting Admin",
              "value": "inventoryReportingAdmin",
              "description": "Whether to assign the Inventory Reporting Admin role"
            },
            {
              "name": "Mobile Admin",
              "value": "mobileAdmin",
              "description": "Whether to assign the Mobile Admin role"
            },
            {
              "name": "Services Admin",
              "value": "servicesAdmin",
              "description": "Whether to assign the Services Admin role"
            },
            {
              "name": "Storage Admin",
              "value": "storageAdmin",
              "description": "Whether to assign the Storage Admin role"
            },
            {
              "name": "Super Admin",
              "value": "superAdmin",
              "description": "Whether to assign the Super Admin role"
            },
            {
              "name": "User Management",
              "value": "userManagement",
              "description": "Whether to assign the User Management role"
            }
          ]
        },
        {
          "displayName": "Custom Fields",
          "name": "customFields",
          "placeholder": "Add or Edit Custom Fields",
          "type": "fixedCollection",
          "typeOptions": {
            "multipleValues": true
          },
          "default": {},
          "description": "Allows editing and adding of custom fields",
          "options": [
            {
              "name": "fieldValues",
              "displayName": "Field",
              "values": [
                {
                  "displayName": "Schema Name or ID",
                  "name": "schemaName",
                  "type": "options",
                  "typeOptions": {
                    "loadOptionsMethod": "getSchemas"
                  },
                  "default": "",
                  "description": "Select the schema to use for custom fields. Choose from the list, or specify an ID using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>."
                },
                {
                  "displayName": "Field Name or ID",
                  "name": "fieldName",
                  "type": "string",
                  "default": "",
                  "required": true,
                  "description": "Enter a field name from the selected schema"
                },
                {
                  "displayName": "Value",
                  "name": "value",
                  "type": "string",
                  "default": "",
                  "required": true,
                  "description": "Provide a value for the selected field"
                }
              ]
            }
          ]
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "create"
          ],
          "resource": [
            "user"
          ]
        }
      }
    },
    {
      "displayName": "Output",
      "name": "output",
      "type": "options",
      "default": "simplified",
      "options": [
        {
          "name": "Simplified",
          "value": "simplified",
          "description": "Only return specific fields: kind, ID, primaryEmail, name (with subfields), isAdmin, lastLoginTime, creationTime, and suspended"
        },
        {
          "name": "Raw",
          "value": "raw",
          "description": "Return all fields from the API response"
        },
        {
          "name": "Select Included Fields",
          "value": "select",
          "description": "Choose specific fields to include"
        }
      ],
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "get"
          ],
          "resource": [
            "user"
          ]
        }
      }
    },
    {
      "displayName": "Fields",
      "name": "fields",
      "type": "multiOptions",
      "default": [],
      "description": "Fields to include in the response when \"Select Included Fields\" is chosen",
      "options": [
        {
          "name": "Creation Time",
          "value": "creationTime"
        },
        {
          "name": "Is Admin",
          "value": "isAdmin"
        },
        {
          "name": "Kind",
          "value": "kind"
        },
        {
          "name": "Last Login Time",
          "value": "lastLoginTime"
        },
        {
          "name": "Name",
          "value": "name"
        },
        {
          "name": "Primary Email",
          "value": "primaryEmail"
        },
        {
          "name": "Suspended",
          "value": "suspended"
        }
      ],
      "displayOptions": {
        "show": {
          "output": [
            "select"
          ],
          "operation": [
            "get"
          ],
          "resource": [
            "user"
          ]
        }
      }
    },
    {
      "displayName": "Custom Fields",
      "name": "projection",
      "type": "options",
      "default": "basic",
      "description": "What subset of fields to fetch for this user",
      "options": [
        {
          "name": "Don't Include",
          "value": "basic",
          "description": "Do not include any custom fields for the user"
        },
        {
          "name": "Custom",
          "value": "custom",
          "description": "Include custom fields from schemas requested in Custom Schema Names or IDs"
        },
        {
          "name": "Include All",
          "value": "full",
          "description": "Include all fields associated with this user"
        }
      ],
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "get"
          ],
          "resource": [
            "user"
          ]
        }
      }
    },
    {
      "displayName": "Custom Schema Names or IDs",
      "name": "customFieldMask",
      "type": "multiOptions",
      "default": [],
      "description": "A comma-separated list of schema names. All fields from these schemas are fetched. Choose from the list, or specify IDs using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>.",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "get"
          ],
          "resource": [
            "user"
          ],
          "/projection": [
            "custom"
          ]
        }
      },
      "typeOptions": {
        "loadOptionsMethod": "getSchemas"
      }
    },
    {
      "displayName": "Return All",
      "name": "returnAll",
      "type": "boolean",
      "default": false,
      "description": "Whether to return all results or only up to a given limit",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "user"
          ]
        }
      }
    },
    {
      "displayName": "Limit",
      "name": "limit",
      "type": "number",
      "default": 100,
      "description": "Max number of results to return",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "user"
          ],
          "returnAll": [
            false
          ]
        }
      },
      "typeOptions": {
        "minValue": 1,
        "maxValue": 500
      }
    },
    {
      "displayName": "Output",
      "name": "output",
      "type": "options",
      "default": "simplified",
      "options": [
        {
          "name": "Simplified",
          "value": "simplified",
          "description": "Only return specific fields: kind, ID, primaryEmail, name (with subfields), isAdmin, lastLoginTime, creationTime, and suspended"
        },
        {
          "name": "Raw",
          "value": "raw",
          "description": "Return all fields from the API response"
        },
        {
          "name": "Select Included Fields",
          "value": "select",
          "description": "Choose specific fields to include"
        }
      ],
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "user"
          ]
        }
      }
    },
    {
      "displayName": "Fields",
      "name": "fields",
      "type": "multiOptions",
      "default": [],
      "description": "Fields to include in the response when \"Select Included Fields\" is chosen",
      "options": [
        {
          "name": "Creation Time",
          "value": "creationTime"
        },
        {
          "name": "Is Admin",
          "value": "isAdmin"
        },
        {
          "name": "Kind",
          "value": "kind"
        },
        {
          "name": "Last Login Time",
          "value": "lastLoginTime"
        },
        {
          "name": "Name",
          "value": "name"
        },
        {
          "name": "Primary Email",
          "value": "primaryEmail"
        },
        {
          "name": "Suspended",
          "value": "suspended"
        }
      ],
      "displayOptions": {
        "show": {
          "output": [
            "select"
          ],
          "operation": [
            "getAll"
          ],
          "resource": [
            "user"
          ]
        }
      }
    },
    {
      "displayName": "Custom Fields",
      "name": "projection",
      "type": "options",
      "default": "basic",
      "description": "What subset of fields to fetch for this user",
      "options": [
        {
          "name": "Don't Include",
          "value": "basic",
          "description": "Do not include any custom fields for the user"
        },
        {
          "name": "Custom",
          "value": "custom",
          "description": "Include custom fields from schemas requested in Custom Schema Names or IDs"
        },
        {
          "name": "Include All",
          "value": "full",
          "description": "Include all fields associated with this user"
        }
      ],
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "user"
          ]
        }
      }
    },
    {
      "displayName": "Custom Schema Names or IDs",
      "name": "customFieldMask",
      "type": "multiOptions",
      "default": [],
      "description": "A comma-separated list of schema names. All fields from these schemas are fetched. Choose from the list, or specify IDs using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>.",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "user"
          ],
          "/projection": [
            "custom"
          ]
        }
      },
      "typeOptions": {
        "loadOptionsMethod": "getSchemas"
      }
    },
    {
      "displayName": "Filter",
      "name": "filter",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Customer",
          "name": "customer",
          "type": "string",
          "default": "",
          "description": "The unique ID for the customer's Google Workspace account"
        },
        {
          "displayName": "Domain",
          "name": "domain",
          "type": "string",
          "default": "",
          "description": "The domain name. Use this field to get groups from a specific domain."
        },
        {
          "displayName": "Query",
          "name": "query",
          "type": "string",
          "placeholder": "e.g. name:contact* email:contact*",
          "default": "",
          "description": "Query string to filter the results. Follow Google Admin SDK documentation. <a href=\"https://developers.google.com/admin-sdk/directory/v1/guides/search-users#examples\" target=\"_blank\">More info</a>."
        },
        {
          "displayName": "Show Deleted",
          "name": "showDeleted",
          "type": "boolean",
          "default": false,
          "description": "Whether retrieve the list of deleted users"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "user"
          ]
        }
      }
    },
    {
      "displayName": "Sort",
      "name": "sort",
      "type": "fixedCollection",
      "default": {},
      "description": "Define sorting rules for the results",
      "options": [
        {
          "name": "sortRules",
          "displayName": "Sort Rules",
          "values": [
            {
              "displayName": "Order By",
              "name": "orderBy",
              "type": "options",
              "options": [
                {
                  "name": "Email",
                  "value": "email"
                },
                {
                  "name": "Family Name",
                  "value": "familyName"
                },
                {
                  "name": "Given Name",
                  "value": "givenName"
                }
              ],
              "default": "",
              "description": "Field to sort the results by"
            },
            {
              "displayName": "Sort Order",
              "name": "sortOrder",
              "type": "options",
              "options": [
                {
                  "name": "Ascending",
                  "value": "ASCENDING"
                },
                {
                  "name": "Descending",
                  "value": "DESCENDING"
                }
              ],
              "default": "ASCENDING",
              "description": "Sort order direction"
            }
          ]
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "user"
          ]
        }
      }
    },
    {
      "displayName": "Update Fields",
      "name": "updateFields",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Archived",
          "name": "archived",
          "type": "boolean",
          "default": false,
          "description": "Whether user is archived"
        },
        {
          "displayName": "Suspend",
          "name": "suspendUi",
          "type": "boolean",
          "default": false,
          "description": "Whether to set the user as suspended. If set to OFF, the user will be reactivated. If not added, the status will remain unchanged."
        },
        {
          "displayName": "Change Password at Next Login",
          "name": "changePasswordAtNextLogin",
          "type": "boolean",
          "default": false,
          "description": "Whether the user is forced to change their password at next login"
        },
        {
          "displayName": "First Name",
          "name": "firstName",
          "type": "string",
          "default": "",
          "placeholder": "e.g. John"
        },
        {
          "displayName": "Last Name",
          "name": "lastName",
          "type": "string",
          "default": "",
          "placeholder": "e.g. Doe"
        },
        {
          "displayName": "Password",
          "name": "password",
          "type": "string",
          "typeOptions": {
            "password": true
          },
          "default": "",
          "placeholder": "e.g. MyStrongP@ssword123",
          "description": "Stores the password for the user account. A minimum of 8 characters is required. The maximum length is 100 characters."
        },
        {
          "displayName": "Phones",
          "name": "phoneUi",
          "placeholder": "Add Phone",
          "type": "fixedCollection",
          "typeOptions": {
            "multipleValues": true
          },
          "default": {},
          "options": [
            {
              "name": "phoneValues",
              "displayName": "Phone",
              "values": [
                {
                  "displayName": "Type",
                  "name": "type",
                  "type": "options",
                  "options": [
                    {
                      "name": "Assistant",
                      "value": "assistant"
                    },
                    {
                      "name": "Callback",
                      "value": "callback"
                    },
                    {
                      "name": "Car",
                      "value": "car"
                    },
                    {
                      "name": "Company Main",
                      "value": "company_main"
                    },
                    {
                      "name": "Custom",
                      "value": "custom"
                    },
                    {
                      "name": "Grand Central",
                      "value": "grand_central"
                    },
                    {
                      "name": "Home",
                      "value": "home"
                    },
                    {
                      "name": "Home Fax",
                      "value": "home_fax"
                    },
                    {
                      "name": "ISDN",
                      "value": "isdn"
                    },
                    {
                      "name": "Main",
                      "value": "main"
                    },
                    {
                      "name": "Mobile",
                      "value": "mobile"
                    },
                    {
                      "name": "Other",
                      "value": "other"
                    },
                    {
                      "name": "Other Fax",
                      "value": "other_fax"
                    },
                    {
                      "name": "Pager",
                      "value": "pager"
                    },
                    {
                      "name": "Radio",
                      "value": "radio"
                    },
                    {
                      "name": "Telex",
                      "value": "telex"
                    },
                    {
                      "name": "TTY TDD",
                      "value": "tty_tdd"
                    },
                    {
                      "name": "Work",
                      "value": "work"
                    },
                    {
                      "name": "Work Fax",
                      "value": "work_fax"
                    },
                    {
                      "name": "Work Mobile",
                      "value": "work_mobile"
                    },
                    {
                      "name": "Work Pager",
                      "value": "work_pager"
                    }
                  ],
                  "default": "work",
                  "description": "The type of phone number"
                },
                {
                  "displayName": "Phone Number",
                  "name": "value",
                  "type": "string",
                  "default": "",
                  "placeholder": "e.g. +1234567890"
                },
                {
                  "displayName": "Primary",
                  "name": "primary",
                  "type": "boolean",
                  "default": false,
                  "description": "Whether this is the user's primary phone number. A user may only have one primary phone number."
                }
              ]
            }
          ]
        },
        {
          "displayName": "Primary Email",
          "name": "primaryEmail",
          "type": "string",
          "default": "",
          "placeholder": "e.g. john.doe@example.com",
          "description": "The user's primary email address. This property is required in a request to create a user account. The primaryEmail must be unique and cannot be an alias of another user."
        },
        {
          "displayName": "Secondary Emails",
          "name": "emailUi",
          "placeholder": "Add Email",
          "type": "fixedCollection",
          "typeOptions": {
            "multipleValues": true
          },
          "default": {},
          "options": [
            {
              "name": "emailValues",
              "displayName": "Email",
              "values": [
                {
                  "displayName": "Type",
                  "name": "type",
                  "type": "options",
                  "options": [
                    {
                      "name": "Home",
                      "value": "home"
                    },
                    {
                      "name": "Work",
                      "value": "work"
                    },
                    {
                      "name": "Other",
                      "value": "other"
                    }
                  ],
                  "default": "work",
                  "description": "The type of the email account"
                },
                {
                  "displayName": "Email",
                  "name": "address",
                  "type": "string",
                  "default": "",
                  "placeholder": "e.g. john.doe.work@example.com"
                }
              ]
            }
          ]
        },
        {
          "displayName": "Roles",
          "name": "roles",
          "type": "multiOptions",
          "default": [],
          "description": "Select the roles you want to assign to the user",
          "options": [
            {
              "name": "Directory Sync Admin",
              "value": "directorySyncAdmin",
              "description": "Whether to assign the Directory Sync Admin role"
            },
            {
              "name": "Groups Admin",
              "value": "groupsAdmin",
              "description": "Whether to assign the Groups Admin role"
            },
            {
              "name": "Groups Editor",
              "value": "groupsEditor",
              "description": "Whether to assign the Groups Editor role"
            },
            {
              "name": "Groups Reader",
              "value": "groupsReader",
              "description": "Whether to assign the Groups Reader role"
            },
            {
              "name": "Help Desk Admin",
              "value": "helpDeskAdmin",
              "description": "Whether to assign the Help Desk Admin role"
            },
            {
              "name": "Inventory Reporting Admin",
              "value": "inventoryReportingAdmin",
              "description": "Whether to assign the Inventory Reporting Admin role"
            },
            {
              "name": "Mobile Admin",
              "value": "mobileAdmin",
              "description": "Whether to assign the Mobile Admin role"
            },
            {
              "name": "Services Admin",
              "value": "servicesAdmin",
              "description": "Whether to assign the Services Admin role"
            },
            {
              "name": "Storage Admin",
              "value": "storageAdmin",
              "description": "Whether to assign the Storage Admin role"
            },
            {
              "name": "Super Admin",
              "value": "superAdmin",
              "description": "Whether to assign the Super Admin role"
            },
            {
              "name": "User Management",
              "value": "userManagement",
              "description": "Whether to assign the User Management role"
            }
          ]
        },
        {
          "displayName": "Custom Fields",
          "name": "customFields",
          "placeholder": "Add or Edit Custom Fields",
          "type": "fixedCollection",
          "typeOptions": {
            "multipleValues": true
          },
          "default": {},
          "description": "Allows editing and adding of custom fields",
          "options": [
            {
              "name": "fieldValues",
              "displayName": "Field",
              "values": [
                {
                  "displayName": "Schema Name or ID",
                  "name": "schemaName",
                  "type": "options",
                  "typeOptions": {
                    "loadOptionsMethod": "getSchemas"
                  },
                  "default": "",
                  "description": "Select the schema to use for custom fields. Choose from the list, or specify an ID using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>."
                },
                {
                  "displayName": "Field Name or ID",
                  "name": "fieldName",
                  "type": "string",
                  "default": "",
                  "required": true,
                  "description": "Enter a field name from the selected schema"
                },
                {
                  "displayName": "Value",
                  "name": "value",
                  "type": "string",
                  "default": "",
                  "required": true,
                  "description": "Provide a value for the selected field"
                }
              ]
            }
          ]
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "update"
          ],
          "resource": [
            "user"
          ]
        }
      }
    }
  ]

operations:
  [
    {
      "operation": "get",
      "name": "Get",
      "description": "Get a ChromeOS device",
      "resource": "device"
    },
    {
      "operation": "getAll",
      "name": "Get Many",
      "description": "Get many ChromeOS devices",
      "resource": "device"
    },
    {
      "operation": "update",
      "name": "Update",
      "description": "Update a ChromeOS device",
      "resource": "device"
    },
    {
      "operation": "changeStatus",
      "name": "Change Status",
      "description": "Change the status of a ChromeOS device",
      "resource": "device"
    },
    {
      "operation": "reenable",
      "name": "Enabled",
      "description": "Re-enable a disabled chromebook",
      "resource": "device"
    },
    {
      "operation": "disable",
      "name": "Disabled",
      "description": "Disable a chromebook",
      "resource": "device"
    },
    {
      "operation": "create",
      "name": "Create",
      "description": "Create a group",
      "resource": "group"
    },
    {
      "operation": "delete",
      "name": "Delete",
      "description": "Delete a group",
      "resource": "group"
    },
    {
      "operation": "get",
      "name": "Get",
      "description": "Get a group",
      "resource": "group"
    },
    {
      "operation": "getAll",
      "name": "Get Many",
      "description": "Get many groups",
      "resource": "group"
    },
    {
      "operation": "update",
      "name": "Update",
      "description": "Update a group",
      "resource": "group"
    },
    {
      "operation": "addToGroup",
      "name": "Add to Group",
      "description": "Add an existing user to a group",
      "resource": "user"
    },
    {
      "operation": "create",
      "name": "Create",
      "description": "Create a user",
      "resource": "user"
    },
    {
      "operation": "delete",
      "name": "Delete",
      "description": "Delete a user",
      "resource": "user"
    },
    {
      "operation": "get",
      "name": "Get",
      "description": "Get a user",
      "resource": "user"
    },
    {
      "operation": "getAll",
      "name": "Get Many",
      "description": "Get many users",
      "resource": "user"
    },
    {
      "operation": "removeFromGroup",
      "name": "Remove From Group",
      "description": "Remove a user from a group",
      "resource": "user"
    },
    {
      "operation": "update",
      "name": "Update",
      "description": "Update a user",
      "resource": "user"
    }
  ]


node_type: nodes-base.gSuiteAdmin
package_name: n8n-nodes-base
display_name: Google Workspace Admin
description: Consume Google Workspace Admin API
category: input
development_style: programmatic
version: 1
credentials_required:
  [
  {
  "name": "gSuiteAdminOAuth2Api",
  "required": true
  }
  ]

outputs:
  [
  "main"
  ]

updated_at: 2026-03-30 13:12:49
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Google Workspace Admin node documentation
  description: Learn how to use the Google Workspace Admin node in n8n. Follow technical documentation to integrate Google Workspace Admin node into your workflows.
  contentType: [integration, reference]
  ---

  # Google Workspace Admin node

  Use the Google Workspace Admin node to automate work in Google Workspace Admin, and integrate Google Workspace Admin with other applications. n8n has built-in support for a wide range of Google Workspace Admin features, including creating, updating, deleting, and getting users, and groups. 

  On this page, you'll find a list of operations the Google Workspace Admin node supports and links to more resources.

  /// note | Credentials
  Refer to [Google credentials](/integrations/builtin/credentials/google/index.md) for guidance on setting up authentication. 
  ///

  --8<-- "_snippets/integrations/builtin/app-nodes/ai-tools.md"

  ## Operations

  * Group
      * Create a group
      * Delete a group
      * Get a group
      * Get all groups
      * Update a group
  * User
      * Create a user
      * Delete a user
      * Get a user
      * Get all users
      * Update a user

  ## Templates and examples

  <!-- see https://www.notion.so/n8n/Pull-in-templates-for-the-integrations-pages-37c716837b804d30a33b47475f6e3780 -->
  [[ templatesWidget(page.title, 'google-workspace-admin') ]]

  ## How to project a user's information

  There are three different ways to project a user's information:

  - **Basic**: Doesn't include any custom fields.
  - **Custom**: Includes the custom fields from schemas in `customField`.
  - **Full**: Include all the fields associated with the user.

  To include custom fields, follow these steps:

  1. Select **Custom** from the **Projection** dropdown list.
  2. Select the **Add Options** button and select **Custom Schemas** from the dropdown list.
  3. Select the schema names you want to include from the **Custom Schemas** dropdown list.

properties_schema:
  [
    {
      "displayName": "Resource",
      "name": "resource",
      "type": "options",
      "default": "user",
      "options": [
        {
          "name": "ChromeOS Device",
          "value": "device"
        },
        {
          "name": "Group",
          "value": "group"
        },
        {
          "name": "User",
          "value": "user"
        }
      ],
      "noDataExpression": true
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "get",
      "options": [
        {
          "name": "Get",
          "value": "get",
          "description": "Get a ChromeOS device",
          "action": "Get ChromeOS device"
        },
        {
          "name": "Get Many",
          "value": "getAll",
          "description": "Get many ChromeOS devices",
          "action": "Get many ChromeOS devices"
        },
        {
          "name": "Update",
          "value": "update",
          "description": "Update a ChromeOS device",
          "action": "Update ChromeOS device"
        },
        {
          "name": "Change Status",
          "value": "changeStatus",
          "description": "Change the status of a ChromeOS device",
          "action": "Change status of ChromeOS device"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "device"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Device",
      "name": "deviceId",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "description": "Select the device you want to retrieve",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "get",
            "update",
            "changeStatus"
          ],
          "resource": [
            "device"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From List",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "searchDevices"
          }
        },
        {
          "displayName": "By ID",
          "name": "deviceId",
          "type": "string",
          "hint": "Enter the device id",
          "placeholder": "e.g. 123e4567-e89b-12d3-a456-426614174000"
        }
      ]
    },
    {
      "displayName": "Return All",
      "name": "returnAll",
      "type": "boolean",
      "default": false,
      "description": "Whether to return all results or only up to a given limit",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "device"
          ]
        }
      }
    },
    {
      "displayName": "Limit",
      "name": "limit",
      "type": "number",
      "default": 100,
      "description": "Max number of results to return",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "device"
          ],
          "returnAll": [
            false
          ]
        }
      },
      "typeOptions": {
        "minValue": 1,
        "maxValue": 500
      }
    },
    {
      "displayName": "Output",
      "name": "projection",
      "type": "options",
      "default": "basic",
      "description": "What subset of fields to fetch for this device",
      "options": [
        {
          "name": "Basic",
          "value": "basic",
          "description": "Do not include any custom fields for the user"
        },
        {
          "name": "Full",
          "value": "full",
          "description": "Include all fields associated with this user"
        }
      ],
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "get",
            "getAll"
          ],
          "resource": [
            "device"
          ]
        }
      }
    },
    {
      "displayName": "Include Children",
      "name": "includeChildOrgunits",
      "type": "boolean",
      "default": false,
      "description": "Whether to include devices from organizational units below your specified organizational unit",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "device"
          ]
        }
      }
    },
    {
      "displayName": "Filter",
      "name": "filter",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Organizational Unit Name or ID",
          "name": "orgUnitPath",
          "type": "options",
          "typeOptions": {
            "loadOptionsMethod": "getOrgUnits"
          },
          "default": [],
          "description": "Specify the organizational unit name or ID. Choose from the list or use an expression. Choose from the list, or specify an ID using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>."
        },
        {
          "displayName": "Query",
          "name": "query",
          "type": "string",
          "placeholder": "e.g. name:contact* email:contact*",
          "default": "",
          "description": "Use Google's querying syntax to filter results"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "device"
          ]
        }
      }
    },
    {
      "displayName": "Sort",
      "name": "sort",
      "type": "fixedCollection",
      "default": {},
      "description": "Define sorting rules for the results",
      "options": [
        {
          "name": "sortRules",
          "displayName": "Sort Rules",
          "values": [
            {
              "displayName": "Order By",
              "name": "orderBy",
              "type": "options",
              "options": [
                {
                  "name": "Annotated Location",
                  "value": "annotatedLocation"
                },
                {
                  "name": "Annotated User",
                  "value": "annotatedUser"
                },
                {
                  "name": "Last Sync",
                  "value": "lastSync"
                },
                {
                  "name": "Notes",
                  "value": "notes"
                },
                {
                  "name": "Serial Number",
                  "value": "serialNumber"
                },
                {
                  "name": "Status",
                  "value": "status"
                }
              ],
              "default": "",
              "description": "Field to sort the results by"
            },
            {
              "displayName": "Sort Order",
              "name": "sortBy",
              "type": "options",
              "options": [
                {
                  "name": "Ascending",
                  "value": "ascending"
                },
                {
                  "name": "Descending",
                  "value": "descending"
                }
              ],
              "default": "",
              "description": "Sort order direction"
            }
          ]
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "device"
          ]
        }
      }
    },
    {
      "displayName": "Update Fields",
      "name": "updateOptions",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Move to Organizational Unit Name or ID",
          "name": "orgUnitPath",
          "type": "options",
          "typeOptions": {
            "loadOptionsMethod": "getOrgUnits"
          },
          "default": [],
          "description": "The full path to the organizational unit. Choose from the list, or specify an ID using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>."
        },
        {
          "displayName": "Annotated User",
          "name": "annotatedUser",
          "type": "string",
          "default": "",
          "description": "The annotated user of the device",
          "placeholder": "e.g. help desk"
        },
        {
          "displayName": "Annotated Location",
          "name": "annotatedLocation",
          "type": "string",
          "default": "",
          "description": "The annotated location of the device",
          "placeholder": "e.g. Mountain View help desk Chromebook"
        },
        {
          "displayName": "Annotated Asset ID",
          "name": "annotatedAssetId",
          "type": "string",
          "default": "",
          "description": "The annotated asset ID of a device",
          "placeholder": "e.g. 1234567890"
        },
        {
          "displayName": "Notes",
          "name": "notes",
          "type": "string",
          "default": "",
          "description": "Add notes to a device",
          "placeholder": "e.g. Loaned from support"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "update"
          ],
          "resource": [
            "device"
          ]
        }
      }
    },
    {
      "displayName": "Status",
      "name": "action",
      "type": "options",
      "default": "reenable",
      "description": "Set the status of a device",
      "options": [
        {
          "name": "Enabled",
          "value": "reenable",
          "description": "Re-enable a disabled chromebook",
          "action": "Enable a device"
        },
        {
          "name": "Disabled",
          "value": "disable",
          "description": "Disable a chromebook",
          "action": "Disable a device"
        }
      ],
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "changeStatus"
          ],
          "resource": [
            "device"
          ]
        }
      }
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "create",
      "options": [
        {
          "name": "Create",
          "value": "create",
          "description": "Create a group",
          "action": "Create a group"
        },
        {
          "name": "Delete",
          "value": "delete",
          "description": "Delete a group",
          "action": "Delete a group"
        },
        {
          "name": "Get",
          "value": "get",
          "description": "Get a group",
          "action": "Get a group"
        },
        {
          "name": "Get Many",
          "value": "getAll",
          "description": "Get many groups",
          "action": "Get many groups"
        },
        {
          "name": "Update",
          "value": "update",
          "description": "Update a group",
          "action": "Update a group"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "group"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Group",
      "name": "groupId",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "description": "Select the group to perform the operation on",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "delete",
            "get",
            "update"
          ],
          "resource": [
            "group"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From list",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "searchGroups"
          }
        },
        {
          "displayName": "By ID",
          "name": "GroupId",
          "type": "string",
          "placeholder": "e.g. 0123kx3o1habcdf"
        }
      ]
    },
    {
      "displayName": "Group Name",
      "name": "name",
      "type": "string",
      "default": "",
      "description": "The group's display name",
      "displayOptions": {
        "show": {
          "operation": [
            "create"
          ],
          "resource": [
            "group"
          ]
        }
      }
    },
    {
      "displayName": "Group Email",
      "name": "email",
      "type": "string",
      "default": "",
      "description": "The group's email address. If your account has multiple domains, select the appropriate domain for the email address. The email must be unique",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "create"
          ],
          "resource": [
            "group"
          ]
        }
      }
    },
    {
      "displayName": "Additional Fields",
      "name": "additionalFields",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Description",
          "name": "description",
          "type": "string",
          "default": "",
          "description": "An extended description to help users determine the purpose of a group. For example, you can include information about who should join the group, the types of messages to send to the group, links to FAQs about the group, or related groups."
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "create"
          ],
          "resource": [
            "group"
          ]
        }
      }
    },
    {
      "displayName": "Return All",
      "name": "returnAll",
      "type": "boolean",
      "default": false,
      "description": "Whether to return all results or only up to a given limit",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "group"
          ]
        }
      }
    },
    {
      "displayName": "Limit",
      "name": "limit",
      "type": "number",
      "default": 100,
      "description": "Max number of results to return",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "group"
          ],
          "returnAll": [
            false
          ]
        }
      },
      "typeOptions": {
        "minValue": 1,
        "maxValue": 500
      }
    },
    {
      "displayName": "Filter",
      "name": "filter",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Customer",
          "name": "customer",
          "type": "string",
          "default": "",
          "description": "The unique ID for the customer's Google Workspace account"
        },
        {
          "displayName": "Domain",
          "name": "domain",
          "type": "string",
          "default": "",
          "description": "The domain name. Use this field to get groups from a specific domain."
        },
        {
          "displayName": "Query",
          "name": "query",
          "type": "string",
          "placeholder": "e.g. name:contact* email:contact*",
          "default": "",
          "description": "Query string to filter the results. Follow Google Admin SDK documentation. <a href=\"https://developers.google.com/admin-sdk/directory/v1/guides/search-groups#examples\" target=\"_blank\">More info</a>."
        },
        {
          "displayName": "User ID",
          "name": "userId",
          "type": "string",
          "default": "",
          "description": "Email or immutable ID of a user to list groups they are a member of"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "group"
          ]
        }
      }
    },
    {
      "displayName": "Sort",
      "name": "sort",
      "type": "fixedCollection",
      "default": {},
      "options": [
        {
          "name": "sortRules",
          "displayName": "Sort Rules",
          "values": [
            {
              "displayName": "Order By",
              "name": "orderBy",
              "type": "options",
              "options": [
                {
                  "name": "Email",
                  "value": "email"
                }
              ],
              "default": "email",
              "description": "Field to sort the results by"
            },
            {
              "displayName": "Sort Order",
              "name": "sortOrder",
              "type": "options",
              "options": [
                {
                  "name": "Ascending",
                  "value": "ASCENDING"
                },
                {
                  "name": "Descending",
                  "value": "DESCENDING"
                }
              ],
              "default": "ASCENDING",
              "description": "Sort order direction"
            }
          ]
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "group"
          ]
        }
      }
    },
    {
      "displayName": "Update Fields",
      "name": "updateFields",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Description",
          "name": "description",
          "type": "string",
          "default": "",
          "typeOptions": {
            "rows": 2
          },
          "description": "An extended description to help users determine the purpose of a group. For example, you can include information about who should join the group, the types of messages to send to the group, links to FAQs about the group, or related groups."
        },
        {
          "displayName": "Email",
          "name": "email",
          "type": "string",
          "placeholder": "e.g. sales@example.com",
          "default": "",
          "description": "The group's email address. If your account has multiple domains, select the appropriate domain for the email address. The email must be unique."
        },
        {
          "displayName": "Name",
          "name": "name",
          "type": "string",
          "placeholder": "e.g. Sales",
          "default": "",
          "description": "The group's display name"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "update"
          ],
          "resource": [
            "group"
          ]
        }
      }
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "create",
      "options": [
        {
          "name": "Add to Group",
          "value": "addToGroup",
          "description": "Add an existing user to a group",
          "action": "Add user to group"
        },
        {
          "name": "Create",
          "value": "create",
          "description": "Create a user",
          "action": "Create a user"
        },
        {
          "name": "Delete",
          "value": "delete",
          "description": "Delete a user",
          "action": "Delete a user"
        },
        {
          "name": "Get",
          "value": "get",
          "description": "Get a user",
          "action": "Get a user"
        },
        {
          "name": "Get Many",
          "value": "getAll",
          "description": "Get many users",
          "action": "Get many users"
        },
        {
          "name": "Remove From Group",
          "value": "removeFromGroup",
          "description": "Remove a user from a group",
          "action": "Remove user from group"
        },
        {
          "name": "Update",
          "value": "update",
          "description": "Update a user",
          "action": "Update a user"
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "user"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "User",
      "name": "userId",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "description": "Select the user to perform the operation on",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "user"
          ],
          "operation": [
            "addToGroup",
            "delete",
            "get",
            "removeFromGroup",
            "update"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From list",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "searchUsers"
          }
        },
        {
          "displayName": "By Email",
          "name": "userEmail",
          "type": "string",
          "hint": "Enter the user email",
          "placeholder": "e.g. sales@example.com",
          "validation": [
            {
              "type": "regex",
              "properties": {
                "regex": "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",
                "errorMessage": "Please enter a valid email address."
              }
            }
          ]
        },
        {
          "displayName": "By ID",
          "name": "userId",
          "type": "string",
          "hint": "Enter the user id",
          "placeholder": "e.g. 123456789879230471055"
        }
      ]
    },
    {
      "displayName": "Group",
      "name": "groupId",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "description": "Select the group to perform the operation on",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "user"
          ],
          "operation": [
            "addToGroup",
            "removeFromGroup"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From list",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "searchGroups"
          }
        },
        {
          "displayName": "By ID",
          "name": "groupId",
          "type": "string",
          "placeholder": "e.g. 0123kx3o1habcdf"
        }
      ]
    },
    {
      "displayName": "First Name",
      "name": "firstName",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "create"
          ],
          "resource": [
            "user"
          ]
        }
      }
    },
    {
      "displayName": "Last Name",
      "name": "lastName",
      "type": "string",
      "default": "",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "create"
          ],
          "resource": [
            "user"
          ]
        }
      }
    },
    {
      "displayName": "Password",
      "name": "password",
      "type": "string",
      "default": "",
      "description": "Stores the password for the user account. A minimum of 8 characters is required. The maximum length is 100 characters.",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "create"
          ],
          "resource": [
            "user"
          ]
        }
      },
      "typeOptions": {
        "password": true
      }
    },
    {
      "displayName": "Username",
      "name": "username",
      "type": "string",
      "default": "",
      "description": "The username that will be set to the user. Example: If you domain is example.com and you set the username to n.smith then the user's final email address will be n.smith@example.com.",
      "displayOptions": {
        "show": {
          "operation": [
            "create"
          ],
          "resource": [
            "user"
          ]
        }
      }
    },
    {
      "displayName": "Domain Name or ID",
      "name": "domain",
      "type": "options",
      "default": "",
      "description": "Choose from the list, or specify an ID using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "create"
          ],
          "resource": [
            "user"
          ]
        }
      },
      "typeOptions": {
        "loadOptionsMethod": "getDomains"
      }
    },
    {
      "displayName": "Additional Fields",
      "name": "additionalFields",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Change Password at Next Login",
          "name": "changePasswordAtNextLogin",
          "type": "boolean",
          "default": false,
          "description": "Whether the user is forced to change their password at next login"
        },
        {
          "displayName": "Phones",
          "name": "phoneUi",
          "placeholder": "Add Phone",
          "type": "fixedCollection",
          "typeOptions": {
            "multipleValues": true
          },
          "default": {},
          "options": [
            {
              "name": "phoneValues",
              "displayName": "Phone",
              "values": [
                {
                  "displayName": "Type",
                  "name": "type",
                  "type": "options",
                  "options": [
                    {
                      "name": "Assistant",
                      "value": "assistant"
                    },
                    {
                      "name": "Callback",
                      "value": "callback"
                    },
                    {
                      "name": "Car",
                      "value": "car"
                    },
                    {
                      "name": "Company Main",
                      "value": "company_main"
                    },
                    {
                      "name": "Custom",
                      "value": "custom"
                    },
                    {
                      "name": "Grand Central",
                      "value": "grand_central"
                    },
                    {
                      "name": "Home",
                      "value": "home"
                    },
                    {
                      "name": "Home Fax",
                      "value": "home_fax"
                    },
                    {
                      "name": "ISDN",
                      "value": "isdn"
                    },
                    {
                      "name": "Main",
                      "value": "main"
                    },
                    {
                      "name": "Mobile",
                      "value": "mobile"
                    },
                    {
                      "name": "Other",
                      "value": "other"
                    },
                    {
                      "name": "Other Fax",
                      "value": "other_fax"
                    },
                    {
                      "name": "Pager",
                      "value": "pager"
                    },
                    {
                      "name": "Radio",
                      "value": "radio"
                    },
                    {
                      "name": "Telex",
                      "value": "telex"
                    },
                    {
                      "name": "TTY TDD",
                      "value": "tty_tdd"
                    },
                    {
                      "name": "Work",
                      "value": "work"
                    },
                    {
                      "name": "Work Fax",
                      "value": "work_fax"
                    },
                    {
                      "name": "Work Mobile",
                      "value": "work_mobile"
                    },
                    {
                      "name": "Work Pager",
                      "value": "work_pager"
                    }
                  ],
                  "default": "work",
                  "description": "The type of phone number"
                },
                {
                  "displayName": "Phone Number",
                  "name": "value",
                  "type": "string",
                  "default": ""
                },
                {
                  "displayName": "Primary",
                  "name": "primary",
                  "type": "boolean",
                  "default": false,
                  "description": "Whether this is the user's primary phone number"
                }
              ]
            }
          ]
        },
        {
          "displayName": "Secondary Emails",
          "name": "emailUi",
          "placeholder": "Add Email",
          "type": "fixedCollection",
          "typeOptions": {
            "multipleValues": true
          },
          "default": {},
          "options": [
            {
              "name": "emailValues",
              "displayName": "Email",
              "values": [
                {
                  "displayName": "Type",
                  "name": "type",
                  "type": "options",
                  "options": [
                    {
                      "name": "Home",
                      "value": "home"
                    },
                    {
                      "name": "Work",
                      "value": "work"
                    },
                    {
                      "name": "Other",
                      "value": "other"
                    }
                  ],
                  "default": "work",
                  "description": "The type of the email account"
                },
                {
                  "displayName": "Email",
                  "name": "address",
                  "type": "string",
                  "default": ""
                }
              ]
            }
          ]
        },
        {
          "displayName": "Roles",
          "name": "roles",
          "type": "multiOptions",
          "default": [],
          "description": "Select the roles you want to assign to the user",
          "options": [
            {
              "name": "Directory Sync Admin",
              "value": "directorySyncAdmin",
              "description": "Whether to assign the Directory Sync Admin role"
            },
            {
              "name": "Groups Admin",
              "value": "groupsAdmin",
              "description": "Whether to assign the Groups Admin role"
            },
            {
              "name": "Groups Editor",
              "value": "groupsEditor",
              "description": "Whether to assign the Groups Editor role"
            },
            {
              "name": "Groups Reader",
              "value": "groupsReader",
              "description": "Whether to assign the Groups Reader role"
            },
            {
              "name": "Help Desk Admin",
              "value": "helpDeskAdmin",
              "description": "Whether to assign the Help Desk Admin role"
            },
            {
              "name": "Inventory Reporting Admin",
              "value": "inventoryReportingAdmin",
              "description": "Whether to assign the Inventory Reporting Admin role"
            },
            {
              "name": "Mobile Admin",
              "value": "mobileAdmin",
              "description": "Whether to assign the Mobile Admin role"
            },
            {
              "name": "Services Admin",
              "value": "servicesAdmin",
              "description": "Whether to assign the Services Admin role"
            },
            {
              "name": "Storage Admin",
              "value": "storageAdmin",
              "description": "Whether to assign the Storage Admin role"
            },
            {
              "name": "Super Admin",
              "value": "superAdmin",
              "description": "Whether to assign the Super Admin role"
            },
            {
              "name": "User Management",
              "value": "userManagement",
              "description": "Whether to assign the User Management role"
            }
          ]
        },
        {
          "displayName": "Custom Fields",
          "name": "customFields",
          "placeholder": "Add or Edit Custom Fields",
          "type": "fixedCollection",
          "typeOptions": {
            "multipleValues": true
          },
          "default": {},
          "description": "Allows editing and adding of custom fields",
          "options": [
            {
              "name": "fieldValues",
              "displayName": "Field",
              "values": [
                {
                  "displayName": "Schema Name or ID",
                  "name": "schemaName",
                  "type": "options",
                  "typeOptions": {
                    "loadOptionsMethod": "getSchemas"
                  },
                  "default": "",
                  "description": "Select the schema to use for custom fields. Choose from the list, or specify an ID using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>."
                },
                {
                  "displayName": "Field Name or ID",
                  "name": "fieldName",
                  "type": "string",
                  "default": "",
                  "required": true,
                  "description": "Enter a field name from the selected schema"
                },
                {
                  "displayName": "Value",
                  "name": "value",
                  "type": "string",
                  "default": "",
                  "required": true,
                  "description": "Provide a value for the selected field"
                }
              ]
            }
          ]
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "create"
          ],
          "resource": [
            "user"
          ]
        }
      }
    },
    {
      "displayName": "Output",
      "name": "output",
      "type": "options",
      "default": "simplified",
      "options": [
        {
          "name": "Simplified",
          "value": "simplified",
          "description": "Only return specific fields: kind, ID, primaryEmail, name (with subfields), isAdmin, lastLoginTime, creationTime, and suspended"
        },
        {
          "name": "Raw",
          "value": "raw",
          "description": "Return all fields from the API response"
        },
        {
          "name": "Select Included Fields",
          "value": "select",
          "description": "Choose specific fields to include"
        }
      ],
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "get"
          ],
          "resource": [
            "user"
          ]
        }
      }
    },
    {
      "displayName": "Fields",
      "name": "fields",
      "type": "multiOptions",
      "default": [],
      "description": "Fields to include in the response when \"Select Included Fields\" is chosen",
      "options": [
        {
          "name": "Creation Time",
          "value": "creationTime"
        },
        {
          "name": "Is Admin",
          "value": "isAdmin"
        },
        {
          "name": "Kind",
          "value": "kind"
        },
        {
          "name": "Last Login Time",
          "value": "lastLoginTime"
        },
        {
          "name": "Name",
          "value": "name"
        },
        {
          "name": "Primary Email",
          "value": "primaryEmail"
        },
        {
          "name": "Suspended",
          "value": "suspended"
        }
      ],
      "displayOptions": {
        "show": {
          "output": [
            "select"
          ],
          "operation": [
            "get"
          ],
          "resource": [
            "user"
          ]
        }
      }
    },
    {
      "displayName": "Custom Fields",
      "name": "projection",
      "type": "options",
      "default": "basic",
      "description": "What subset of fields to fetch for this user",
      "options": [
        {
          "name": "Don't Include",
          "value": "basic",
          "description": "Do not include any custom fields for the user"
        },
        {
          "name": "Custom",
          "value": "custom",
          "description": "Include custom fields from schemas requested in Custom Schema Names or IDs"
        },
        {
          "name": "Include All",
          "value": "full",
          "description": "Include all fields associated with this user"
        }
      ],
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "get"
          ],
          "resource": [
            "user"
          ]
        }
      }
    },
    {
      "displayName": "Custom Schema Names or IDs",
      "name": "customFieldMask",
      "type": "multiOptions",
      "default": [],
      "description": "A comma-separated list of schema names. All fields from these schemas are fetched. Choose from the list, or specify IDs using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>.",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "get"
          ],
          "resource": [
            "user"
          ],
          "/projection": [
            "custom"
          ]
        }
      },
      "typeOptions": {
        "loadOptionsMethod": "getSchemas"
      }
    },
    {
      "displayName": "Return All",
      "name": "returnAll",
      "type": "boolean",
      "default": false,
      "description": "Whether to return all results or only up to a given limit",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "user"
          ]
        }
      }
    },
    {
      "displayName": "Limit",
      "name": "limit",
      "type": "number",
      "default": 100,
      "description": "Max number of results to return",
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "user"
          ],
          "returnAll": [
            false
          ]
        }
      },
      "typeOptions": {
        "minValue": 1,
        "maxValue": 500
      }
    },
    {
      "displayName": "Output",
      "name": "output",
      "type": "options",
      "default": "simplified",
      "options": [
        {
          "name": "Simplified",
          "value": "simplified",
          "description": "Only return specific fields: kind, ID, primaryEmail, name (with subfields), isAdmin, lastLoginTime, creationTime, and suspended"
        },
        {
          "name": "Raw",
          "value": "raw",
          "description": "Return all fields from the API response"
        },
        {
          "name": "Select Included Fields",
          "value": "select",
          "description": "Choose specific fields to include"
        }
      ],
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "user"
          ]
        }
      }
    },
    {
      "displayName": "Fields",
      "name": "fields",
      "type": "multiOptions",
      "default": [],
      "description": "Fields to include in the response when \"Select Included Fields\" is chosen",
      "options": [
        {
          "name": "Creation Time",
          "value": "creationTime"
        },
        {
          "name": "Is Admin",
          "value": "isAdmin"
        },
        {
          "name": "Kind",
          "value": "kind"
        },
        {
          "name": "Last Login Time",
          "value": "lastLoginTime"
        },
        {
          "name": "Name",
          "value": "name"
        },
        {
          "name": "Primary Email",
          "value": "primaryEmail"
        },
        {
          "name": "Suspended",
          "value": "suspended"
        }
      ],
      "displayOptions": {
        "show": {
          "output": [
            "select"
          ],
          "operation": [
            "getAll"
          ],
          "resource": [
            "user"
          ]
        }
      }
    },
    {
      "displayName": "Custom Fields",
      "name": "projection",
      "type": "options",
      "default": "basic",
      "description": "What subset of fields to fetch for this user",
      "options": [
        {
          "name": "Don't Include",
          "value": "basic",
          "description": "Do not include any custom fields for the user"
        },
        {
          "name": "Custom",
          "value": "custom",
          "description": "Include custom fields from schemas requested in Custom Schema Names or IDs"
        },
        {
          "name": "Include All",
          "value": "full",
          "description": "Include all fields associated with this user"
        }
      ],
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "user"
          ]
        }
      }
    },
    {
      "displayName": "Custom Schema Names or IDs",
      "name": "customFieldMask",
      "type": "multiOptions",
      "default": [],
      "description": "A comma-separated list of schema names. All fields from these schemas are fetched. Choose from the list, or specify IDs using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>.",
      "required": true,
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "user"
          ],
          "/projection": [
            "custom"
          ]
        }
      },
      "typeOptions": {
        "loadOptionsMethod": "getSchemas"
      }
    },
    {
      "displayName": "Filter",
      "name": "filter",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Customer",
          "name": "customer",
          "type": "string",
          "default": "",
          "description": "The unique ID for the customer's Google Workspace account"
        },
        {
          "displayName": "Domain",
          "name": "domain",
          "type": "string",
          "default": "",
          "description": "The domain name. Use this field to get groups from a specific domain."
        },
        {
          "displayName": "Query",
          "name": "query",
          "type": "string",
          "placeholder": "e.g. name:contact* email:contact*",
          "default": "",
          "description": "Query string to filter the results. Follow Google Admin SDK documentation. <a href=\"https://developers.google.com/admin-sdk/directory/v1/guides/search-users#examples\" target=\"_blank\">More info</a>."
        },
        {
          "displayName": "Show Deleted",
          "name": "showDeleted",
          "type": "boolean",
          "default": false,
          "description": "Whether retrieve the list of deleted users"
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "user"
          ]
        }
      }
    },
    {
      "displayName": "Sort",
      "name": "sort",
      "type": "fixedCollection",
      "default": {},
      "description": "Define sorting rules for the results",
      "options": [
        {
          "name": "sortRules",
          "displayName": "Sort Rules",
          "values": [
            {
              "displayName": "Order By",
              "name": "orderBy",
              "type": "options",
              "options": [
                {
                  "name": "Email",
                  "value": "email"
                },
                {
                  "name": "Family Name",
                  "value": "familyName"
                },
                {
                  "name": "Given Name",
                  "value": "givenName"
                }
              ],
              "default": "",
              "description": "Field to sort the results by"
            },
            {
              "displayName": "Sort Order",
              "name": "sortOrder",
              "type": "options",
              "options": [
                {
                  "name": "Ascending",
                  "value": "ASCENDING"
                },
                {
                  "name": "Descending",
                  "value": "DESCENDING"
                }
              ],
              "default": "ASCENDING",
              "description": "Sort order direction"
            }
          ]
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "getAll"
          ],
          "resource": [
            "user"
          ]
        }
      }
    },
    {
      "displayName": "Update Fields",
      "name": "updateFields",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Archived",
          "name": "archived",
          "type": "boolean",
          "default": false,
          "description": "Whether user is archived"
        },
        {
          "displayName": "Suspend",
          "name": "suspendUi",
          "type": "boolean",
          "default": false,
          "description": "Whether to set the user as suspended. If set to OFF, the user will be reactivated. If not added, the status will remain unchanged."
        },
        {
          "displayName": "Change Password at Next Login",
          "name": "changePasswordAtNextLogin",
          "type": "boolean",
          "default": false,
          "description": "Whether the user is forced to change their password at next login"
        },
        {
          "displayName": "First Name",
          "name": "firstName",
          "type": "string",
          "default": "",
          "placeholder": "e.g. John"
        },
        {
          "displayName": "Last Name",
          "name": "lastName",
          "type": "string",
          "default": "",
          "placeholder": "e.g. Doe"
        },
        {
          "displayName": "Password",
          "name": "password",
          "type": "string",
          "typeOptions": {
            "password": true
          },
          "default": "",
          "placeholder": "e.g. MyStrongP@ssword123",
          "description": "Stores the password for the user account. A minimum of 8 characters is required. The maximum length is 100 characters."
        },
        {
          "displayName": "Phones",
          "name": "phoneUi",
          "placeholder": "Add Phone",
          "type": "fixedCollection",
          "typeOptions": {
            "multipleValues": true
          },
          "default": {},
          "options": [
            {
              "name": "phoneValues",
              "displayName": "Phone",
              "values": [
                {
                  "displayName": "Type",
                  "name": "type",
                  "type": "options",
                  "options": [
                    {
                      "name": "Assistant",
                      "value": "assistant"
                    },
                    {
                      "name": "Callback",
                      "value": "callback"
                    },
                    {
                      "name": "Car",
                      "value": "car"
                    },
                    {
                      "name": "Company Main",
                      "value": "company_main"
                    },
                    {
                      "name": "Custom",
                      "value": "custom"
                    },
                    {
                      "name": "Grand Central",
                      "value": "grand_central"
                    },
                    {
                      "name": "Home",
                      "value": "home"
                    },
                    {
                      "name": "Home Fax",
                      "value": "home_fax"
                    },
                    {
                      "name": "ISDN",
                      "value": "isdn"
                    },
                    {
                      "name": "Main",
                      "value": "main"
                    },
                    {
                      "name": "Mobile",
                      "value": "mobile"
                    },
                    {
                      "name": "Other",
                      "value": "other"
                    },
                    {
                      "name": "Other Fax",
                      "value": "other_fax"
                    },
                    {
                      "name": "Pager",
                      "value": "pager"
                    },
                    {
                      "name": "Radio",
                      "value": "radio"
                    },
                    {
                      "name": "Telex",
                      "value": "telex"
                    },
                    {
                      "name": "TTY TDD",
                      "value": "tty_tdd"
                    },
                    {
                      "name": "Work",
                      "value": "work"
                    },
                    {
                      "name": "Work Fax",
                      "value": "work_fax"
                    },
                    {
                      "name": "Work Mobile",
                      "value": "work_mobile"
                    },
                    {
                      "name": "Work Pager",
                      "value": "work_pager"
                    }
                  ],
                  "default": "work",
                  "description": "The type of phone number"
                },
                {
                  "displayName": "Phone Number",
                  "name": "value",
                  "type": "string",
                  "default": "",
                  "placeholder": "e.g. +1234567890"
                },
                {
                  "displayName": "Primary",
                  "name": "primary",
                  "type": "boolean",
                  "default": false,
                  "description": "Whether this is the user's primary phone number. A user may only have one primary phone number."
                }
              ]
            }
          ]
        },
        {
          "displayName": "Primary Email",
          "name": "primaryEmail",
          "type": "string",
          "default": "",
          "placeholder": "e.g. john.doe@example.com",
          "description": "The user's primary email address. This property is required in a request to create a user account. The primaryEmail must be unique and cannot be an alias of another user."
        },
        {
          "displayName": "Secondary Emails",
          "name": "emailUi",
          "placeholder": "Add Email",
          "type": "fixedCollection",
          "typeOptions": {
            "multipleValues": true
          },
          "default": {},
          "options": [
            {
              "name": "emailValues",
              "displayName": "Email",
              "values": [
                {
                  "displayName": "Type",
                  "name": "type",
                  "type": "options",
                  "options": [
                    {
                      "name": "Home",
                      "value": "home"
                    },
                    {
                      "name": "Work",
                      "value": "work"
                    },
                    {
                      "name": "Other",
                      "value": "other"
                    }
                  ],
                  "default": "work",
                  "description": "The type of the email account"
                },
                {
                  "displayName": "Email",
                  "name": "address",
                  "type": "string",
                  "default": "",
                  "placeholder": "e.g. john.doe.work@example.com"
                }
              ]
            }
          ]
        },
        {
          "displayName": "Roles",
          "name": "roles",
          "type": "multiOptions",
          "default": [],
          "description": "Select the roles you want to assign to the user",
          "options": [
            {
              "name": "Directory Sync Admin",
              "value": "directorySyncAdmin",
              "description": "Whether to assign the Directory Sync Admin role"
            },
            {
              "name": "Groups Admin",
              "value": "groupsAdmin",
              "description": "Whether to assign the Groups Admin role"
            },
            {
              "name": "Groups Editor",
              "value": "groupsEditor",
              "description": "Whether to assign the Groups Editor role"
            },
            {
              "name": "Groups Reader",
              "value": "groupsReader",
              "description": "Whether to assign the Groups Reader role"
            },
            {
              "name": "Help Desk Admin",
              "value": "helpDeskAdmin",
              "description": "Whether to assign the Help Desk Admin role"
            },
            {
              "name": "Inventory Reporting Admin",
              "value": "inventoryReportingAdmin",
              "description": "Whether to assign the Inventory Reporting Admin role"
            },
            {
              "name": "Mobile Admin",
              "value": "mobileAdmin",
              "description": "Whether to assign the Mobile Admin role"
            },
            {
              "name": "Services Admin",
              "value": "servicesAdmin",
              "description": "Whether to assign the Services Admin role"
            },
            {
              "name": "Storage Admin",
              "value": "storageAdmin",
              "description": "Whether to assign the Storage Admin role"
            },
            {
              "name": "Super Admin",
              "value": "superAdmin",
              "description": "Whether to assign the Super Admin role"
            },
            {
              "name": "User Management",
              "value": "userManagement",
              "description": "Whether to assign the User Management role"
            }
          ]
        },
        {
          "displayName": "Custom Fields",
          "name": "customFields",
          "placeholder": "Add or Edit Custom Fields",
          "type": "fixedCollection",
          "typeOptions": {
            "multipleValues": true
          },
          "default": {},
          "description": "Allows editing and adding of custom fields",
          "options": [
            {
              "name": "fieldValues",
              "displayName": "Field",
              "values": [
                {
                  "displayName": "Schema Name or ID",
                  "name": "schemaName",
                  "type": "options",
                  "typeOptions": {
                    "loadOptionsMethod": "getSchemas"
                  },
                  "default": "",
                  "description": "Select the schema to use for custom fields. Choose from the list, or specify an ID using an <a href=\"https://docs.n8n.io/code/expressions/\">expression</a>."
                },
                {
                  "displayName": "Field Name or ID",
                  "name": "fieldName",
                  "type": "string",
                  "default": "",
                  "required": true,
                  "description": "Enter a field name from the selected schema"
                },
                {
                  "displayName": "Value",
                  "name": "value",
                  "type": "string",
                  "default": "",
                  "required": true,
                  "description": "Provide a value for the selected field"
                }
              ]
            }
          ]
        }
      ],
      "displayOptions": {
        "show": {
          "operation": [
            "update"
          ],
          "resource": [
            "user"
          ]
        }
      }
    }
  ]

operations:
  [
    {
      "operation": "get",
      "name": "Get",
      "description": "Get a ChromeOS device",
      "resource": "device"
    },
    {
      "operation": "getAll",
      "name": "Get Many",
      "description": "Get many ChromeOS devices",
      "resource": "device"
    },
    {
      "operation": "update",
      "name": "Update",
      "description": "Update a ChromeOS device",
      "resource": "device"
    },
    {
      "operation": "changeStatus",
      "name": "Change Status",
      "description": "Change the status of a ChromeOS device",
      "resource": "device"
    },
    {
      "operation": "reenable",
      "name": "Enabled",
      "description": "Re-enable a disabled chromebook",
      "resource": "device"
    },
    {
      "operation": "disable",
      "name": "Disabled",
      "description": "Disable a chromebook",
      "resource": "device"
    },
    {
      "operation": "create",
      "name": "Create",
      "description": "Create a group",
      "resource": "group"
    },
    {
      "operation": "delete",
      "name": "Delete",
      "description": "Delete a group",
      "resource": "group"
    },
    {
      "operation": "get",
      "name": "Get",
      "description": "Get a group",
      "resource": "group"
    },
    {
      "operation": "getAll",
      "name": "Get Many",
      "description": "Get many groups",
      "resource": "group"
    },
    {
      "operation": "update",
      "name": "Update",
      "description": "Update a group",
      "resource": "group"
    },
    {
      "operation": "addToGroup",
      "name": "Add to Group",
      "description": "Add an existing user to a group",
      "resource": "user"
    },
    {
      "operation": "create",
      "name": "Create",
      "description": "Create a user",
      "resource": "user"
    },
    {
      "operation": "delete",
      "name": "Delete",
      "description": "Delete a user",
      "resource": "user"
    },
    {
      "operation": "get",
      "name": "Get",
      "description": "Get a user",
      "resource": "user"
    },
    {
      "operation": "getAll",
      "name": "Get Many",
      "description": "Get many users",
      "resource": "user"
    },
    {
      "operation": "removeFromGroup",
      "name": "Remove From Group",
      "description": "Remove a user from a group",
      "resource": "user"
    },
    {
      "operation": "update",
      "name": "Update",
      "description": "Update a user",
      "resource": "user"
    }
  ]


node_type: nodes-base.googleBusinessProfileTool
package_name: n8n-nodes-base
display_name: Google Business Profile Tool
description: Consume Google Business Profile API (AI Tool variant for use with AI Agents)
category: input
development_style: programmatic
version: 1
credentials_required:
  [
  {
  "name": "googleBusinessProfileOAuth2Api",
  "required": true
  }
  ]

outputs:
  [
  {
  "type": "ai_tool",
  "displayName": "Tool"
  }
  ]

output_names:
  [
  "Tool"
  ]

updated_at: 2026-03-30 13:12:49
tool_variant_of: nodes-base.googleBusinessProfile
documentation:
  ---
  #https://www.notion.so/n8n/Frontmatter-432c2b8dff1f43d4b1c8d20075510fe4
  title: Google Business Profile node documentation
  description: Learn how to use the Google Business Profile node in n8n. Follow technical documentation to integrate Google Business Profile node into your workflows.
  contentType: [integration, reference]
  ---

  # Google Business Profile node

  Use the Google Business Profile node to automate work in Google Business Profile and integrate Google Business Profile with other applications. n8n has built-in support for a wide range of Google Business Profile features, which includes creating, updating, and deleting posts and reviews.

  On this page, you'll find a list of operations the Google Business Profile node supports, and links to more resources.

  ///  note  | Credentials
  You can find authentication information for this node [here](/integrations/builtin/credentials/google/index.md).
  ///


  ## Operations

  * Post
  	* Create
  	* Delete
  	* Get
  	* Get Many
  	* Update
  * Review
  	* Delete Reply
  	* Get
  	* Get Many
  	* Reply

  ## Templates and examples

  <!-- see https://www.notion.so/n8n/Pull-in-templates-for-the-integrations-pages-37c716837b804d30a33b47475f6e3780 -->
  [[ templatesWidget(page.title, 'google-business-profile') ]]

  ## Related resources

  n8n provides a trigger node for Google Business Profile. You can find the trigger node docs [here](/integrations/builtin/trigger-nodes/n8n-nodes-base.googlebusinessprofiletrigger.md).

  Refer to [Google Business Profile's documentation](https://developers.google.com/my-business/reference/rest){:target=_blank .external-link} for more information about the service.

  --8<-- "_snippets/integrations/builtin/app-nodes/operation-not-supported.md"

properties_schema:
  [
    {
      "displayName": "Tool Description",
      "name": "toolDescription",
      "type": "string",
      "default": "",
      "required": false,
      "description": "Description for the AI to understand what this tool does and when to use it",
      "typeOptions": {
        "rows": 3
      },
      "placeholder": "e.g., Use this tool to manage files and storage"
    },
    {
      "displayName": "Resource",
      "name": "resource",
      "type": "options",
      "default": "post",
      "options": [
        {
          "name": "Post",
          "value": "post"
        },
        {
          "name": "Review",
          "value": "review"
        }
      ],
      "noDataExpression": true
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "create",
      "options": [
        {
          "name": "Create",
          "value": "create",
          "action": "Create post",
          "description": "Create a new post on Google Business Profile",
          "routing": {
            "send": {
              "preSend": [
                null
              ]
            },
            "request": {
              "method": "POST",
              "url": "=/{{$parameter[\"account\"]}}/{{$parameter[\"location\"]}}/localPosts"
            }
          }
        },
        {
          "name": "Delete",
          "value": "delete",
          "action": "Delete post",
          "description": "Delete an existing post",
          "routing": {
            "request": {
              "method": "DELETE",
              "url": "=/{{$parameter[\"post\"]}}",
              "ignoreHttpStatusErrors": true
            },
            "output": {
              "postReceive": [
                null
              ]
            }
          }
        },
        {
          "name": "Get",
          "value": "get",
          "action": "Get post",
          "description": "Retrieve details of a specific post",
          "routing": {
            "request": {
              "method": "GET",
              "url": "=/{{$parameter[\"post\"]}}",
              "ignoreHttpStatusErrors": true
            },
            "output": {
              "postReceive": [
                null
              ]
            }
          }
        },
        {
          "name": "Get Many",
          "value": "getAll",
          "action": "Get many posts",
          "description": "Retrieve multiple posts",
          "routing": {
            "send": {
              "paginate": true
            },
            "operations": {},
            "request": {
              "method": "GET",
              "url": "=/{{$parameter[\"account\"]}}/{{$parameter[\"location\"]}}/localPosts",
              "qs": {
                "pageSize": "={{ $parameter[\"limit\"] ? ($parameter[\"limit\"] < 100 ? $parameter[\"limit\"] : 100) : 100 }}"
              }
            }
          }
        },
        {
          "name": "Update",
          "value": "update",
          "action": "Update a post",
          "description": "Update an existing post",
          "routing": {
            "send": {
              "preSend": [
                null,
                null
              ]
            },
            "request": {
              "method": "PATCH",
              "url": "=/{{$parameter[\"post\"]}}",
              "ignoreHttpStatusErrors": true
            },
            "output": {
              "postReceive": [
                null
              ]
            }
          }
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "post"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Account",
      "name": "account",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "description": "The Google Business Profile account",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "post"
          ],
          "operation": [
            "create"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From list",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "searchAccounts",
            "searchable": true
          }
        },
        {
          "displayName": "By name",
          "name": "name",
          "type": "string",
          "hint": "Enter the account name",
          "validation": [
            {
              "type": "regex",
              "properties": {
                "regex": "accounts/[0-9]+",
                "errorMessage": "The name must start with \"accounts/\""
              }
            }
          ],
          "placeholder": "e.g. accounts/0123456789"
        }
      ]
    },
    {
      "displayName": "Location",
      "name": "location",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "description": "The specific location or business associated with the account",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "post"
          ],
          "operation": [
            "create"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From list",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "searchLocations",
            "searchable": true
          }
        },
        {
          "displayName": "By name",
          "name": "name",
          "type": "string",
          "hint": "Enter the location name",
          "validation": [
            {
              "type": "regex",
              "properties": {
                "regex": "locations/[0-9]+",
                "errorMessage": "The name must start with \"locations/\""
              }
            }
          ],
          "placeholder": "e.g. locations/0123456789"
        }
      ]
    },
    {
      "displayName": "Post Type",
      "name": "postType",
      "type": "options",
      "default": "STANDARD",
      "description": "The type of post to create (standard, event, offer, or alert)",
      "options": [
        {
          "name": "Standard",
          "value": "STANDARD"
        },
        {
          "name": "Event",
          "value": "EVENT"
        },
        {
          "name": "Offer",
          "value": "OFFER"
        },
        {
          "name": "Alert",
          "value": "ALERT"
        }
      ],
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "post"
          ],
          "operation": [
            "create"
          ]
        }
      }
    },
    {
      "displayName": "Summary",
      "name": "summary",
      "type": "string",
      "default": "",
      "description": "The main text of the post",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "post"
          ],
          "operation": [
            "create"
          ]
        }
      }
    },
    {
      "displayName": "Title",
      "name": "title",
      "type": "string",
      "default": "",
      "description": "E.g. Sales this week.",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "post"
          ],
          "operation": [
            "create"
          ],
          "postType": [
            "EVENT"
          ]
        }
      }
    },
    {
      "displayName": "Start Date and Time",
      "name": "startDateTime",
      "type": "dateTime",
      "default": "",
      "description": "The start date and time of the event",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "post"
          ],
          "operation": [
            "create"
          ],
          "postType": [
            "EVENT"
          ]
        }
      }
    },
    {
      "displayName": "End Date and Time",
      "name": "endDateTime",
      "type": "dateTime",
      "default": "",
      "description": "The end date and time of the event",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "post"
          ],
          "operation": [
            "create"
          ],
          "postType": [
            "EVENT"
          ]
        }
      }
    },
    {
      "displayName": "Title",
      "name": "title",
      "type": "string",
      "default": "",
      "description": "E.g. 20% off in store or online.",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "post"
          ],
          "operation": [
            "create"
          ],
          "postType": [
            "OFFER"
          ]
        }
      }
    },
    {
      "displayName": "Start Date",
      "name": "startDate",
      "type": "string",
      "default": "",
      "description": "The start date of the offer",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "post"
          ],
          "operation": [
            "create"
          ],
          "postType": [
            "OFFER"
          ]
        }
      }
    },
    {
      "displayName": "End Date",
      "name": "endDate",
      "type": "string",
      "default": "",
      "description": "The end date of the offer",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "post"
          ],
          "operation": [
            "create"
          ],
          "postType": [
            "OFFER"
          ]
        }
      }
    },
    {
      "displayName": "Alert Type",
      "name": "alertType",
      "type": "options",
      "default": "COVID_19",
      "description": "The sub-type of the alert",
      "options": [
        {
          "name": "Covid 19",
          "value": "COVID_19",
          "description": "This alert is related to the 2019 Coronavirus Disease pandemic"
        }
      ],
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "post"
          ],
          "operation": [
            "create"
          ],
          "postType": [
            "ALERT"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "additionalOptions",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Language",
          "name": "languageCode",
          "type": "string",
          "default": "",
          "placeholder": "e.g. en",
          "description": "The language code of the post content. <a href=\"https://cloud.google.com/translate/docs/languages\" target=\"_blank\">More info</a>.",
          "routing": {
            "send": {
              "type": "body",
              "property": "languageCode"
            }
          }
        },
        {
          "displayName": "Call to Action Type",
          "name": "callToActionType",
          "type": "options",
          "default": "ACTION_TYPE_UNSPECIFIED",
          "description": "The type of call to action",
          "displayOptions": {
            "show": {
              "/postType": [
                "STANDARD",
                "EVENT",
                "ALERT"
              ]
            }
          },
          "routing": {
            "send": {
              "type": "body",
              "property": "callToAction.actionType"
            }
          },
          "options": [
            {
              "name": "Action Type Unspecified",
              "value": "ACTION_TYPE_UNSPECIFIED",
              "description": "Type unspecified"
            },
            {
              "name": "Book",
              "value": "BOOK",
              "description": "This post wants a user to book an appointment/table/etc"
            },
            {
              "name": "Call",
              "value": "CALL",
              "description": "This post wants a user to call the business"
            },
            {
              "name": "Learn More",
              "value": "LEARN_MORE",
              "description": "This post wants a user to learn more (at their website)"
            },
            {
              "name": "Order",
              "value": "ORDER",
              "description": "This post wants a user to order something"
            },
            {
              "name": "Shop",
              "value": "SHOP",
              "description": "This post wants a user to browse a product catalog"
            },
            {
              "name": "Sign Up",
              "value": "SIGN_UP",
              "description": "This post wants a user to register/sign up/join something"
            }
          ]
        },
        {
          "displayName": "Call to Action Url",
          "name": "url",
          "type": "string",
          "default": "",
          "description": "The URL that users are sent to when clicking through the promotion",
          "displayOptions": {
            "show": {
              "/postType": [
                "STANDARD",
                "EVENT",
                "ALERT"
              ]
            }
          },
          "routing": {
            "send": {
              "type": "body",
              "property": "callToAction.url"
            }
          }
        },
        {
          "displayName": "Coupon Code",
          "name": "couponCode",
          "type": "string",
          "default": "",
          "description": "The coupon code for the offer",
          "displayOptions": {
            "show": {
              "/postType": [
                "OFFER"
              ]
            }
          },
          "routing": {
            "send": {
              "type": "body",
              "property": "offer.couponCode"
            }
          }
        },
        {
          "displayName": "Redeem Online Url",
          "name": "redeemOnlineUrl",
          "type": "string",
          "default": "",
          "description": "Link to redeem the offer",
          "displayOptions": {
            "show": {
              "/postType": [
                "OFFER"
              ]
            }
          },
          "routing": {
            "send": {
              "type": "body",
              "property": "offer.redeemOnlineUrl"
            }
          }
        },
        {
          "displayName": "Terms and Conditions",
          "name": "termsConditions",
          "type": "string",
          "default": "",
          "description": "The terms and conditions of the offer",
          "displayOptions": {
            "show": {
              "/postType": [
                "OFFER"
              ]
            }
          },
          "routing": {
            "send": {
              "type": "body",
              "property": "offer.termsConditions"
            }
          }
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "post"
          ],
          "operation": [
            "create"
          ]
        }
      }
    },
    {
      "displayName": "Account",
      "name": "account",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "description": "The Google Business Profile account",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "post"
          ],
          "operation": [
            "delete"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From list",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "searchAccounts",
            "searchable": true
          }
        },
        {
          "displayName": "By name",
          "name": "name",
          "type": "string",
          "hint": "Enter the account name",
          "validation": [
            {
              "type": "regex",
              "properties": {
                "regex": "accounts/[0-9]+",
                "errorMessage": "The name must start with \"accounts/\""
              }
            }
          ],
          "placeholder": "e.g. accounts/0123456789"
        }
      ]
    },
    {
      "displayName": "Location",
      "name": "location",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "description": "The specific location or business associated with the account",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "post"
          ],
          "operation": [
            "delete"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From list",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "searchLocations",
            "searchable": true
          }
        },
        {
          "displayName": "By name",
          "name": "name",
          "type": "string",
          "hint": "Enter the location name",
          "validation": [
            {
              "type": "regex",
              "properties": {
                "regex": "locations/[0-9]+",
                "errorMessage": "The name must start with \"locations/\""
              }
            }
          ],
          "placeholder": "e.g. locations/0123456789"
        }
      ]
    },
    {
      "displayName": "Post",
      "name": "post",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "description": "Select the post to retrieve its details",
      "displayOptions": {
        "show": {
          "resource": [
            "post"
          ],
          "operation": [
            "delete"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From list",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "searchPosts",
            "searchable": true
          }
        },
        {
          "displayName": "By name",
          "name": "name",
          "type": "string",
          "validation": [
            {
              "type": "regex",
              "properties": {
                "regex": "accounts/[0-9]+/locations/[0-9]+/localPosts/[0-9]+",
                "errorMessage": "The name must be in the format \"accounts/123/locations/123/localPosts/123\""
              }
            }
          ],
          "placeholder": "e.g. accounts/123/locations/123/localPosts/123"
        }
      ]
    },
    {
      "displayName": "Account",
      "name": "account",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "description": "The Google Business Profile account",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "post"
          ],
          "operation": [
            "get"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From list",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "searchAccounts",
            "searchable": true
          }
        },
        {
          "displayName": "By name",
          "name": "name",
          "type": "string",
          "hint": "Enter the account name",
          "validation": [
            {
              "type": "regex",
              "properties": {
                "regex": "accounts/[0-9]+",
                "errorMessage": "The name must start with \"accounts/\""
              }
            }
          ],
          "placeholder": "e.g. accounts/0123456789"
        }
      ]
    },
    {
      "displayName": "Location",
      "name": "location",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "description": "The specific location or business associated with the account",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "post"
          ],
          "operation": [
            "get"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From list",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "searchLocations",
            "searchable": true
          }
        },
        {
          "displayName": "By name",
          "name": "name",
          "type": "string",
          "hint": "Enter the location name",
          "validation": [
            {
              "type": "regex",
              "properties": {
                "regex": "locations/[0-9]+",
                "errorMessage": "The name must start with \"locations/\""
              }
            }
          ],
          "placeholder": "e.g. locations/0123456789"
        }
      ]
    },
    {
      "displayName": "Post",
      "name": "post",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "description": "Select the post to retrieve its details",
      "displayOptions": {
        "show": {
          "resource": [
            "post"
          ],
          "operation": [
            "get"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From list",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "searchPosts",
            "searchable": true
          }
        },
        {
          "displayName": "By name",
          "name": "name",
          "type": "string",
          "validation": [
            {
              "type": "regex",
              "properties": {
                "regex": "accounts/[0-9]+/locations/[0-9]+/localPosts/[0-9]+",
                "errorMessage": "The name must be in the format \"accounts/123/locations/123/localPosts/123\""
              }
            }
          ],
          "placeholder": "e.g. accounts/123/locations/123/localPosts/123"
        }
      ]
    },
    {
      "displayName": "Account",
      "name": "account",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "description": "The Google Business Profile account",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "post"
          ],
          "operation": [
            "getAll"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From list",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "searchAccounts",
            "searchable": true
          }
        },
        {
          "displayName": "By name",
          "name": "name",
          "type": "string",
          "hint": "Enter the account name",
          "validation": [
            {
              "type": "regex",
              "properties": {
                "regex": "accounts/[0-9]+",
                "errorMessage": "The name must start with \"accounts/\""
              }
            }
          ],
          "placeholder": "e.g. accounts/0123456789"
        }
      ]
    },
    {
      "displayName": "Location",
      "name": "location",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "description": "The specific location or business associated with the account",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "post"
          ],
          "operation": [
            "getAll"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From list",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "searchLocations",
            "searchable": true
          }
        },
        {
          "displayName": "By name",
          "name": "name",
          "type": "string",
          "hint": "Enter the location name",
          "validation": [
            {
              "type": "regex",
              "properties": {
                "regex": "locations/[0-9]+",
                "errorMessage": "The name must start with \"locations/\""
              }
            }
          ],
          "placeholder": "e.g. locations/0123456789"
        }
      ]
    },
    {
      "displayName": "Return All",
      "name": "returnAll",
      "type": "boolean",
      "default": false,
      "description": "Whether to return all results or only up to a given limit",
      "displayOptions": {
        "show": {
          "resource": [
            "post"
          ],
          "operation": [
            "getAll"
          ]
        }
      }
    },
    {
      "displayName": "Limit",
      "name": "limit",
      "type": "number",
      "default": 20,
      "description": "Max number of results to return",
      "displayOptions": {
        "show": {
          "resource": [
            "post"
          ],
          "operation": [
            "getAll"
          ],
          "returnAll": [
            false
          ]
        }
      },
      "typeOptions": {
        "minValue": 1
      }
    },
    {
      "displayName": "Account",
      "name": "account",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "description": "The Google Business Profile account",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "post"
          ],
          "operation": [
            "update"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From list",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "searchAccounts",
            "searchable": true
          }
        },
        {
          "displayName": "By name",
          "name": "name",
          "type": "string",
          "hint": "Enter the account name",
          "validation": [
            {
              "type": "regex",
              "properties": {
                "regex": "accounts/[0-9]+",
                "errorMessage": "The name must start with \"accounts/\""
              }
            }
          ],
          "placeholder": "e.g. accounts/0123456789"
        }
      ]
    },
    {
      "displayName": "Location",
      "name": "location",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "description": "The specific location or business associated with the account",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "post"
          ],
          "operation": [
            "update"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From list",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "searchLocations",
            "searchable": true
          }
        },
        {
          "displayName": "By name",
          "name": "name",
          "type": "string",
          "hint": "Enter the location name",
          "validation": [
            {
              "type": "regex",
              "properties": {
                "regex": "locations/[0-9]+",
                "errorMessage": "The name must start with \"locations/\""
              }
            }
          ],
          "placeholder": "e.g. locations/0123456789"
        }
      ]
    },
    {
      "displayName": "Post",
      "name": "post",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "description": "Select the post to retrieve its details",
      "displayOptions": {
        "show": {
          "resource": [
            "post"
          ],
          "operation": [
            "update"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From list",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "searchPosts",
            "searchable": true
          }
        },
        {
          "displayName": "By name",
          "name": "name",
          "type": "string",
          "validation": [
            {
              "type": "regex",
              "properties": {
                "regex": "accounts/[0-9]+/locations/[0-9]+/localPosts/[0-9]+",
                "errorMessage": "The name must be in the format \"accounts/123/locations/123/localPosts/123\""
              }
            }
          ],
          "placeholder": "e.g. accounts/123/locations/123/localPosts/123"
        }
      ]
    },
    {
      "displayName": "Make sure that the updated options are supported by the post type. <a target='_blank' href='https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#resource:-localpost'>More info</a>.",
      "name": "notice",
      "type": "notice",
      "default": "",
      "displayOptions": {
        "show": {
          "resource": [
            "post"
          ],
          "operation": [
            "update"
          ]
        }
      }
    },
    {
      "displayName": "Options",
      "name": "additionalOptions",
      "type": "collection",
      "default": {},
      "options": [
        {
          "displayName": "Summary",
          "name": "summary",
          "type": "string",
          "default": "",
          "description": "The main text of the post",
          "routing": {
            "send": {
              "type": "body",
              "property": "summary"
            }
          }
        },
        {
          "displayName": "Language",
          "name": "languageCode",
          "type": "string",
          "default": "",
          "placeholder": "e.g. en",
          "description": "The language code of the post content. <a href=\"https://cloud.google.com/translate/docs/languages\" target=\"_blank\">More info</a>.",
          "routing": {
            "send": {
              "type": "body",
              "property": "languageCode"
            }
          }
        },
        {
          "displayName": "Call to Action Type",
          "name": "callToActionType",
          "type": "options",
          "default": "ACTION_TYPE_UNSPECIFIED",
          "description": "The type of call to action",
          "routing": {
            "send": {
              "type": "body",
              "property": "callToAction.actionType"
            }
          },
          "options": [
            {
              "name": "Action Type Unspecified",
              "value": "ACTION_TYPE_UNSPECIFIED",
              "description": "Type unspecified"
            },
            {
              "name": "Book",
              "value": "BOOK",
              "description": "This post wants a user to book an appointment/table/etc"
            },
            {
              "name": "Get Offer",
              "value": "GET_OFFER",
              "description": "Deprecated. Use OFFER in LocalPostTopicType to create a post with offer content."
            },
            {
              "name": "Learn More",
              "value": "LEARN_MORE",
              "description": "This post wants a user to learn more (at their website)"
            },
            {
              "name": "Order",
              "value": "ORDER",
              "description": "This post wants a user to order something"
            },
            {
              "name": "Shop",
              "value": "SHOP",
              "description": "This post wants a user to browse a product catalog"
            },
            {
              "name": "Sign Up",
              "value": "SIGN_UP",
              "description": "This post wants a user to register/sign up/join something"
            }
          ]
        },
        {
          "displayName": "Call to Action Url",
          "name": "url",
          "type": "string",
          "default": "",
          "description": "The URL that users are sent to when clicking through the promotion",
          "routing": {
            "send": {
              "type": "body",
              "property": "callToAction.url"
            }
          }
        },
        {
          "displayName": "Start Date and Time",
          "name": "startDateTime",
          "type": "dateTime",
          "default": "",
          "description": "The start date and time of the event"
        },
        {
          "displayName": "End Date and Time",
          "name": "endDateTime",
          "type": "dateTime",
          "default": "",
          "description": "The end date and time of the event"
        },
        {
          "displayName": "Title",
          "name": "title",
          "type": "string",
          "default": "",
          "description": "E.g. 20% off in store or online.",
          "routing": {
            "send": {
              "type": "body",
              "property": "event.title"
            }
          }
        },
        {
          "displayName": "Start Date",
          "name": "startDate",
          "type": "string",
          "default": "",
          "placeholder": "YYYY-MM-DD",
          "description": "The start date of the offer"
        },
        {
          "displayName": "End Date",
          "name": "endDate",
          "type": "string",
          "default": "",
          "placeholder": "YYYY-MM-DD",
          "description": "The end date of the offer"
        },
        {
          "displayName": "Coupon Code",
          "name": "couponCode",
          "type": "string",
          "default": "",
          "description": "The coupon code for the offer",
          "routing": {
            "send": {
              "type": "body",
              "property": "offer.couponCode"
            }
          }
        },
        {
          "displayName": "Redeem Online Url",
          "name": "redeemOnlineUrl",
          "type": "string",
          "default": "",
          "description": "Link to redeem the offer",
          "routing": {
            "send": {
              "type": "body",
              "property": "offer.redeemOnlineUrl"
            }
          }
        },
        {
          "displayName": "Terms and Conditions",
          "name": "termsConditions",
          "type": "string",
          "default": "",
          "description": "The terms and conditions of the offer",
          "routing": {
            "send": {
              "type": "body",
              "property": "offer.termsConditions"
            }
          }
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "post"
          ],
          "operation": [
            "update"
          ]
        }
      }
    },
    {
      "displayName": "Operation",
      "name": "operation",
      "type": "options",
      "default": "get",
      "options": [
        {
          "name": "Delete Reply",
          "value": "delete",
          "action": "Delete a reply to a review",
          "description": "Delete a reply to a review",
          "routing": {
            "request": {
              "method": "DELETE",
              "url": "=/{{$parameter[\"account\"]}}/{{$parameter[\"location\"]}}/reviews/{{$parameter[\"review\"].split(\"reviews/\").pop().split(\"/reply\")[0]}}/reply",
              "ignoreHttpStatusErrors": true
            },
            "output": {
              "postReceive": [
                null
              ]
            }
          }
        },
        {
          "name": "Get",
          "value": "get",
          "action": "Get review",
          "description": "Retrieve details of a specific review on Google Business Profile",
          "routing": {
            "request": {
              "method": "GET",
              "url": "=/{{$parameter[\"account\"]}}/{{$parameter[\"location\"]}}/reviews/{{$parameter[\"review\"].split(\"reviews/\").pop().split(\"/reply\")[0]}}",
              "ignoreHttpStatusErrors": true
            },
            "output": {
              "postReceive": [
                null
              ]
            }
          }
        },
        {
          "name": "Get Many",
          "value": "getAll",
          "action": "Get many reviews",
          "description": "Retrieve multiple reviews",
          "routing": {
            "send": {
              "paginate": true
            },
            "operations": {},
            "request": {
              "method": "GET",
              "url": "=/{{$parameter[\"account\"]}}/{{$parameter[\"location\"]}}/reviews",
              "qs": {
                "pageSize": "={{ $parameter[\"limit\"] ? ($parameter[\"limit\"] < 50 ? $parameter[\"limit\"] : 50) : 50 }}"
              }
            }
          }
        },
        {
          "name": "Reply",
          "value": "reply",
          "action": "Reply to review",
          "description": "Reply to a review",
          "routing": {
            "request": {
              "method": "PUT",
              "url": "=/{{$parameter[\"account\"]}}/{{$parameter[\"location\"]}}/reviews/{{$parameter[\"review\"].split(\"reviews/\").pop().split(\"/reply\")[0]}}/reply",
              "ignoreHttpStatusErrors": true
            },
            "output": {
              "postReceive": [
                null
              ]
            }
          }
        }
      ],
      "displayOptions": {
        "show": {
          "resource": [
            "review"
          ]
        }
      },
      "noDataExpression": true
    },
    {
      "displayName": "Account",
      "name": "account",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "description": "The Google Business Profile account",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "review"
          ],
          "operation": [
            "get"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From list",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "searchAccounts",
            "searchable": true
          }
        },
        {
          "displayName": "By name",
          "name": "name",
          "type": "string",
          "hint": "Enter the account name",
          "validation": [
            {
              "type": "regex",
              "properties": {
                "regex": "accounts/[0-9]+",
                "errorMessage": "The name must start with \"accounts/\""
              }
            }
          ],
          "placeholder": "e.g. accounts/0123456789"
        }
      ]
    },
    {
      "displayName": "Location",
      "name": "location",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "description": "The specific location or business associated with the account",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "review"
          ],
          "operation": [
            "get"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From list",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "searchLocations",
            "searchable": true
          }
        },
        {
          "displayName": "By name",
          "name": "name",
          "type": "string",
          "hint": "Enter the location name",
          "validation": [
            {
              "type": "regex",
              "properties": {
                "regex": "locations/[0-9]+",
                "errorMessage": "The name must start with \"locations/\""
              }
            }
          ],
          "placeholder": "e.g. locations/0123456789"
        }
      ]
    },
    {
      "displayName": "Review",
      "name": "review",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "description": "Select the review to retrieve its details",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "review"
          ],
          "operation": [
            "get"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From list",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "searchReviews",
            "searchable": true
          }
        },
        {
          "displayName": "By ID",
          "name": "id",
          "type": "string",
          "validation": [
            {
              "type": "regex",
              "properties": {
                "regex": "^(?!accounts/[0-9]+/locations/[0-9]+/reviews/).*",
                "errorMessage": "The name must not start with \"accounts/123/locations/123/reviews/\""
              }
            }
          ],
          "placeholder": "e.g. ABC123_review-ID_456xyz"
        },
        {
          "displayName": "By name",
          "name": "name",
          "type": "string",
          "validation": [
            {
              "type": "regex",
              "properties": {
                "regex": "accounts/[0-9]+/locations/[0-9]+/reviews/.*$",
                "errorMessage": "The name must start with \"accounts/123/locations/123/reviews/\""
              }
            }
          ],
          "placeholder": "e.g. accounts/123/locations/123/reviews/ABC123_review-ID_456xyz"
        }
      ]
    },
    {
      "displayName": "Account",
      "name": "account",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "description": "The Google Business Profile account",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "review"
          ],
          "operation": [
            "delete"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From list",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "searchAccounts",
            "searchable": true
          }
        },
        {
          "displayName": "By name",
          "name": "name",
          "type": "string",
          "hint": "Enter the account name",
          "validation": [
            {
              "type": "regex",
              "properties": {
                "regex": "accounts/[0-9]+",
                "errorMessage": "The name must start with \"accounts/\""
              }
            }
          ],
          "placeholder": "e.g. accounts/0123456789"
        }
      ]
    },
    {
      "displayName": "Location",
      "name": "location",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "description": "The specific location or business associated with the account",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "review"
          ],
          "operation": [
            "delete"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From list",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "searchLocations",
            "searchable": true
          }
        },
        {
          "displayName": "By name",
          "name": "name",
          "type": "string",
          "hint": "Enter the location name",
          "validation": [
            {
              "type": "regex",
              "properties": {
                "regex": "locations/[0-9]+",
                "errorMessage": "The name must start with \"locations/\""
              }
            }
          ],
          "placeholder": "e.g. locations/0123456789"
        }
      ]
    },
    {
      "displayName": "Review",
      "name": "review",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "description": "Select the review to retrieve its details",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "review"
          ],
          "operation": [
            "delete"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From list",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "searchReviews",
            "searchable": true
          }
        },
        {
          "displayName": "By ID",
          "name": "id",
          "type": "string",
          "validation": [
            {
              "type": "regex",
              "properties": {
                "regex": "^(?!accounts/[0-9]+/locations/[0-9]+/reviews/).*",
                "errorMessage": "The name must not start with \"accounts/123/locations/123/reviews/\""
              }
            }
          ],
          "placeholder": "e.g. ABC123_review-ID_456xyz"
        },
        {
          "displayName": "By name",
          "name": "name",
          "type": "string",
          "validation": [
            {
              "type": "regex",
              "properties": {
                "regex": "accounts/[0-9]+/locations/[0-9]+/reviews/.*$",
                "errorMessage": "The name must start with \"accounts/123/locations/123/reviews/\""
              }
            }
          ],
          "placeholder": "e.g. accounts/123/locations/123/reviews/ABC123_review-ID_456xyz"
        }
      ]
    },
    {
      "displayName": "Account",
      "name": "account",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "description": "The Google Business Profile account",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "review"
          ],
          "operation": [
            "getAll"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From list",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "searchAccounts",
            "searchable": true
          }
        },
        {
          "displayName": "By name",
          "name": "name",
          "type": "string",
          "hint": "Enter the account name",
          "validation": [
            {
              "type": "regex",
              "properties": {
                "regex": "accounts/[0-9]+",
                "errorMessage": "The name must start with \"accounts/\""
              }
            }
          ],
          "placeholder": "e.g. accounts/0123456789"
        }
      ]
    },
    {
      "displayName": "Location",
      "name": "location",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "description": "The specific location or business associated with the account",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "review"
          ],
          "operation": [
            "getAll"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From list",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "searchLocations",
            "searchable": true
          }
        },
        {
          "displayName": "By name",
          "name": "name",
          "type": "string",
          "hint": "Enter the location name",
          "validation": [
            {
              "type": "regex",
              "properties": {
                "regex": "locations/[0-9]+",
                "errorMessage": "The name must start with \"locations/\""
              }
            }
          ],
          "placeholder": "e.g. locations/0123456789"
        }
      ]
    },
    {
      "displayName": "Return All",
      "name": "returnAll",
      "type": "boolean",
      "default": false,
      "description": "Whether to return all results or only up to a given limit",
      "displayOptions": {
        "show": {
          "resource": [
            "review"
          ],
          "operation": [
            "getAll"
          ]
        }
      }
    },
    {
      "displayName": "Limit",
      "name": "limit",
      "type": "number",
      "default": 20,
      "description": "Max number of results to return",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "review"
          ],
          "operation": [
            "getAll"
          ],
          "returnAll": [
            false
          ]
        }
      },
      "typeOptions": {
        "minValue": 1
      }
    },
    {
      "displayName": "Account",
      "name": "account",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "description": "The Google Business Profile account",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "review"
          ],
          "operation": [
            "reply"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From list",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "searchAccounts",
            "searchable": true
          }
        },
        {
          "displayName": "By name",
          "name": "name",
          "type": "string",
          "hint": "Enter the account name",
          "validation": [
            {
              "type": "regex",
              "properties": {
                "regex": "accounts/[0-9]+",
                "errorMessage": "The name must start with \"accounts/\""
              }
            }
          ],
          "placeholder": "e.g. accounts/0123456789"
        }
      ]
    },
    {
      "displayName": "Location",
      "name": "location",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "description": "The specific location or business associated with the account",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "review"
          ],
          "operation": [
            "reply"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From list",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "searchLocations",
            "searchable": true
          }
        },
        {
          "displayName": "By name",
          "name": "name",
          "type": "string",
          "hint": "Enter the location name",
          "validation": [
            {
              "type": "regex",
              "properties": {
                "regex": "locations/[0-9]+",
                "errorMessage": "The name must start with \"locations/\""
              }
            }
          ],
          "placeholder": "e.g. locations/0123456789"
        }
      ]
    },
    {
      "displayName": "Review",
      "name": "review",
      "type": "resourceLocator",
      "default": {
        "mode": "list",
        "value": ""
      },
      "description": "Select the review to retrieve its details",
      "required": true,
      "displayOptions": {
        "show": {
          "resource": [
            "review"
          ],
          "operation": [
            "reply"
          ]
        }
      },
      "modes": [
        {
          "displayName": "From list",
          "name": "list",
          "type": "list",
          "typeOptions": {
            "searchListMethod": "searchReviews",
            "searchable": true
          }
        },
        {
          "displayName": "By ID",
          "name": "id",
          "type": "string",
          "validation": [
            {
              "type": "regex",
              "properties": {
                "regex": "^(?!accounts/[0-9]+/locations/[0-9]+/reviews/).*",
                "errorMessage": "The name must not start with \"accounts/123/locations/123/reviews/\""
              }
            }
          ],
          "placeholder": "e.g. ABC123_review-ID_456xyz"
        },
        {
          "displayName": "By name",
          "name": "name",
          "type": "string",
          "validation": [
            {
              "type": "regex",
              "properties": {
                "regex": "accounts/[0-9]+/locations/[0-9]+/reviews/.*$",
                "errorMessage": "The name must start with \"accounts/123/locations/123/reviews/\""
              }
            }
          ],
          "placeholder": "e.g. accounts/123/locations/123/reviews/ABC123_review-ID_456xyz"
        }
      ]
    },
    {
      "displayName": "Reply",
      "name": "reply",
      "type": "string",
      "default": "",
      "description": "The body of the reply (up to 4096 characters)",
      "displayOptions": {
        "show": {
          "resource": [
            "review"
          ],
          "operation": [
            "reply"
          ]
        }
      },
      "typeOptions": {
        "rows": 5
      }
    }
  ]

operations:
  [
    {
      "operation": "create",
      "name": "Create",
      "description": "Create a new post on Google Business Profile",
      "resource": "post"
    },
    {
      "operation": "delete",
      "name": "Delete",
      "description": "Delete an existing post",
      "resource": "post"
    },
    {
      "operation": "get",
      "name": "Get",
      "description": "Retrieve details of a specific post",
      "resource": "post"
    },
    {
      "operation": "getAll",
      "name": "Get Many",
      "description": "Retrieve multiple posts",
      "resource": "post"
    },
    {
      "operation": "update",
      "name": "Update",
      "description": "Update an existing post",
      "resource": "post"
    },
    {
      "operation": "delete",
      "name": "Delete Reply",
      "description": "Delete a reply to a review",
      "resource": "review"
    },
    {
      "operation": "get",
      "name": "Get",
      "description": "Retrieve details of a specific review on Google Business Profile",
      "resource": "review"
    },
    {
      "operation": "getAll",
      "name": "Get Many",
      "description": "Retrieve multiple reviews",
      "resource": "review"
    },
    {
      "operation": "reply",
      "name": "Reply",
      "description": "Reply to a review",
      "resource": "review"
    }
  ]


