Extracting data from attachments
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Hi All,
There is use case where user will attach an attachment that may be doc or pdf or png or excel or csv etc. Attachment will be on the incident form, Now we have to extract all the data which is in that attachments, How do we extract data in the attachment?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Akash_16,
you mean that somebody will upload an attachment on INC form and the data from the attached file will be extracted and used in the form?
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @GlideFather ,
Yes someone will upload a image, Now we have to extract the content on the image the data will be sent to another external source, Now the challenge is how can we extract data from the image.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
You can use Google Gemini Generate Content API for the same. Refer https://ai.google.dev/api/generate-content#text_gen_text_only_prompt-PYTHON for the documentation. You need to convert the image into Base64 string before passing it to Generate Content API along with a prompt to decode the image.
To know more about this integration, refer https://www.servicenow.com/community/s/cgfwn76974/attachments/cgfwn76974/developer-forum/1123158/1/S...
Alternatively, you can download the below application from ServiceNow store that can fulfil your requirement to an extent
https://store.servicenow.com/store/app/e56780f81baa2610f4b3dc28b04bcb9a
Please mark this response as correct and helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Amit Verma ,
I have tried with gemini without integrating with servicenow, I have give a base 64 data which is a png type and I asked it to convert it into normal string but it throws me a error.