Watch the video on YouTube: https://youtu.be/ImN1Ka9Qr3c

In this video I show how I use a ServiceNow MID server, the Attachment API and a headless browser to capture screenshots of missing store applications in my ServiceNow store crawler. Once I’ve proven I can do it from a command line, I build a custom action in Flow Designer with an SSH step and add it to two sub flows for continual re-use in both routine and ad-hoc crawl activities. #servicenow #flowdesigner #sshd #headlessbrowser #crawler #automation #attachment #api

Code snippets used in this video:

/usr/bin/chromium-browser --headless --no-sandbox --disable-gpu --disable-dev-shm-usage --screenshot APPLICATION_URL​ 
curl "https://INSTANCE.service-now.com/api/now/attachment/file?table_name=TABLENAME&table_sys_id=RECORD_SYS_ID​&file_name=$(date +%F).png" --request POST --header "Accept:application/json" --header "Content-Type: image/png" --user "USERNAME":"PASSWORD" --data-binary "@screenshot.png"