ContributionsMost RecentMost LikesSolutionsRe: Email Sender Snap - HTML Table printing grouped values together Instead of using mapper, I suggest you to use the XML Generator snap together with Apache Velocity. From this dataset we can easily create desired table in mail. Firstly, change Target field in GroupByN snap to "values". After this, use an XML Generator Snap. Make sure your setting are same as below: The following code goes into the XML generator snap. <html> <head> <style> table { width: 100%; } thead th { background: black; color: white; } tbody tr:nth-child(even) { background: #D9D9D9; } td { padding: 5px; } </style> </head> <body> <p>Hi Team, </br> TEST </br> </br> <b> <table> <table border=1> <thead> <tr> <th>DEMO_KEY</th> <th>DEMO_CODE</th> <th>DEMO_DESCRIPTION</th> <th>DEMO_GROUP</th> <th>DEMO_GROUP_2</th> <th>DEMO_COUNTRY</th> </tr> </thead> <tbody> #foreach ( $values in $values ) <tr> <td>$values.DEMO_KEY</td> <td>$values.DEMO_CODE</td> <td>$values.DEMO_DESCRIPTION</td> <td>$values.DEMO_GROUP</td> <td>$values.DEMO_GROUP_2</td> <td>$values.DEMO_COUNTRY</td> </tr> #end </tbody> </table></body></html> Next, just place an Email Sender snap, add your account settings and in the property “Email type” select “HTML text”. Once you set this, just enable the expression for the “Template body” property and use the following expression to remove the “\n” characters. $xml.replaceAll("\n", "") And this is the preview of email that this will generate: Re: Hyperlink URL Error in HTML/XML Generator Somehow, I am unable to upload my slp pipeline which have the solution, but here I am attaching the SS for your reference. <html> <body> <a href="$item.Link_To_SF_CT_Record">Test</a> </body> </html> Re: Hyperlink URL Error in HTML/XML Generator In Pipeline Properties, try putting your URL in double quotes. AWS SQS Acknowledgment getting failed with Token Timeout Error Hi Experts, Use-case: Extract AWS SQS Queues on real-time basis and transfer it to SAP system using API. In order to minimize data-loss, the "Auto-acknowledge" should be disabled in Consumer Snap and AWS Acknowledge is to be used after transferring the data to SAP. This pipeline is an ultra-task as we require real-time data flow. The AWS Account that is used is based on IAM role, in which we have only configured Role ARN and External ID. We are able to successfully connect to AWS SQS and transfer data, however, there is an issue that we are facing here. While establishing the connection from SQS, a security token is generated, which is associated with incoming queues. Now this security token has an expiration time of maximum of 12 hrs. The ultra task works ok for the input coming in first 12 hrs. as the security token is valid, however, after 12th hour, every input coming in gives us below error: Caused by: com.amazonaws.services.sqs.model.AmazonSQSException: The security token included in the request is expired (Service: AmazonSQS; Status Code: 403; Error Code: ExpiredToken; Request ID: 46808b9c-32b2-5193-855b-d4ba552f0395; Proxy: null) The problem here is auto-refresh of security token, which at Snaplogic level doesn't exists. Is there any workaround? I do not want to restart the ultra-task after every 12 hrs. Thanks Re: Creating unique ID's and repeating Solution: I first used group by snap to group userID fields. Next I put a mapper and added a custom encrypted value with expression 'XXXX'+sl.range(4).map(x => "0123456&#X"[Math.round(Math.random()*9)]).join('') Then I added a JSON splitter to split the group and included value of custom encryption. Creating unique ID's and repeating Hello Experts, I have a JSON input looks like this: [ { "id": "0000000", "type": "DUMMY_Payload", "userId": "ABCD1234" }, { "id": "1111111", "type": "DUMMY_Payload_1", "userId": "QWER5678" }, { "id": "2222222", "type": "DUMMY_Payload_2", "userId": "ABCD1234" } ] The ask is that I have to bulk upsert these values to Snowflake DB. However, there is one process that are needed to be conducted: We need to first encrypt userID in custom encryption format like XXXX123, XXXX456 and so on. Any repeating userID will have the same encrypted userID as that of first. Below is an example: ABCD1234 XXXX123 QWER5678 XXXX456 ABCD1234 XXXX123 Does anyone know how to achieve this via Snaplogic in the most optimized way so that the performance should not hamper? Thanks in Advance SolvedRe: Getting Token using private key and certificate bojanvelevski Below is the python files shared to us: import sys import json import msal from cryptography import x509 from cryptography.hazmat.primitives.serialization import load_pem_private_key def print_result(result): if result['access_token']: print(result['access_token']) else: print(result['error']) print(result['error_description']) def read_file(file_path): return open(file_path, "rb").read() # configuration file is passed via: # py Azure\ Certificate\ Authentication.py Azure\ Certificate\ Authentication.json config = json.load(open(sys.argv[1])) # get private key from pfx file private_key_path = config["private_key_path"] certificate_path = config["certificate_path"] private_key = load_pem_private_key(read_file(private_key_path), None) certificate = x509.load_pem_x509_certificate(read_file(certificate_path)) # create application for access token request app = msal.ConfidentialClientApplication( config["client_id"], authority=config["authority"], client_credential={ "thumbprint": config["thumbprint"], "private_key": private_key} ) result = None # request access token from cache print("Request access token from cache.") result = app.acquire_token_silent(config["scope"], account=None) # request access token from aad if not result: print("No access token in cache exists.\nRequest access token from AAD.") result = app.acquire_token_for_client(scopes=config["scope"]) print_result(result) Re: Getting Token using private key and certificate bojanvelevski I can not share the files on this public post. Please check your Private Message. I have sent you on Monday. Getting Token using private key and certificate Hello Experts, I have a technical requirement as follows: 1. Get Token using information : authority, client_id, scope, thumbprint, endpoint, private key and certificate (.pem) 2. Pass token as flat in the next SOAP request. My query is how can I achieve this via Snaplogic? They have provided me screenshots of cmd prompt where they used python, java and .NET in order to achieve this. Thanks in Advance Re: Filtering out an Array Hello koryknick I am attaching 2 different input and their respective outputs. Please note that the filter is suppose to happen at "T_FILE_DAT.FILE_TYPE". I have to only pass value of T_FILE_DAT.C_ID where T_FILE_DAT.FILE_TYPE.value.str == tif or TIF