IntegrationHub - Remote Process Sync - Syncing attachments

James Kailukai1
Tera Guru

I have setup and able to exchange Incidents using IntegrationHub's Remote Process Sync. I have a the Inbound and outbound Flows working to update the "attributes". I have started to work on the syncing the attachments

I have looked at this documentation ( https://docs.servicenow.com/bundle/sandiego-application-development/page/administer/integrationhub/reference/remote-process-sync-actions.html ) and it make it seem fairly simple as you see from below. 

Identify and request missing attachments from a remote system: Use these actions in the following order to automatically look up and request attachments from a remote system that don't exist in your local system:

  1. Identify New Attachments - Use this action to look up any attachments that exist on the remote system but don't exist on your local system for correlated records.
  2. Request Attachments from Remote System - Use this action to request the transfer of identified attachments from the remote system to your local system.

I was looking if someone had a flow sample of how to get the Attachments from the remote system. I have the following so far:
find_real_file.png
My issues is that I am new to this and I am struggling with what needs to go in the various Inputs on each of the actions. I am not even sure if I am using the correct actions and in the correct order. 

I would appreciate any help anyone has. 


  

15 REPLIES 15

Shreya Shah
ServiceNow Employee
ServiceNow Employee

Hey, for every ServiceNow spoke action, we have a help icon (?). When you click on it it will guide you with inputs for that action. Additionally you can find all the action details on docs (https://docs.servicenow.com/bundle/rome-servicenow-platform/page/administer/integrationhub/reference/identify-new-attachments-action.html) and you can explore more options in the left hand panel for other actions.

I did look at the documentation and it states:

Inputs

Provide a value for each input that your action needs. To add dynamic values, you can also drag and drop pills from the Data panel or select them from the pill picker.

Attachments
Data type: Array of Objects

Array containing a list of attachment objects to evaluate.

Local Record
Data type: Record

Reference to a record on the local instance you are synchronizing with another instance. The data pill contains all the field values for the specified record. For example, a case record on the local instance.

Outputs

These outputs appear in the Data panel. You can use them as inputs elsewhere in your flow.

Attachments
Data type: Array of Objects

Array containing information about the attachments to synchronize.

Count
Data type: Integer

Number of attachments identified.

 

Since this is first time using these types of actions, it is not really clear what these simple instructions are trying to tell me to do. I am trying to understand what it means by "Array containing a list of attachment objects to evaluate"

Here is what I tried:

First Action (Step 7): Get Attachment Data for Local Record

It states it is used to:

"Get the list of attachments associated with a specified local record. Use the output of this action to synchronize the attachments of a local record with the attachments of a remote record."

Populated as follows: 

  • Local record was the "Incident" I am trying to sync the attachments for. 
  • Correlation Detail is the Correlation Record 

Not sure if I am even filling this form out correctly. 

find_real_file.png

 

Here is the Flow I was developing. 

find_real_file.png

(Step 8): Identify New Attachments
find_real_file.png
Used "Attachment" values from Step 7 Get Attachment Data for Local Record

(Step 9): Request Attachments from Remote System
find_real_file.png
Used "Attachment" values from Identify New Attachments

Testing:

Created a ticket (INC0010020) in Instance A with 2 simple attachments
find_real_file.png


I can see the ticket (INC0010019) created in Instance B, but without any attachments. 
find_real_file.png

Since my code is based on an Update I went back and updated the description and added a 3rd file to trigger the update part of my code. 

In looking at the Outbound Queue on Instance A, I can see a lot of activity after doing this: 

find_real_file.png

Looking at the Inbound Queue on Instance B I can also see lots of activity:
find_real_file.png

However, the Incident on Instance B does not have any attachments. 
I am trying to figure out what all these additional "create" operations are doing.

Here is the content of one of them: It looks like the attachment data. 

find_real_file.png 

I also ran a test In flow designer using the values from the "update" (42 in above screen shot), here are the results:
find_real_file.png

Details:

Step 7

find_real_file.png

Step 8

find_real_file.png

Step 9 

find_real_file.png

I can only assume that I do not have the Action Steps Filled out with the correct values.

I am not sure how to fill in the values for the 3 actions in Steps 7,8 and 9 and if those are even the correct Steps and in the correct order. I was hoping someone had a sample of how to tie all the steps together.

Any help would be appreciated, even in understanding the ServiceNow Documentation

I see my screen shots did not upload, I will correct this shortly - Completed.

 

Hi James,

Just checking on the configuration of RPS - as mentioned on this page (https://docs.servicenow.com/bundle/rome-servicenow-platform/page/administer/integrationhub/reference...) did you set the "Include attachments" as selected in your capture definition?

You mentioned attributes (i.e. fields are getting synced) and you are having problems only with attachments, hence please check if that attribute (i.e. include attachments) set to true / selected? Also refer to the section "Syncing attachments" on the same page.

Also additionally it states - "Note: Only interactive session changes are captured by Capture Definitions. Non-interactive session changes, such as flows or business rules updating records, do not trigger a Process Sync Definition."