Overview
The Lola Profile v2 node manages user profile data within the Lola system. It supports operations to get, set, delete, or flush a user's profile based on a unique channel identifier. This node is useful in workflows where you need to retrieve or update customer information, manage contact/payment method lists, or handle user metadata for automation, onboarding, support, or sales processes.
Practical examples:
- Retrieve a user's profile to personalize communication.
- Update a user's contact details and payment methods after a form submission.
- Delete a user's profile upon account closure.
- Generate text representations of contacts/payment methods for use in NLP (Natural Language Processing) tasks.
Properties
| Name | Meaning |
|---|---|
| ChatId | Used along with tokens data tenantId and channelId to identify the user channel. Required. |
| Operation | Selects the action to perform: - Get: Get a profile - Set: Set a profile (create if not exists, update if exists) - Delete: Delete profile from cache and database - Flush Cache: Flush profile from cache |
| Customer Status | Customer status (e.g., sales, onboarding, support, etc). Only used when Operation is "Set". |
| Flow Status | States related to the flow (e.g., scan_id, selfie, etc). Only used when Operation is "Set". |
| First Name | Customer's first name. Only used when Operation is "Set". |
| Last Name | Customer's last name. Only used when Operation is "Set". |
| Phone Number | User's phone number to set in profile. Used in both "Get" and "Set" operations. |
| Country | User's country to set in profile. Only used when Operation is "Set". |
| Language | User's language to set in profile. Only used when Operation is "Set". |
| User's email to set in profile. Only used when Operation is "Set". | |
| Contacts | Contacts object array to set in profile. Format: {fullName, phone, country, relationship}. Only used when Operation is "Set". |
| Payment Methods | Payment Methods object array to set in profile. Format: {name}. Only used when Operation is "Set". |
| Hidden Payment Methods | Hidden Payment Methods object array to set in profile. Format: {name}. Only used when Operation is "Set". |
| Enable Text Representation | Whether to enable text representation of contacts and payment methods for NLP. Required. |
| Contact Item Text Pattern | Text pattern using placeholders ({fullName}, {phone}, {country}, {relationship}) to represent a contact. Shown only if "Enable Text Representation" is true. |
| Payment Method Item Text Pattern | Text pattern using placeholder ({name}) to represent a payment method. Shown only if "Enable Text Representation" is true. |
| Metadata | Key-value pairs to set as metadata in the profile. Only used when Operation is "Set". |
Output
- The node outputs an object in the
jsonfield under the keylola_profilev2. - The structure of
lola_profilev2depends on the operation:- For Get: Contains the retrieved profile data. If the profile is new, it is routed to a separate output.
- For Set: Contains the updated/created profile data.
- For Delete/Flush Cache: Not explicitly detailed, but errors are routed to a dedicated output.
- If "Enable Text Representation" is enabled and a profile is present, additional fields are added to the profile:
nlp_contacts: An object with:list: Array of contact strings generated from the provided pattern.text: Concatenated string of all contacts.
nlp_payment_methods: An object with:list: Array of payment method strings generated from the provided pattern.text: Concatenated string of all payment methods.
Example output:
{
"lola_profilev2": {
"profile": {
"firstName": "John",
"lastName": "Doe",
"contacts": [
{ "fullName": "Jane Smith", "phone": "+1234567890", "country": "US", "relationship": "friend" }
],
"paymentMethods": [
{ "name": "Visa" }
],
"nlp_contacts": {
"list": ["Jane Smith (+1234567890, US, friend)"],
"text": "Jane Smith (+1234567890, US, friend)\n"
},
"nlp_payment_methods": {
"list": ["Visa"],
"text": "Visa\n"
}
},
"status": "exists"
}
}
- The node has three outputs:
- Existing profiles or successful set results.
- New profiles (when status is
"new"). - Errors (if any occur during set).
Dependencies
- May require a credential named lolaKeyApi (not always required).
- Relies on external Lola API endpoints via helper functions.
- No specific n8n environment variables are mentioned, but access to the Lola backend/API is necessary.
Troubleshooting
Common issues:
- Missing or invalid ChatId: The node requires a valid ChatId; missing this will cause errors.
- Invalid input formats: JSON fields like Contacts or Payment Methods must be correctly structured.
- API connectivity issues: If the Lola backend is unreachable or credentials are incorrect, the node may fail.
- Pattern errors: If text patterns for contacts/payment methods are malformed, the output may not be as expected.
Error messages:
- Errors during the "Set" operation are routed to the third output and include the error object in
lola_profilev2. - Console logs (visible in n8n logs) provide context such as "Set Profile Error ..." or "getProfileV2 chatId: ...".
How to resolve:
- Ensure all required fields are filled, especially ChatId.
- Validate JSON structures for contacts and payment methods.
- Check Lola API credentials and network access.
- Review text patterns for correct placeholder usage.
Links and References
- n8n Documentation
- Internal Lola API documentation (if available within your organization)
- For pattern syntax, refer to the node's property descriptions or consult your Lola system administrator.