How to transfer attachments to 3rd party
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2023 07:57 AM
Hi All,
We have to send all the attachments available in instance to 3rd party tool. It would be really helpful if you provide me the steps and configuration. We have around 1 Million attachment, all we have to transfer to 3rd party tool. It is very difficult to do it manually.
I urge you to please provide the configuration.
Thanks,
Tejas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2023 01:41 AM
Hi @Community Alums ,
You can use below sample code to configure script to send attachment to 3rd party
function sampleRESTMessageV2() {
try {
var request = new sn_ws.RESTMessageV2();
request.setHttpMethod('post');
request.setEndpoint('<third party endpoint URL>');
request.setRequestBodyFromAttachment('<attachment sys_id>');
var response = request.execute();
var httpResponseStatus = response.getStatusCode();
gs.info("http response status_code: " + httpResponseStatus);
}
catch (ex) {
var message = ex.getMessage();
gs.info(message);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2023 02:45 AM
Hello @Manmohan K ,
Thanks for your reply. Could you please share the steps where to configure this code and I hope you noted that there are around 4 Million attachments we have to transfer, there is typo.
Thanks,
Tejas