PDF Generator API - Live Coding Happy Hour for 2021-04-23
[Music] so [Music] hello and welcome to live coding happy hour for this fantastic april 23rd 2021 i'm your host andrew barnes here with an awesome crew of folks uh to do some live coding on servicenow with you today so our completely unscripted uh show is about to get started and to get rolling let's have brad introduce himself hello everybody my name is brad tilton and i am a developer advocate with the developer program here at servicenow i've been developing on servicenow since about 2008 as a customer partner and now servicenow employee and i'm excited about today's show and the crew we have on awesome thanks brad how about you jared hey good morning good afternoon i'm jared mont vp of engineering at clear sky working on the development teams and the devops processes and uh yeah looking forward to it and and proud new uh teammate of a of another developer mvp so you're a developer and vp and you just hired another developer mvp onto your team this week i believe it's true yeah yeah being part of the developer mvp program is just the gift that keeps on giving with the uh the the technical knowledge and the networking and and yeah and now we have uh two yeah shout out to gabby for accepting our offer awesome and uh special guest david introduce yourself hi i'm david miller i write i'm a technical writer at servicenow been here about uh two and a half years and i specialize in the api documentation and i wrote the uh api documentation for the apis we're going over today the document and the pdf generation api oh we're so excited to have you here uh david and um thank you for joining us uh uh multi multi-show guest jared uh i'm andrew barnes also developer advocate here at servicenow i've been working on the platform for about seven years um a couple of times as a customer as enterprise architect and platform owner and an implementation partner uh hilariously uh back when jared and i worked together at the same 2016 yeah at the same implementation partner we never did any projects there together but we were in the same uh same same small group it was a you know small cadre of us there um so uh we're so excited to have everyone here um before we get into what we're doing in the show let's introduce our sidekicks on the show let's introduce the beverages brad what did you bring to the table today i have a i went travis beer today i have a chamele i will not drink this whole thing on the show it's one one pint 10 ounces so yeah wow and same order jared what what did you bring today you know i'm not much for beer or wine so i brought a cold brew coffee with oat milk this is one i haven't tried yet it's maple flavored [Music] david what what did you uh mosey up on with i brought old uh old red eye root beer i don't know if you can see that so if you put it in front of yourself then there you go yes here we go that's how it works fancy root beer yes i like it nice it comes with a bit of a lore on it it says legend has it there was a craggy old ball named red eye with a glint in a gnarly attitude he could only be coaxed for his pen to do his daily duties when a brave soul would open a bottle of his favorite root beer pour it in his tin bowl then run like heck before being stomped nice sounds good to me that's true and i have got an imperial stout today uh from uh momentum in grand norcur and i'm kind of excited about that i it's it's uh awesome to have uh an equal balance of the alcoholic and non-alcoholic on the show today i i kind of like that yeah um we we don't discriminate against our drinks we like all of the beverages well we rate them so sometimes we don't like them but all the varieties are welcome uh so a couple of announcements we've got creatorcon knowledge2021 right around the corner um so the uh scheduler is the library is up and available uh knowledge.servicenow.com um the uh the first thing in the agenda is near and dear to brad and maya's heart which is the hackathon so brad was the organizer of last year's hackathon and i'm the organizer of this year's hackathon and we are very excited to have anyone uh participate in the hackathon so if you're watching this no matter your skill level you're already interested enough to be a good person to join the hackathon so go type hackathon in knowledge.servicenow.com i'll also have a link in the description uh to to get details uh on that um and that will be on may 8th so it's it's coming up fast uh so go go register and create or join a team and we love to have you there and we'll be doing uh live coding during the event so we're gonna kick it off with a special live coding happy hour episode which is already posted to youtube so you can go ahead and and find that one and and set up a special notification just for that one um and then uh we'll be building an app brad chuck and i uh and maybe some other special guests we get we'll we'll be building a special app during that um other than that uh you know come see us at developer.servicenow.com uh brad has got some wonderful blogs on ui builder and the now experience and speaking of developer.servicenow.com that's also where we host all of the apis that david helps write and publish for you the servicenow developer and brad why don't you tell us a little bit about what we're going to do today and then we'll get right into the screen share yeah so today we are going to use the pdf generation api and what we want to do is we want to take uh like this html certificate template and we want to create personalized pdfs uh with that certificate so i'm gonna have a list of people we've got this html we want to put them together and generate some pdfs and we can do that pretty easily with the api now so we're gonna take a look at the app and then we'll write a flow designer action that kind of does all of our magic for each of our users but before we get into that i think we're going to look at the apis themselves a little deeper awesome well let's um go ahead and start the screen share then i'm excited let's go do it i love building things i will share my screen now all right hello brad this is me hello brad look at you so i'm going to develop first of all and we're going to take a look at uh some of the apis so i'm going to click into this but i'm going to turn it over to david to talk a little bit about the apis if you are ready for that david sure um yeah i think you need to be in server scripts have you select server script server scope sorry and why don't you blow up just one step for me brad how about this i think that looks good thank you sir okay and it'll be under the pdf gen if you type in pdf gen it'll come right up i think so this is the overall generator utils yeah and that's so both of the apis uh the starting points for the apis i consider that pdf uh generation api uh which is if you scroll down through that menu you'll find it i you might actually be able to type it in there and it will come up there it is cool it got thrown off because you need the eye to to differentiate oh yeah we're from here and here yep so i had to i had to type in more than i normally do but it's there okay so if you click that that'll open the the pdf generation api and uh i'll show you the basis so what this allows you to do is generate pdfs from html using either those two convert to pdf methods one as you know it'll make a basic pdf with convert to pdf and the next one down that says convert to pdf with header footer uh gives you advanced uh options like uh layout uh page size and setting you know enumeration or uh the the margins as well there we go yeah when i was looking at this uh the normal one so can you do like uh page sizing and everything through the regular one or is it sorry the um the non-header footer or do you need that was just a basic letter okay i believe that's just a basic portrait letter pdf you'll make with that and so the header footer allows you to pass in things like page size yeah okay cool so it's it's it's almost you know it's pretty similar but it gives you all that all these other options it also has methods that i'll let you feel fields uh you can fill fields and save that or lock the pdf or flatten it so that you know it can't be edited yeah when i when i was looking at this it seemed for the so for today's show we're going to really focus on the convert to pdf so creating a pdf from html but when i was looking at the filled document fields that looked like there could be a use case where you know maybe you've got a you know your company has this pdf uh that has a bunch of fields in it that you have to send off to a vendor and you don't want to make people fill that out you'd rather have them fill out a catalog item so with this you could take their answers to the catalog item insert them into those pdf fields generate it and then send that off to somebody i don't we don't we don't have a great use case for it but i think that use case uh exists out there yeah and hr and grc are like the big users that i know as when i when i was customer that that makes it a lot of sense for the uh the fill one um like that yeah just easy peasy like yes uh we we want to uh you know bring this into the electronic world as much as possible uh but we still need these forms to be you know filled out the way they need to be done so uh a w-2 for example is a really good example so that's a fillable pdf form that you know you can bring into the system um and and populate a bunch of data to it but it it really does need to be in that exact form or it's invalid so it has to be that way it can't just be an electronic form so uh we were going to um so in the the developer site and the api documentation um you know the our documentation team like david has done a really good job of uh you know providing examples and we were going to take one of those and run it real quick before we get to our use case right which one did we want to use david that was going to be for the document api that's another suite of pdf generating apis it's under the same document if you just type document there it should pop right up um maybe space api there you go that's it that's the one ah okay so this one if if you actually copy that and put it in an incident um cis id yeah um just uh there's a there's a button at the top brad that'll copy that whole thing for you why why is it not there where is it i think it's right there at the top it lied to me it's there every time i go there if you go to the uh the table api it'll probably list the same thing with the the copy on it all right ah so we're gonna copy that disappointing the unique case i'll have to get that fixed because put it somewhere it should have a copy button at the top there let's find an incident and let's find this atf incident we'll take its id where did you go does this work there it is oh move there slash bg i couldn't remember it was it's be something i couldn't remember which one all right so i have a sis id here of an incident uh we have the incident table uh and we're gonna name the pdf but do we want to so before we run this script we should probably look at what it's what it is [Laughter] uh so it looks like we're uh you know setting some parameters for the generator utils those all make reasonable sense to me uh we're querying the incident table and then so then we're calling it yeah and then passing in this looks like sizing of some sort 70 and 200. yep those are the column sizes okay api so the table api is listed separately uh as a class but it's still i consider part of this api so it's all grouped in the example got it okay yeah and then setting the background and some alignment and some styles and then we want number and short description are the fields that we're putting into a paragraph it looks like and then we're displaying those setting a header and looping through them uh even though this is only once this probably you know should shouldn't be a while loop but but it's fine [Laughter] it could be an if since we're only doing a singular record um and are we doing a query yeah we're doing a query near the top gr ah got it okay sorry and all right in row set i think we're alternating the colors for the background for the rows i like it i think we're querying all incidents here that's right it should get a view of this yeah uh in a table a nice informative table and then we're attaching it to a single one later on yes ah i missed that good call brad so that's what the different rows are yep all right well i feel comfortable enough running this in a demo instance let's run it let's do it even though phil's making fun of my my background script here it's whatever uh oh i shouldn't have what uh it doesn't matter all right yay we've created one system all right so that that was our expectation it was that we would get an attachment uh and and there we did so we can open that up from here even oh here it is nice i love that improvement to the uh the background script giving you that summary of how many records you affected and being able to get to them and the rollbacks nice so number and short description those were our column names that were called out in the script and then uh you know iterating through them and there was even that uh you know alternating background color between uh you know gray and not and and this is this is what we told it to do that's pretty cool i know i would have used this previously um so that's really neat and it's a it's a very nice complete uh example which i love really good examples that i can just copy and paste and run so thank you for that david and with that uh brad uh let's uh roll over into our um case that we're working on today so you created a little app uh for search certifications and uh we're gonna go um uh take a look at maybe the table that you created uh to you know request them and then build the automation from behind it yeah so i created this certificate generator app so the use case here is that you have a certificate and then you want to generate a certificate for a bunch of people and send it out this is a real use case that we have where we want to do this for the hackathon and there there are some other situations where we want to generate some some pdf certificates for developers and so hopefully we're going to end up using this if we can get it to work so i've got two main tables here we have this certificate table and the certificate table is going to basically hold our template so we have this beautiful uh certificate template here which is a certificate of completion this person has completed this course watching live code happy hour on this date uh so we want to replace this recipient name and award date with somebody's name and today's date uh and not just somebody's not just somebody i didn't know if we were going to get to that uh so i created a little uh google document uh yes i know it's a google sheet uh but the easiest way to get public things for me is something like google sheets so you're gonna live with it and i'm pasting that into the chat right now uh so you should be able to click that and go give us a username first name last name and email address and we'll use that as input for our thing and and hopefully by the end of the show we'll have it send you out your little certificate for watching the show today uh because i think it's hilarious and it was a great idea from brad so what we're going to do is we've got oh looks like that link might not have been shareable in the spreadsheet so what we're going to do is we've got this request table and for the request i'm going to give it a live code happening hour i can pass it people or a group and for now let's just pass it me and a certification date and we can say this is a test and when i hit generate certificates it's going to uh it's going to run a flow that's going to take the person or group and add them to this list of course it doesn't look like it's working now and what we want to do is we want to take each person in this list run a flow against it generate a pdf attachment and attach it to that record and then we can send it out via email if we want to but this is this is the main record here it's a request every time i'm generating certificates i'm going to do it against some people or a group and um and we'll generate some some people yeah yes i should have made it a form uh i was bad i didn't have time like but y'all could just put stuff on your own robe like pick a row like you know pick 17. it's not been used yet you'll be fine why did my flow not execute you're floating execute yeah what if i do this thank thank you forever put something on line 17 you're you're very funny it sounded like you were really appreciative of that oh it's not active that's why [Music] oh that that'll get you every time [Music] activate this is uh the world's least pretty flow that i created a while ago that doesn't work if you add more than one group but it's fine uh so we're activating that flow that's taking a long time all right so let's it runs when you change to work in progress so and then it will populate some people here is is the hope maybe not it doesn't matter all right so what we're going to do is we need an action uh that is going to take in a person um a the html from the template and then the person sys id where we want to attach the record to and then this as as you'll see when we can get into it we have opportunities to make it more dynamic but for this specifically we probably are not going to uh so this is generate pdf certificate uh let's just call it generate uh we'll see just thinking about how uh how specific we wanted to get um so there are some questions in the chat i think when we get into this uh some of those might end up getting answered um but for this action we've got a few uh a few inputs one of them is going to be what i call that record this is certified persons so we want a certified person id record uh person id uh and that is going to be a cis id i think a string works we also need an html input do we have html in here oh nice uh so this html is what's going to generate our uh our template and then we also need we have the html we have the person i think that's all we need do we need the request all right um yeah i think that's good because we have the html from the the personality already yes yeah yeah so okay with a certificate so this is a i just saw a question in the chat will the certificate application code be available the goal for me is to get this working and then post it to github and y'all can go crazy with it and fix all the stuff that we did wrong so let's add a script so let's go ahead and oh we need input variables all right this is i always forget to do the input variables into the script so what do we have all the time uh what do we call those person something something certified person id and html i'm going to call them the same thing david and jared i'm disappointed in you that that neither of you did person man woman camera tv like just just saying like all right input certified person id and can you guys hear the rain in the stream we cannot kind of insane uh cannot at all sir sweet tornado watch and everything so all right so we have those i'm going to save again because that's that's my personality so let's say uh person id is inputs do we not get to autocomplete there and then that bugs me all right so let's go look at the api and i think we were there before so i think we want to use this uh convert to pdf with header footer because this is we're going to want this to be landscape and this is the way to make that landscape so um should what how much time do we have we have enough time to write this time let's do it all right let's write it uh so we're going to start with uh where's the example code i'm all zoomed in so it's there we go let's start with this and grab the pdf generation api uh and i'm going to call this a pdf api and then so what we also want to do um [Music] so we have a couple of you know we really should have passed in the person glide record because we need their name oh yeah well we still can yeah let's do that so am i safe uh so let's change this to just certified person why not can we not change it oh there we go i can't change it after i've created it huh well nope delete try again that's easy to fix oh was the copy button there somebody just commented uh is it what is the if i want a glide record here uh reference reference reference and then i gotta tell the table which is going to be the s the person is the user record well it's but we have like a certified person that references the request and the user record and we're going to want it sys id um okay well if it's its own purse table then that table yeah okay because it for some reason i thought it was the user but it is a wrap your data model it is my data model uh can i dot walk the reference once i put it in there i can't remember yes you can um yeah absolutely it's a it's a fully dot walkable data pill at that point all right so let's let's go uh person name is person gr dot name and then our person id is person gr dot except this is actually.user.name all right let's see if i know my data model we can look at it um person not user that's all right so right now we've instantiated this api we have all the values that we need i think and from here we're going to so our html if you remember is going to be this html yes so we've got inside this html we've got a couple of things that we're going to want to replace which are recipient name and award date uh we should have passed in date so we'll do that but recipient name and award date we're going to want to replace those so i think i think for right now i'm going to hard code those in but i think ideally eventually we'll want to say give me the things that you want to replace and what i should replace them with so we'll have some sort of array of objects coming in but for now we'll just say html dot replace and the first one was recipient name and i have very little confidence that i spelled that correctly that looks like it did hey and we're gonna replace that with person name and then let's do it again uh with award date and uh let's say var award date equals inputs i realize i have not find that yet so i'm done with all of my background things but one thing i noticed noticed while i was doing that was david jarrod you gotta help brad out you gotta speak up you gotta you gotta you gotta engage a little bit here no i can't type and watch the chat yeah you know you got to tell him what to do and and laugh at him for being for being bad definitely laughing at me is probably the most important part it is important uh so i have deleted that uh the that google sheet thank you everyone for contributing um all those users are imported they're also added to a group the certification group and uh so all of that uh is is now deleted from that public doc yeah my contributions are going to be this looks so much better than the previous versions the things we had to do for one-click csv exports and one-click pdf exports in the past uh even last year hackathon um i i implemented the pdf export with the with the group from australia um on our team and you know that it took 22 tries to get it looking just right and this way as you saw with the copy and paste um you had it looking good in version one yeah i mean the idea that you can just take some pdf to take some html and turn it into a pdf is nice because you can just say hey designer give me some nice looking html and pretty easily hopefully as we will show turn that into a pdf uh so from here i think we have this i mean i'm pretty sure this doesn't work but we don't know that yet so we'll see where we're at uh page size so this is i'm going to take i'm going to take some code that david sent and we're going to use that to define the orientation here so we've got all this hf info so header footer info it's an object and it has all the stuff in it uh but i think we have uh basically the same thing here okay orientation size number landscape and margins okay all that makes sense to me is some parameters to craft from yeah so this is those other parameters i think would have been i guess weren't landscape and all that stuff so and then the last thing we need is this line so that was pdf api and then uh html is what we called that it's not the incident table it is the certified person table which is a related list and let's do this is what i'm looking for i love that feature i just you know i i remember the day when you could not open up a related list easily from the breadcrumbs and i'm so glad that that day is not today so we want to say what am i looking for person id and then i don't want to name it my pdf i want to name it um your certificate or something let's say yeah person name [Music] plus i i guess we should have grabbed some more data from the from that record but at this point happy hour or something lchhh yeah let's go uh dash lch dot pdf do we need to say pdf no no all right and then hf info is this so that i think yes uh i'm running i'm running the numbers back here and this is a 60 62.333 continuing chance of success but uh i just realized that we didn't update the input variables even though we updated the inputs oh recalculating yeah failure it's too late but we didn't run it yet so that's right award date all right let's save this thing so that the the my rules of copying pasting would have saved you there because you wouldn't have been able to type those in this you know because you could have been able to paste the names in the script because you didn't have a place to copy them from there's rules so whoa where did you go all right so flow designer went away but do you see how i saved right before that that's why we do it that's why we do it we love the saving all right this action where did it go why is it not already sorted on updated i was real nervous after i said see that i saved that i hadn't actually saved oh it just did it again did you did you break it brad that is unfortunate uh did you break flow designer i hope i did don't break it don't break we don't have to we don't have to use that test button uh we can just call it from a flow it's true um which is what we're gonna do your instance in a change request outage window [Laughter] i may be this is my this is like my personal instance that i don't normally demo things from because i do crazy things in here so it's uh it's probably my fault okay certified person so if you remember when i hit generate certificates it's going to generate this list of certified people here and then from there we want to run this action against each of the people so we're going to call that from flow designer so which group were you using for that ui action because i have a group of users in there now i haven't done it yet so okay if it works what do we what do we call that um hopefully it was pdfs in the name somewhere so type pdf i think he saved but didn't publish um yeah do you have that on your flow so there's two options there you can publish it or you can tell your flow to use draft objects nice have you ever done that certificate generator so now we get to pick our uh our stuff here so we want uh trigger record created is the certified person record and it has a reference to the request which has the html in it hey what do we call that uh service certificate yep the certificate has html that's some doubt walking right there that's right uh certified person is going to nope i'm looking for the martini olive and it's throwing me off since they changed it so this one we just want this idea of that or no this was the reference itself and then the date is from that reference record and we're using created seems fine well i added uh there's a certified oh you've added one got it certificate date look at that you're doing fancy i clicked out of that too fast so we've got those things here um all right i think that's it i think that's savable and testable we're gonna test against uh all right and so this is supposed to generate a pdf and attach it to that individual's record yeah so there were no errors so let's come back and look at abel's record there's a pdf there that is cool oh there's half the equation oh wow so everybody take a drink but that's some victory right there cheers all right let's see if we can taste um the taste test though if we can my beer it does taste good uh let's see if we can test it intend and create a new request so we want the uh did we publish the flow i don't think we did i did notice that the pdf was created with two pages and i think well what's going on there is the html the height of those um lines is just a little too long so if you let's spam it'll be a single page let's fix that because i think we can fix that yeah so so it's much longer than it needs to be so it's just higher so got it just trim some of that so there's the height uh if you look there in each of those there we go there's two divs the height there so they need to be 50 pixels apart probably i'm thinking because the landscape it might be actually width versus height but it might actually be the width that's extra high how does that look that looks much better that looks better so let's run a different user yay all right should we run the uh run against everyone so what was the group that you made certificate i'm i'm a very sneaky person with the names of things all right certificates it's today i'm not i was gonna say test one but uh no well i mean we need test one because you need to uh send the notification in the flow like send them their certificate should we send them the certificate i don't even know if i have emails that's what the email addresses are for yeah all right all right so let's test it one more time uh so this is this is this is a test run all right then we'll do the the send run test run so all right so if i say generate certificates the flow is going to run and we should have some certificates hey that worked hey there's people all right there's a bunch of people there let's open jared's because he's not secret he's on the show that's right i see a mr upside down is also uh getting a certificate today and it's just one page so that was that was great advice david to fix that and we could share this on linkedin like the recommendation in the youtube channel youtube definitely share it on linkedin well well you need to get gabby to like jazz up our html a little bit we do need that what are you trying to assess in your css about the template i'm i'm saying it i'm saying it's functional brad it's functional and and that's first step first step is functional uh but then but then after that we get to to move into stylistically uh delightful all right so you think we should send an email from this flow or from a different flow from the flow like from this flow let's do that send it right here i want to generate them and send them some notification gabby's got an image ready we'll send it to me uh what's the best way to do this we probably want to create a notification that would be easiest yeah notification to use the attachments that are on the record that's triggering the notification yeah because then you can just click the button send as attachment send attachments which is delicious so this is on the certified person table who will receive uh this is not i'm i'm a little embarrassed about maybe the last time that i actually sent a notif like created a notification record it's been a while it's okay brad uh we don't need to worry about this one we're gonna send it it was just last year you made one last year i know you did that's true i accidentally uh spammed a really large group of people in the hackathon and then i corrected myself so there we go uh i want the advanced view uh insert or update fine well i don't want it to send on insert triggered that's what i want so i've got an image and so if i want to add an image to your thing how do i do this it's in it would be in the um so where's the attachment thing ah here we go [Music] if you want to play around with sending out emails in your sub production environments i'll give a shout out to a cool item that i helped contribute to out on the developer program share site uh called subprod email filter that was produced by gary griffin at finite partners and allows you to let a subprod email or subprod servicenow instance send direct emails to everybody that's in a particular group um so if you're tired of getting all of the emails for the entire instance going to your email account uh take a look at the share off of the developer program site nice so should we add the uh the image absolutely so i i've attached it there for you to be able to do whatever you need with that whoa uh there's two different divs here let's go i want to stick it in so while brad's working on that brad's going to add our image i'm going to talk to david for a minute um so you work on the api documentation on the developer site and uh so what is like you know me and the audience here as developers um you know what's the best way to get use out of that that apis and then maybe like how's our the best way for us to give feedback to you and and your your team that that handles updating those sorts of things so like how do we best use it and how do we best uh you know contribute to improvements that we'd like to see okay um well i guess the the documentation typically has uh examples for each one we've got a rest section um the the navigation for scoped is is by name space like we saw and then with the um i had global apis or not we've got uh client as well uh but i guess you know as far as using that's one part of navigation we do appreciate the feedback a lot um and i guess you know you could let us know what what you like about it uh where we get improved we got a lot of good feedback from the customers uh with you know maybe example tips and you know i i believe that the uh customer feedback we do we get it helps us improve a lot so so if i do want to see uh you know if i think i've got an improvement for one of those api examples i should include that like adjustment in my feedback on the dev site when i click that feedback button that's that's been done before it's been pretty helpful i can run them and test them and i actually improve the or you know change the the code maybe not exactly but you know as a user but it is helpful to you yes when when we do that okay great and we're doing everything we can to you know improve the layout and you know what really works best and and looks better so we're definitely open to um you know you know tips or you know you know feedback uh we really value the feedback uh especially you know you know what you don't like and how things can be improved awesome thank you for that and it looks like you've got the image uh updated on the certificate it's a beautiful i mean a little ribbon for the bottom there is an image let's just say that uh that's that's about as far as i'll go i don't know how how nice i put it in there actually i do know how nice i look kind of cool on the bottom there it was like a real one hanging off the bottom of the certificate yep when i gave up that's what i decided it looked fine [Laughter] i liked it so i but i didn't put my name in oh no oh you better hurry i'll have to i'll have to run it uh you know afterwards i'm pretty sure i don't have email turned on in this instance but that's okay it'll generate the emails and then we can clear out the rest of the email uh system and send them and then turn it back off all right so let's look at uh look at jared's and see how it looks with the hey look at this oh look at that i love it i know i did this on purpose that's why it looks so good i actually love it so uh that's great um is there anything else that you want to show off uh oh yeah you can show that the emails were generated in the uh outbound email send ready look at it it's ready to go oh we've got one going fred it didn't work let's pretend like i didn't go to this table and it all worked yeah i'm gonna pretend like it it worked because uh we'll cut this out and we'll cut this part out we had a good question in the youtube chat about generating multiple pdfs and then zipping them up yes yeah zipping comes up every once in a while out on the sn devs slack channel and also on the community forums um so i i haven't looked deep into that in in a couple of years i know there's ways to do it on a mid server but not directly in the instance uh andrew this is there anything in uh what's the current state of zipping on server side scripts i do recall that there is a zipping api i don't think i've ever leveraged it but i recall there being one i know api documentation a guru is do you recall is a an api that handles zipping because i i've stored it in my brain that there is one but let me let's go to the developer site and see definitely it's not scoped i think there's some stuff uh legacy under global um a couple years ago i went pretty deep on this i could do everything except for uh create a zip file or extract zip file i could read a zip file i could enumerate the files that were inside of the zip file but i couldn't ever extract or compress without going onto a mid server and then doing a packages call yeah zip didn't seem to reveal anything but uh but yeah you definitely can do it through a mid server because you can do a lot of a lot of interesting things once you move things to a mid server um upside down andrew says there's a zipping spoke ooh zips but uh there there's a there's definitely uh so if you search on community i think that you'll have the best shot of finding that for zipping but we know for sure you can do it on a mid server but doing it directly in servicenow i don't see an api off the top that can do it but potentially there might be a spoke and there might be an undocumented api that can handle that so with that brad you want to stop the screen share and uh we'll start to wrap up a little bit yeah so there's a question uh can we automate i stopped the screen share can we automate the um this uh or can we schedule generation of pdfs the answer is absolutely what we what we just did was all async so you know it's something that was that was a schedule soon yeah i hit a button and did it but you could have absolutely done that from a script and scheduled that being generated and sent it out via email absolutely um let's see are there any other i don't see any others uh that are jumping out on me on questions so if you have a last minute question get a man um so is there anything else that you want to let us know about the dev site and apis and documentation uh david because you know it's been a real pleasure having you and we appreciate you joining us and so is there anything else that you want our developers to know about apis or documentation in general or just giving you a a free open swing at the back okay i'll use the best i can uh well one thanks for having me on the show and um i wanted uh everybody to know that there's two other features in the pdf generation api which is um you can add svgs uh you can create svgs from html as well um and there's also you can add a signature as an image with the signature yeah and there was uh like take the signature as an image and merge it into an existing pdf yes method i saw right yep nice that sounds super super useful yeah um [Music] so beyond that um one one uh i think i've already covered everything i wanted to say to the developers as far as how is using our stuff but yeah please let's let us know how we can improve the navigation um yeah i noticed that you know it's it's not really as easy to get around as it as we'd like it to be so um we're working on that and uh you know if you have any ideas that you'd like to share you know feel free to uh give it to us we definitely value uh your feedback that's all i got yeah and that that give feedback on the developer site they they do read those they do uh you know turn them into tasks if there's an action behind them so do click that button and we read them yes we see them um well with that uh let us rate our our beverages uh for the day and we'll go back around the horn in the same order starting with brad the awesome tilton how was your tasty beverage that you didn't drink all of she may definitely not there's at least more than half um it was it was a solid let's give it a four two five uh with the uh with the succession uh bump so yeah noise jared how was your uh maple cold brewed coffee yeah maple cold brew coffee i think um for this afternoon i'll give it a three however it was a little bit like drinking pancakes so if i was camping or something like that uh i would contextually hire actually it would be a four or four and a half if i was out camping awesome david how was yours okay i'm gonna say fancy root beer old red old uh old red-eye here is uh i'd give it a four um it does say i i think i didn't follow the caveat here it says red eyes prefer frosty cold and mine's just cold so it's a little flat but the sugar is good it's pure cane sugar so i like i like some sugar and unfortunately disappointingly uh my momentum uh grand noir curve two seven five like it's i think the worst beer i've had on a oh it is uh we will not be purchasing this again no just the wine the uh the zoom uh did you know decided that the night the day was over yeah i was like i do not like your i don't like your ruling on the beer it must be a really big fan of the momentum brewery zoom said get out the beer killed the stream as gabby says um so that was such a pleasure thank you so much david for uh you know letting us know that this api existed and documenting it so well and coming and joining us on the show um that was a ton of fun brad thank you for for making those uh that was really cool and we will get those uh emailed out to you uh folks that sent them in uh because that was just a lot of fun and we're actually going to use this uh so we are you know this wasn't uh just a just a you know fun exercise we're actually going to use this on uh some hackathon things um and jared uh thank you for joining us again uh on the show we really appreciate it and such an engaging chat today uh so thank you uh for joining us everyone in chat and if you're watching this later thank you for participating in uh you know the developer program ecosystem and joining us here and look forward to seeing you at knowledge um brad and jared and i are all doing uh several things at knowledge and we really are delighted to engage with you and collaborate with you there or in social media or wherever uh you can find us because we're in a lot of places and uh with that i will wish you all a great weekend thanks for joining us everybody [Music] foreign
https://www.youtube.com/watch?v=IMtEKBxJt0A