Skip to content

Downloadfromsharepoint

flowtask.components.DownloadFromSharepoint

DownloadFromSharepoint

DownloadFromSharepoint(loop=None, job=None, stat=None, **kwargs)

Bases: SharepointClient, DownloadFromBase

DownloadFromSharepoint.

Overview

This Sharepoint component downloads a file or uploads it to the Microsoft Sharepoint service

Properties (inherited from DownloadFromBase and Sharepoint)

.. table:: Properties :widths: auto

+--------------------+----------+-----------+----------------------------------------------------------------------+
| Name               | Required | Summary                                                                          |
+--------------------+----------+-----------+----------------------------------------------------------------------+
| credentials        |   Yes    | Credentials to establish connection with SharePoint site (username and password) |
|                    |          | get credentials from environment if null.                                        |
+--------------------+----------+-----------+----------------------------------------------------------------------+
| site               |   Yes    | The URL of the SharePoint site.                                                  |
+--------------------+----------+-----------+----------------------------------------------------------------------+
| verify             |   No     | Whether to verify the SSL certificate of the SharePoint site (default: True).    |
+--------------------+----------+-----------+----------------------------------------------------------------------+
| timeout            |   No     | The timeout value for SharePoint operations (default: 30 seconds).               |
+--------------------+----------+-----------+----------------------------------------------------------------------+
| create_destination |   No     | Boolean flag indicating whether to create the destination directory if it        |
|                    |          | doesn't exist (default: True).                                                   |
+--------------------+----------+-----------+----------------------------------------------------------------------+
| tenant             |   Yes    | Is the set of site collections of SharePoint                                     |
+--------------------+----------+-----------+----------------------------------------------------------------------+
| file_id            |   Yes    | Identificador del archivo en sharepoint                                          |
+--------------------+----------+-----------+----------------------------------------------------------------------+

Save the downloaded files on the new destination.

Example:

```yaml
DownloadFromSharepoint:
  credentials:
    username: SHAREPOINT_TROCADV_USERNAME
    password: SHAREPOINT_TROCADV_PASSWORD
    tenant: symbits
    site: FlexRoc
  file:
    filename: Bose Schedule.xlsx
    directory: Shared Documents/General/Monthly Schedule & Reporting
  destination:
    directory: /home/ubuntu/symbits/bose/stores/
    filename: Bose Schedule - {today}.xlsx
  masks:
    '{today}':
    - today
    - mask: '%Y-%m-%d'
```