CMDB Import and Transform Automation using Sharepoint
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2024 11:42 AM
Hi All, I currently perform import in servicenow manually. I'm looking to automate this process whenever an excel file is uploaded in a sharepoint folder. I would like to have the process automated so the file can be imported and transformed into the cmdb.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2024 05:57 AM
Hi @Lorna ,
you need to configure the Datasource for that, using the excel file and path for the sharepoint folder, Refer the below screenshot which helps you.
Also The simplest way to to just have SharePoint email the file to ServiceNow. Setup the schedule within SharePoint.
When ServiceNow receives the file, automatically put the attachment into a data source and run the transform map
Please appreciate the efforts of community contributors by marking appropriate response as Mark my Answer Helpful or Accept Solution this may help other community users to follow correct solution in future.
Thanks
Ajay Kumar
Linkedin Profile:- https://www.linkedin.com/in/ajay-kumar-66a91385/
ServiceNow Community Rising Star 2024
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2024 08:18 AM
Hi Kumar, thank you for responding. How can I set up a schedule within sharepoint. Also I clicked on the link to the microsoft sharepint but I dont see the same options in my excel for step 2.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2025 04:40 PM
DTech Apps' ServiceNow certified application, DocIntegrator, plays a vital role in automating your Excel file import from SharePoint to the ServiceNow CMDB by providing the secure and efficient means to retrieve the file. Here's a more detailed explanation:
DocIntegrator's Contribution:
DocIntegrator's primary function in this scenario is to act as the bridge between ServiceNow and SharePoint, enabling your ServiceNow instance to access and retrieve the Excel file when it's uploaded. It simplifies the often complex process of connecting to SharePoint and handling authentication.
Automated Process Outline:
DocIntegrator Connection:
- You'll begin by configuring DocIntegrator to securely connect to your SharePoint Online environment. This usually involves using OAuth 2.0 authentication with Azure Active Directory, which is a more robust and secure method than managing API keys or certificates directly.
Flow Designer Orchestration:
- ServiceNow's Flow Designer provides the platform for you to automate the entire process. You'll create a Flow Designer flow that coordinates the different steps involved.
- ServiceNow's Flow Designer provides the platform for you to automate the entire process. You'll create a Flow Designer flow that coordinates the different steps involved.
Flow Trigger Mechanism:
- This is where you'll need to implement a mechanism to initiate the flow when a new Excel file is uploaded to your SharePoint folder. DocIntegrator itself doesn't offer a direct "SharePoint folder watch" trigger, so you'll need one of these approaches:
- Scheduled Flow with Polling:
- You can create a scheduled flow that runs at regular intervals (e.g., every 15 minutes).
- Within this flow, you'll use DocIntegrator actions to check the SharePoint folder for new files. This might involve listing the files and comparing timestamps or file names to identify the newly uploaded one.
- This approach is relatively simple to implement but might not be as real-time as other options.
- You can create a scheduled flow that runs at regular intervals (e.g., every 15 minutes).
- External Trigger with Webhooks:
- For a more event-driven and responsive solution, you can use an external automation service such as Microsoft Power Automate or Azure Automation.
- These services can monitor your SharePoint folder and trigger the ServiceNow Flow Designer flow via an inbound webhook when a new file is detected.
- This provides a more immediate response to new file uploads.
- Scheduled Flow with Polling:
- This is where you'll need to implement a mechanism to initiate the flow when a new Excel file is uploaded to your SharePoint folder. DocIntegrator itself doesn't offer a direct "SharePoint folder watch" trigger, so you'll need one of these approaches:
Retrieving the Excel File with DocIntegrator:
- Once your flow is triggered, you'll add a DocIntegrator action to it. This action will be designed to retrieve the Excel file from SharePoint. The specific action might be labeled "Download File from SharePoint" or "Get File Content from SharePoint."
- You'll configure this action by:
- Selecting the DocIntegrator connection alias you previously set up.
- Providing the path or URL to the Excel file within your SharePoint folder.
- DocIntegrator handles the authentication and file retrieval details, making this step straightforward.
Data Processing and CMDB Import:
- After DocIntegrator retrieves the Excel file, you'll need to extract the data from it and import it into the appropriate CMDB tables in ServiceNow.
- This part typically requires ServiceNow scripting, which you can add to your Flow Designer flow using a "Script Action."
- Excel Data Parsing: Within the script, you'll need to use JavaScript libraries or programming techniques to parse the Excel file's data. You'll likely need to research and potentially implement a library that can handle the specific Excel file format (.xlsx or .xls).
- CMDB Data Mapping and Import: You'll use ServiceNow's GlideRecord API or other CMDB APIs within the script to insert or update records in the CMDB tables. You'll need to carefully map the data from the Excel file to the corresponding fields in the CMDB.
Error Handling and Logging:
- It's crucial to implement robust error handling throughout your Flow Designer flow, especially within the Script Action.
- This will help you catch and manage any exceptions that might occur during file retrieval, Excel parsing, or CMDB import.
- Log detailed information about any errors to ServiceNow logs to facilitate troubleshooting.
Key Benefits of Using DocIntegrator:
- Secure and Reliable SharePoint Access: DocIntegrator handles the complexities of secure authentication and connection to SharePoint, ensuring that your ServiceNow instance can reliably access the Excel files.
- Simplified File Retrieval: DocIntegrator provides actions that make it easy to retrieve the Excel file content within your Flow Designer flow, abstracting away the need for direct API calls.
In summary, DocIntegrator is a crucial component for the SharePoint integration aspect of this automation. You'll need to combine it with a trigger mechanism (scheduled flow with polling or external trigger) and ServiceNow scripting within Flow Designer to handle the Excel file parsing and CMDB import. This combination allows you to automate the process of retrieving Excel files from SharePoint and using their data to populate your CMDB.