> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# Find Subscribers

- Component: `appmixer.manychat.core.FindSubscribers`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.manychat 1.0.0](https://connectors.appmixer.com/connector/appmixer.manychat/1.0.0.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.manychat/1.0.0/component/appmixer.manychat.core.FindSubscribers>

Find Manychat subscribers by full name, email, phone or the value of a Text or Number custom field. Returns up to 100 subscribers; email and phone match one subscriber.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Search By (`searchBy`) | select | - |
| Search Value (`searchValue`) | text | The full name, the email address, the phone number (for example `+15550100123`) or the custom field value to match. |
| Custom Field (`fieldId`) | text | Required when Search By is Custom Field. Only Text and Number custom fields can be searched. |
| Output Type (`outputType`) | select | Choose whether you want to receive the result set as one complete list, or first item only or one item at a time or stream the items to a file. |

## Output ports

### Port `out`

Variables are loaded dynamically from `/component/appmixer/manychat/core/FindSubscribers?outPort=out&ignoreAuth=true`.

### Port `notFound`

_No fields defined for this port._

## Full metadata (component.json)

```json
{
  "name": "appmixer.manychat.core.FindSubscribers",
  "label": "Find Subscribers",
  "description": "Find Manychat subscribers by full name, email, phone or the value of a Text or Number custom field. Returns up to 100 subscribers; email and phone match one subscriber.",
  "author": "Appmixer <info@appmixer.com>",
  "version": "1.0.0",
  "auth": {
    "service": "appmixer:manychat"
  },
  "quota": {
    "manager": "appmixer:manychat",
    "resources": "requests",
    "scope": {
      "userId": "{{userId}}"
    }
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "searchBy": {
            "type": "string",
            "enum": [
              "name",
              "email",
              "phone",
              "customField"
            ]
          },
          "searchValue": {
            "type": "string"
          },
          "fieldId": {
            "type": "string"
          },
          "outputType": {
            "type": "string"
          }
        },
        "required": [
          "searchBy",
          "searchValue"
        ]
      },
      "inspector": {
        "inputs": {
          "searchBy": {
            "type": "select",
            "index": 1,
            "label": "Search By",
            "defaultValue": "email",
            "options": [
              {
                "label": "Full Name",
                "value": "name"
              },
              {
                "label": "Email",
                "value": "email"
              },
              {
                "label": "Phone",
                "value": "phone"
              },
              {
                "label": "Custom Field",
                "value": "customField"
              }
            ]
          },
          "searchValue": {
            "type": "text",
            "index": 2,
            "label": "Search Value",
            "tooltip": "The full name, the email address, the phone number (for example <code>+15550100123</code>) or the custom field value to match."
          },
          "fieldId": {
            "type": "text",
            "index": 3,
            "label": "Custom Field",
            "source": {
              "url": "/component/appmixer/manychat/core/ListCustomFields?outPort=out",
              "data": {
                "messages": {
                  "in/outputType": "array"
                },
                "properties": {
                  "isSource": true
                },
                "transform": "./ListCustomFields#toSelectArray"
              }
            },
            "tooltip": "Required when Search By is Custom Field. Only Text and Number custom fields can be searched."
          },
          "outputType": {
            "type": "select",
            "index": 4,
            "label": "Output Type",
            "defaultValue": "array",
            "tooltip": "Choose whether you want to receive the result set as one complete list, or first item only or one item at a time or stream the items to a file.",
            "options": [
              {
                "label": "First Item Only",
                "value": "first"
              },
              {
                "label": "All items at once",
                "value": "array"
              },
              {
                "label": "One item at a time",
                "value": "object"
              },
              {
                "label": "Store to CSV file",
                "value": "file"
              }
            ]
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "source": {
        "url": "/component/appmixer/manychat/core/FindSubscribers?outPort=out&ignoreAuth=true",
        "data": {
          "properties": {
            "generateOutputPortOptions": true
          },
          "messages": {
            "in/searchBy": "email",
            "in/searchValue": "dummy",
            "in/outputType": "inputs/in/outputType"
          }
        }
      }
    },
    {
      "name": "notFound"
    }
  ],
  "icon": "(data URI omitted)"
}
```
