Skip to main content

Set up MS SharePoint export

Use blank export to export your products to MS SharePoint.

Introduction

You can export data from Productsup to Microsoft SharePoint using the Blank Export (empty) and Blank Export (with ID) with the destination Microsoft Sharepoint export. You can export only .csv and .xslx files.

Note

You may need some technical expertise to set up an export to Microsoft SharePoint.

Prerequisites

To export your products to Microsoft SharePoint from Productsup, you need:

  1. Step 1: Create app registration and save account data for the further data source setup.

    1. Go to Microsoft Azure portal.

    2. Go to the Azure active directory Entra ID.

    3. Go to App registrations and create a new registration by taking all the steps in the wizard.

      Tip

      Name your registration Productsup-sharepoint-connector and decide on the supported accounts. A single-tenant should be enough, but this depends on your organisation.

    4. When you created the application, save separately the following details that you will need for the data source setup:

      • Application (client) id is for Client Id.

      • Directory (tenant) id is for Tenant Id.

    5. Go to API permissions from the menu to set the permissions.

      • User.Read

      • Sites.Selected

    6. Switch on the Grant admin consent for [Company].

    7. Go to Certificates & secrets from the menu and generate a new client secret. Give it a description and set expiry date. Save it as your Client secret for further data source setup.

  2. Step 2: Give an application access to the specific sites.

    To give an enterprise application or app registration access to a specific site or multiple sites, execute the SharePoint PnP PowerShell script provided below. A CSV file should contain the following:

    • a list of MS SharePoint site URLs

    • your admin account User Principal Name

    • the app ID or AppDisplayName.

    Note

    You need the Administrator rights of your MS SharePoint account to execute the script.

    # Connecting to the <Company name> SPO Service and importing the SPO PNP Module
    Connect-SPOService -URL <InsertTenantSPAdminURL>
    Import-Module PnP.PowerShell
    
    ##########################################################################################################################
    #                                                                                                                        #
    # The following part give the respective Enterprise Application their neccessary rights.                                 #
    # It does so by using the .csv file from the previous part as input for sites to give the respective rights for.         #
    #                                                                                                                        #
    ##########################################################################################################################
    
    $SPSitelist = <InsertPathToCSVContainingListOfSPSites>
    $ADMAccount = <InsertUsedADMAccount>
    
    $AppID = <InsertAppID>
    $Displayname = <InsertAppDisplayname>
    foreach ($SPSite in $SPSitelist)
    {
        write-output $SPSite
        Set-SPOUser -site $SPSite -LoginName $ADMAccount -IsSiteCollectionAdmin $True -Verbose
        Connect-PnPOnline $SPSite -Interactive
        Grant-PnPAzureADAppSitePermission -AppId $AppID -DisplayName $Displayname -Site $SPSite -Permissions Write -Verbose
        Set-SPOUser -site $SPSite -LoginName $ADMAccount -IsSiteCollectionAdmin $False -Verbose
    }

    Tip

    You can also toggle between Write and Read permission by changing the respective permissions parameter in the foreach loop.

Set up export for MS SharePoint

To export your data to MS SharePoint, you can use a blank export, a blank canvas that you can customize. You can choose one of the options:

  • Blank Export (empty) that lets you manually create a custom set of attributes in the export stage of Dataflow.

  • Blank Export (with ID) that is similar to Blank Export (empty) but has the ID attribute pre-defined as a mandatory attribute in the export stage in Dataflow.

The process of setting up Blank Export (empty) and Blank Export (with ID) is similar:

  1. Go to Exports from your site's main menu.

  2. Select ADD EXPORT.

  3. Select the necessary blank export in the gray banner under the search field.

    Add a Blank Export
  4. Go to Dataflow from the site's main menu and select your blank export from the channels drop-down menu in the upper ribbon.

  5. Map the attributes from intermediate to export using Drop or Click to add new attribute at the export stage.

    add new attributes in Dataflow

    Note

    The ID attribute is the only mandatory attribute in the export stage for Blank Export (with ID) in Dataflow. But you still have to connect it with a corresponding attribute of the intermediate stage.

  6. Go to Exports, find your blank export in the list of exports, and change Status from Inactive to Active.

  7. Select your blank export's name in the Export name column.

  8. Select Add Destination in the Destinations section and choose Microsoft Sharepoint export from the drop-down menu. Select Save.

  9. Enter your Microsoft SharePoint data from the Prerequisites into the following fields:

    • In Client ID, enter your MS SharePoint client ID.

    • In Client Secret, enter our MS SharePoint client secret.

    • In Tenant ID, enter your MS SharePoint tenant ID.

    • In Upload File Path, add the location path of the file.

    • In File Name, enter the name of uploaded file.

    • In File Type, select the type of the shared file: cvs or xlsx.

      Note

      Check if the access to the file in MS SharePoint isn't restricted.

    • Set Active to On, to activate the destination.

    • Select Save.

      Set up MS Sharepoint export destination
  10. Select Export this export at the top-right corner of the page. Alternatively, the platform exports the file at the next scheduled run.