Sending uploaded files as attachments to SharePoint

Quick Tip

The ability to send file attachments (such as uploaded files and generated documents) through Microsoft Power Automate is only available to organizations on our Pro, Team and Enterprise plans.

You can use our integration with Microsoft Power Automate to send entry documents over to SharePoint and include any uploaded files as attachments.

To send entry data and include uploaded files as attachments to a SharePoint list:

  1. Create a new flow. Search for Cognito Forms in the services list and then select a trigger.

  2. Add a step using the SharePoint Create item action. Include the Site Address and List Name in SharePoint, as well as the field values to populate the columns in the list:
    create-item.png

  3. Add another step and select the SharePoint Add attachment action. Enter the same Site Address and List Name as the previous step.

  4. Next, select ID from the dynamic content options for the Id option. This ID will link the attachment to the item that you just created.

  5. Select Name from the dynamic content options for the File Name option. If the File Upload field is inside a section, make sure to reference the name of the section first, followed by the Name value (ex: “Name”). Once you add the File Name, the Add attachment action will automatically be placed in a Apply to each section.

  6. Select Content from the dynamic content options for the File Content option (ex: “File”).
    add-attachment.png

  7. The finished flow should look similar to the one below:
    finished-flow.png

Make sure to save your flow, and test it out by submitting an entry with a file uploaded to the form.