Using ServiceNow Assign file action
- Updated: 2025/09/12
Use the Assign file action to produce a file stream for an attachment in the ServiceNow instance. The Assign file action produces a file stream from the ServiceNow instance and assigns the stream to a file variable.
Create a file stream for an attachment in the ServiceNow instance using the attachment system id and assign it to a file variable. You can then use this file variable as a data source to upload the attachment to your Microsoft 365 OneDrive folder.
Prerequisites
- Set up an active connection to the ServiceNow instance using the Authentication action. For more information about Authentication action, see ServiceNow authentication action.
- Set up an OAuth connection to Microsoft account.
- Save the Microsoft account username in Credential Vault.
- Create a file variable named servicenowfilestream to hold the file stream.