- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2023 02:43 AM - edited 05-16-2023 02:43 AM
Dear members,
Good Day!
Could someone please let me know if it is possible to delete files from a file location on a mid server using flow designer?
Best Regards,
Navin
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2023 03:12 AM
HI @_navin9898 ,
I trust you are doing great.
Yes, it is possible to delete files from a file location on a mid server using Flow Designer in ServiceNow. You can achieve this by leveraging the 'RESTMessageV2' API to interact with the mid server.
Here are the steps to delete files from a file location using Flow Designer:
Create a new flow in Flow Designer.
Add a 'REST step' to the flow.
Configure the REST step with the following details:
- Method: POST
- Endpoint: Specify the URL of the mid server where the file is located.
- Authentication: Provide the necessary credentials to access the mid server.
- Headers: Set the 'Content-Type' header to 'application/json'.
- Request Body: Construct the request body in JSON format. Include the file details (e.g., file name, path) and specify the action as 'delete'.
{
"action": "delete",
"file": "/path/to/file.txt"
}ave the REST step configuration.
Continue building the flow with additional steps or actions as needed.
Publish and activate the flow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2023 03:12 AM
HI @_navin9898 ,
I trust you are doing great.
Yes, it is possible to delete files from a file location on a mid server using Flow Designer in ServiceNow. You can achieve this by leveraging the 'RESTMessageV2' API to interact with the mid server.
Here are the steps to delete files from a file location using Flow Designer:
Create a new flow in Flow Designer.
Add a 'REST step' to the flow.
Configure the REST step with the following details:
- Method: POST
- Endpoint: Specify the URL of the mid server where the file is located.
- Authentication: Provide the necessary credentials to access the mid server.
- Headers: Set the 'Content-Type' header to 'application/json'.
- Request Body: Construct the request body in JSON format. Include the file details (e.g., file name, path) and specify the action as 'delete'.
{
"action": "delete",
"file": "/path/to/file.txt"
}ave the REST step configuration.
Continue building the flow with additional steps or actions as needed.
Publish and activate the flow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2023 03:44 AM
@Amit Gujarathi thank you for your reponse.