SmClick icon

SmClick

Consume SM Click API

Overview

This node integrates with the SM Click API to perform various messaging and contact management operations. Specifically, for the Create Contact operation, it allows users to add a new contact to their SM Click instance by providing the contact's name, phone number, optional tags, and the instance ID.

Common scenarios where this node is beneficial include:

  • Automating the addition of new contacts collected from forms or other sources into the SM Click system.
  • Organizing contacts with tags for targeted messaging campaigns.
  • Managing contact lists programmatically within workflows.

Example use case: After capturing a lead's information via a web form, you can use this node to automatically create a contact in SM Click, tagging them appropriately for future communication.

Properties

Name Meaning
Name The full name of the contact to be created.
Phone Number The contact's phone number in international format (e.g., +1234567890).
Tags Optional UUID(s) representing tags to assign to the contact. Leave empty for default tag.
Instance ID Identifier of the SM Click instance where the contact will be created.

Output

The node outputs an array of JSON objects, each representing the result of creating a contact. Each object includes:

  • success: A boolean indicating if the operation was successful.
  • operation: The operation performed, here always "createContact".
  • Additional fields returned by the SM Click API response, which typically include details about the created contact.

No binary data output is produced by this operation.

Dependencies

  • Requires an active connection to the SM Click API.
  • Needs an API key credential configured in n8n for authentication.
  • The node expects the base URL of the SM Click API and the API key to be provided via credentials.
  • Network access to the SM Click API endpoint must be available.

Troubleshooting

  • Common issues:

    • Invalid or missing API key: The node will fail to authenticate with the SM Click API.
    • Incorrect instance ID: The API may reject requests if the instance ID does not exist or is invalid.
    • Malformed phone numbers: Ensure phone numbers are in correct international format.
    • Tag UUIDs that do not exist: Using invalid tag IDs may cause the API to reject the request.
  • Error messages:

    • SM Click API error: <message>: Indicates an error response from the SM Click API. The message provides details such as authentication failure, validation errors, or other API-level issues.
  • Resolution tips:

    • Verify API key and instance ID correctness.
    • Confirm phone number formatting.
    • Check tag UUID validity or leave empty to use the default tag.
    • Review network connectivity to the SM Click API.

Links and References

Discussion