GetConnectorInfo
The GetConnectorInfo action retrieves information about a specific connector. It returns a connector object containing configuration details such as settings, provider, and other connector-level fields. If no matching connector is found, it returns an empty/falsy value.
GetConnectorInfo(
integrationIdn: str,
connectorIdn: str,
field: str | None = None
)
Where:
- integrationIdn: The integration identifier (e.g.,
"newo_voice","twilio_messenger","newo_chat"). - connectorIdn: The connector identifier (e.g.,
"newo_voice_connector","sms_connector"). - field: (Optional) A specific field to retrieve from the connector info. If omitted, the entire connector object is returned.
Example 1 (Get Specific Field)
{{Set(name="provider", value=GetConnectorInfo(integrationIdn="newo_voice", connectorIdn="newo_voice_connector", field="provider"))}}
{{SendMessage(message=provider)}}The above code snippet retrieves the provider field from the Newo Voice connector.
Example 2 (Get Full Connector Object)
{% set connector_info = GetConnectorInfo(integrationIdn="newo_chat", connectorIdn="newo_chat") %}
{{SendMessage(message=connector_info.settings.channel)}}The above code snippet retrieves the full connector info object and accesses the channel setting.
Example 3 (Check if Connector Exists)
{% if GetConnectorInfo(integrationIdn="twilio_messenger", connectorIdn="sms_connector") %}
{{SendMessage(message="SMS connector exists.")}}
{% else %}
{{SendMessage(message="SMS connector not found.")}}
{% endif %}The above code snippet checks whether a specific connector exists before proceeding.
Updated 4 days ago
