Introduction
By allowing a Python script to run in the flow, you can perform more complex operations and manipulations of data without relying solely on the JSON API. Additionally, Python has built-in libraries for compressing data, which could help with the response size limitation.
Usage Notes
1. With the Advanced Script Node, you can leverage the full potential of Python to interact with external systems, perform intricate operations, and modify data according to your specific requirements. Whether you need to connect to APIs, handle webhooks, process data from different sources, or implement custom business logic, the Advanced Script Node empowers you to achieve these tasks efficiently and effectively.
2. By utilizing the flexibility and extensive libraries of Python, you can create sophisticated workflows that integrate with various external services, process complex data structures, and implement complex algorithms. This flexibility opens up endless possibilities for customization and automation, allowing you to tailor your SaaS solution to meet the unique needs of your business and users.
3. The Advanced Script Node acts as a bridge between your SaaS platform and the external world, enabling seamless communication and data transformation. Harnessing the power of Python within the Advanced Script Node provides you with a versatile toolkit to tackle intricate integration challenges, perform advanced data manipulation, and ensure seamless interoperability with other systems.
4. By leveraging the capabilities of the Advanced Script Node and the Python language, you can unlock the full potential of your SaaS solution, expand its functionality, and deliver an exceptional user experience to your customers.
Setup
- To access this node, enable an entitlement for it using your MA (master admin) account.
2. MA(master admin) can go to your Meta Humans bot platform account and under the bot builder section, click on the ‘Add Node’ button. Then go to the ‘Process and Flow’ node category.
3. Once you click on the ‘Advanced Script’ node, you’ll be displayed 3 options as below:
a. Code
Insert your Python code under this section.
b. Default Error Message
Enter a prompt message to be displayed to the user in case of script failure.
c. Initialize Variables
Once you click the 'Initialize Variables' button, any variables declared within your script will be automatically displayed.
To check the script validity, input an attribute value and click the 'Validate' button. The correct script will activate the functions accordingly. In case of an error, it would be displayed under the code section.
In case of additional variables, you can click on the ‘Add’ button and initialize it.
Sample Use Case
Use case: Sending a WhatsApp template message
Script:
Output: