SharePoint Files Input Tool

Use the SharePoint File Input tool to read the data from your CSV, XLSX, and YXDB files on the SharePoint site.

Tool Configuration

This process applies to Microsoft SharePoint Online. To install the SharePoint Files Input tool, in Designer, open the SharePoint Files .yxi file that you downloaded from the Gallery.

To install the SharePoint Files Input tool for all users, open Designer as administrator.

  1. Drag and drop the SharePoint Files Input tool to your canvas. You can also use the Search to find "SharePoint."
  2. The OAuth method is used for authentication.
    1. Sign in via Internet Browser: Use the default Alteryx application.
    2. Provide authentication details: Use you own OAuth application.

      To authenticate, insert your username and password. To be able to schedule you workflow on Server when using the Cloud services, you need to enable Use as service principal (app-only authentication) so that your token has an extended expiration. When using the SharePoint Files Input tool for the first time, you must give the app your consent to use the listed permissions. Go to the Custom API Application Setup section for the information on how to create you worn API application.

      Note

      Depending on your company policy, some permissions might require administrator approval. In such a case, fill in your reason in the app and send a request or contact your IT team directly.

  3. You can choose Site and Document Library. To select your file, you can then browse through the folders (you can also use Search to find your Site, Library, and File). Note that File Path for the selected file is modified according to the selection made.

    Tip

    In File Path you can also insert (pressing 'Ctrl+V' and 'Enter') the path of your file by using the Copy Link button on the SharePoint site.

  4. In the Options tab, you can check File Format, Max Field Length, and Field Delimiter (Comma by default). Also, you can Quote Characters (None by default), Attach Metadata, and check page coding.
  5. Tip

    For an unsupported file format (other than CSV, XLSX, and YXDB) you will get an error message.

  6. The tree view is populated according to the site selected. Based on the selected file format there is multiple options present in the Options tab.
  7. For the XLSX file format, in the Data tab you can select Data range options: All Sheets, Sheet Names, Sheet Numbers along with a particular range, Named Range, or to Import only the list of sheet names.

    Tip

    You can also choose a folder with all subfolders (a file format is set manually), or you can define the file path using a wildcards. For example “.../*2020.xlsx” for all .xlsx files ending with '2020'.

  8. Select Run to execute the workflow.

Custom API Application Setup

The SharePoint connector comes with a built-in multi-tenant app you can use, but if you prefer using your own one, follow these steps.

For more information on how to build and manage an application using the Microsoft Azure cloud services, refer to the Azure documentation (https://docs.microsoft.com/en-us/azure/?product=featured).

  1. Navigate to  https://portal.azure.com/#home.
  2. Sign in with your Microsoft Azure Active Directory account.
  3. On the Home screen use Search, or go to the upper left corner menu to open the Azure Active Directory service.
  4. Open App registrations in the left menu.
  5. Select + New registration.
  6. Specify the Name of the app.
  7. Choose desired account type–both Single tenant and Multitenant are allowed.
  8. In Redirect URI (optional):
    1. Select Single-page application (SPA) from the dropdown menu.
    2. Set the URL to https://cef.alteryx.com/designer/oauthcallback.
  9. Select Register.
    • The Application (client) ID is your Client ID.
    • The Directory (tenant) ID is your Tenant ID.
  10. Go to API permissions to add these Delegated permissions - Microsoft Graph.
    • Files.ReadWrite.All
    • offline_access
    • openid
    • User.Read
    • Sites.Read.All
  11. To use service principal (app-only authentication) proceed to Certificates & secrets and add New client secret. Copy the Value as it won't be accessible again once you leave the page–this is your Secret ID.
  12. In API permissions add these Application permissions - Microsoft Graph
    • Files.Read.All
    • Files.ReadWrite.All
    • Sites.Read.All