The ability to send file attachments (such as uploaded files and generated documents) through Microsoft Power Automate is available to organizations on our Pro, Team and Enterprise plans.
When sending generated PDF or Word documents to SharePoint using Microsoft Power Automate, you must ensure that the name of the document contains the file type and can be accessed in the SharePoint database.
To send entry documents to SharePoint using Microsoft Power Automate:
Create a new flow. Search for Cognito Forms in the services list and then select a trigger.
Set Get Document as the first action. Set the name of the form in the Form field and set the Entry ID to the Entry Number dynamic element.
Set Template Number to the template you’d like to use. You can find this number in the Manage Document Template settings in your Cognito Forms account.
Add another step using SharePoint > Create file as the action.
Set the Site Address to the site where the file should be sent and choose the Folder Path for the folder where you’d like the document sent.
Set the File Name and File Content fields to the corresponding dynamic content elements under the Get Document step that was previously created.
When you’re finished, your completed flow should look something like this:
Make sure to save your flow, and submit a test entry to ensure that everything is working correctly.