ContributionsMost RecentMost LikesSolutionsRe: Transforming JSON Output to Payload for Slack App Hey @Soni37 That’s an exceptional solution! It functions flawlessly and exhibits a remarkable elegance in its relative simplicity. I didn’t think it could be done with so little code and so few snaps! I initially tried utilizing the Group By N snap, but I couldn’t quite grasp how to utilize the output to achieve my desired outcome. Your inclusion of “group.map” in the mapper function was the missing piece that I needed! Thanks and regards, Scott Re: Transforming JSON Output to Payload for Slack App I successfully managed to get the pipeline functioning by utilizing FTP snaps and a Unix Snap to execute a Perl script I developed for the transformation process. However, I am still curious about achieving the same outcome within Snaplogic itself. I attempted using Script snaps with Javascript or Python, but encountered numerous errors that I believe were caused by how the Script snaps implement those languages. It seems that I frequently find myself needing to rely on external tools instead of utilizing Snaplogic for such processing tasks. I would appreciate exploring how this could have been accomplished within Snaplogic, both with and without the use of a Script snap. I uploaded sample files with what is to be transformed (sample_incomming_data.json) and what it is to be transformed to (sample_output_payload.json). sample_incomming_data.json (4.3 KB) sample_output_payload.json (7.2 KB) For reference I also uploaded the Perl script that I wrote that successfully does the transformation (transform.pl.txt). This uses the Perl JSON module so I had to install it: sudo yum install perl-JSON transform.pl.txt (2.7 KB) Scott Transforming JSON Output to Payload for Slack App I have a pipeline that outputs a json file that I would like to reformat into a payload for a Slack webhook app. It’s for an outlist and the json output list a person’s fullName with startDate and endDate and duration for the absence. The payload would have a header and footer that the data needs to be between. { “absenceType”: “Vacation”, “endDate”: “Fri, 19 May”, “startDate”: “Fri, 19 May”, “fullName”: “Kimberly Smith”, “duration”: 7 }, { “absenceType”: “Vacation”, “endDate”: “Mon, 22 May”, “startDate”: “Tue, 23 May”, “fullName”: “Kimberly Smith”, “duration”: 14 }, { “absenceType”: “Vacation”, “endDate”: “Fri, 26 May”, “startDate”: “Fri, 26 May”, “fullName”: “Kimberly Smith”, “duration”: 7 }, I want data like the above to be transformed into a payload to look like the following which includes the header and footer that I mentioned. Please note how multiple day absences have different text than single day absences and although this sample data only shows one person one persons absences, there will be multiple people: { “channel”: “#snl-out-list”, “blocks”: [ { “type”: “section”, “text”: { “type”: “mrkdwn”, “text”: “Absences within the next 7 days:” } }, { “type”: “section”, “text”: { “type”: “mrkdwn”, “text”: “ :palm_tree: Kimberly Smith*” } }, { “type”: “section”, “fields”: [ { “type”: “mrkdwn”, “text”: “• Fri, 19 May:7 hours:Vacation” } ] }, { “type”: “section”, “fields”: [ { “type”: “mrkdwn”, “text”: “• Mon, 22 May to Tues, 23 May:14 hours*:Vacation” } ] } { “type”: “section”, “fields”: [ { “type”: “mrkdwn”, “text”: “• Fri, 26 May:7 hours:Vacation” } ] } ], “username”: “My Bot” } SolvedRe: Jsonpath - how to use parameters or variables inside a jsonpath Thank you! Your solution worked perfectly! I had tried something like that before and it failed. It was probably my syntax but your syntax worked on the first try! Jsonpath - how to use parameters or variables inside a jsonpath Using jsonpath as the expression in a mapper snap the following works: jsonPath($, “$entity.items[?(@.AssignmentNumber==‘E3163300-2’)].links[*]”).find(x=>x.name == ‘assignedPayrolls’).href I want to pass in the assignment number from a parameter but this doesn’t seem to work: jsonPath($, “$entity.items[?(@.AssignmentNumber=='_AssignmentNumber)].links[*]”).find(x=>x.name == ‘assignedPayrolls’).href This is with parameter _AssignmentNumber set to the value that works which is ‘E3163300-2’ How can I get jsonpath to work with parameters or variables? SolvedHow to add to header in REST Post Snap I need to add something like the following to the REST Header In a REST Post Snap. How do I do this? effective-Of : RangeStartDate=2021-06-17 Thanks, Scott Re: Move/renaming files on SFTP server Hi Michael, Yes. I found that the “File Operation” snap with “Move” as the operation worked for me: Regards, Scott Re: How to write the contents a SOAP response attachment to a file? I found the problem! I just needed to add a Document to Binary snap with DECODE_BASE64. Thanks! Re: How to write the contents a SOAP response attachment to a file? Your solution looks good but I’ve been unable to get a readable file using it. I assume that I don’t have the right content type. I’ve tried “zip” and it doesn’t work so something must be wrong. What are good ways to determine what file type I should use? Thanks! Re: How to write the contents a SOAP response attachment to a file? SOAP_downloadESSJobExecutionDetails output0.txt (8.7 KB)