ContributionsMost RecentMost LikesSolutionsRe: How to convert a MS Word file to PDF Hi AgronBauta , Parsing Word documens is tricky, since most of the file structures produced from the Office pallete, are archives. You can use a zip file read that will produce a bunch of xml documents. The one you're looking for is word/document.xml. Be mindful that you'll get the data as an xml structure, so you'll need to parse it into JSON. The data structure is complex at this point, so you'll have to spend some time understanding it. Once you achieve the data mapping you want, simply use PDF Formatter and File Writer to write down the file. This is a very hacky solution, and will only be possible if the word file is plain-ish, flat looking. It would be more effective if you look into some API for converting, or even a Custom Snap. I hope this gives you enough insights so you can decide how to proceed further. If you need any more information, let me know. Regards, Bojan Re: Need Guidance on Dynamic Excel File Generation and Email Integration Hi Ranjith , If you split your array, the data will continue to flow like individual documents. From there, you can use Group By to construct the data you want to pass into the Excel file. Those arrays wil travel into a child pipeline, where you'll create the Excel files. Write them in a folder in SLDB for example. The rest is easy, loot through that folder, and attach those files into an Email Sender snap. Let me know if this helps, or if I'm missing something so you need a different logic. Regards, Bojan Re: Multipart Reader failure - 'content-type' was not found import requests url = "https://MyURL.com?bearer_token=abc123" files=[ ('file',('fileName.png',open('file.png','rb'),'image/png')) ] headers = {} response = requests.request("POST", url, headers=headers, files=files) print(response.text) Try this. The first argument in the file line should be the target filename you want to use. Let me know if this helps. Regards, Bojan Re: Multipart Reader failure - 'content-type' was not found How do you send the name via Postman? Re: Multipart Reader failure - 'content-type' was not found Hi jfpelletier, The problem is that in the Python script, you're not just sending the file as multi part form data, you're also sending a content, a payload saying {'fileName': 'fileName.jpg'}. You basically send 2 different payloads JSON and Binary (the very image itself). When the multipart reader snap collects your request, it pulls the JSON first: And that document doesn't have a content-type attached to it, so your next snap, the binary router, is failing. Basically, your request from Postman is not sending an additional payload to change the name of the target file, that's why it is passing successfully. Just remove the data=payload part of the request in the script and you'll get the same result in the Postman request. I hope this helps. If not, let us know. Regards, Bojan Re: How to Safely Append New Blackout Datetime to Pipeline Schedule Without Overwriting Existing Ones? I think you won't have any problems with mapping the blackout_dates since the field is already present even though no blackout dates are configured in the task, but anyways: $schedule.repeat.blackout_dates.concat([ "2025-06-04","2025-06-05"]) Regards, Bojan Re: How to Safely Append New Blackout Datetime to Pipeline Schedule Without Overwriting Existing Ones? Hi SL12345 , Map your blackout dates in the following format and with the following expressions: [].concat($schedule.repeat.get('blackout_datetimes') == null ? [] : $schedule.repeat.blackout_datetimes ,[{startDate:"2025-06-04",startTime:"00:00",endDate:"2025-06-05",endTime:"00:00"}]) You always start with an empty array, followed by a concat function with 2 arguments, the blackout_datetimes , which is extended with a ternary expression to check whether the array exists or not, and the blackout date times array you want to add. This will safely update your blackoud dates with any overwriting of the previous ones. Let me know if this helps. Regards, Bojan Re: Join Snap Left Path reading from right input view. I wouldn't say the snap is mixing the inputs but one of the input documents is missing the field you have stated in the snap. To confirm that, you can use a router with $Worker_Document_Data.hasPath('ID') and !$Worker_Document_Data.hasPath('ID'). That way you will see if one (or more) documents go to the other output. Additionally you can write it down to a file to check which record is that. Regards, Bojan Re: How do I send a null value in a SOAP execute? Hi cronima, Try putting the following text in the envelope: ***NO DATA*** Regards, Bojan Re: Convert to XML while updating headers Hi Max, Split the headers from the body (payload) by using router snap. Do the conversion on the body to XML, and join the data back. You can achieve this with a child pipeline to keep the payload and headers related. Regards, Bojan
GroupsPartner User Group This area is for our partners to communicate with each other and with the SnapLogic Alliances team.0 Posts
Partner User Group This area is for our partners to communicate with each other and with the SnapLogic Alliances team.0 Posts