Skip to main content
All CollectionsIntegrationsOther IntegrationsMicrosoft Power Platform
Selecting Sharepoint document to send via GetAccept
Selecting Sharepoint document to send via GetAccept

Explains how you can automate GetAccept sending directly from Sharepoint by the click of a button

Updated over a week ago

How you can automate GetAccept sending directly from Sharepoint by the click of a button

Many companies have their important documents stored within their Sharepoint/Onedrive for Business account, but wants to be able to send important documents directly via GetAccept. This is possible to do with the help of Microsoft Power Automate and we'll show you how in a few steps.

  • First, you need to setup a Flow, that is triggered by Select a file in Sharepoint.

  • First select Create flow, choose Instant flow and find For a selected file (Sharepoint/Onedrive for business).

  • After you've created the flow you need to connect your Sharepoint site to the trigger:

  • In this example, we've connected the library called documents, but you can of course choose any library here.

  • As you can see, we've also added a few fields that we want the user to fill in to be able to send out documents.

  • We've also made some of these fields mandatory (such as recipient email and document title).

  • Here you could also add a Yes/No input if you would like to populate a checkbox in a GetAccept template.

  • The next step is to get the file properties:

  • Fill out the action in the following manner (if you have a different library name you should exchange Documents to your selected library name):
    โ€‹

  • The third step is to get the file content in order to be able to send it with GetAccept.

  • Find the action by clicking the plus sign and search for Get file content:

  • Input the file identifier that you collected from the previous step (Get file properties):

  • All set with fetching the file. Now you need to create and send out the document with GetAccept.

  • First, you click the plus sign and search for GetAccept.

  • Scroll down and select the action Create and send document or template:

  • Now we need to populate the sendout with the details from the document and input fields.

  • First, select Document name (from the first step), and choose send automatically if you want the document to be sent out automatically.

  • If you select no here, the document will be created as a draft in GetAccept:

  • The next input we need to add to the Create and send document or template-action is a bit trickier.

  • To be able to add the file content we need to add the following expression:

 base64(outputs('Get_file_content')?['body'])

here:

  • Almost done. Now we just need to add the final input parameters to the document:

  • The flow is now all setup for implementing in Sharepoint.

  • You can trigger the flow from either the top menu, or by adding a button in a new column in Sharepoint.

  • In this example, we're going to add a button in a column to Send out the document automatically.

  • To do this, you log in to Sharepoint, click Add column, and select More:

  • Name the column anything you want, in this example, we've named it GetAccept. Select Single line of text.

  • Scroll down and under Formatting add the following code.

  • Please note that you have to replace ID OF YOUR FLOW with the ID of your created flow:
    โ€‹

{ 
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "button",
"customRowAction": {
"action": "executeFlow",
"actionParams": "{\"id\": \"ID OF YOUR FLOW\"}"
},
"attributes": {
"class": "ms-fontColor-themePrimary ms-fontColor-themeDarker--hover"
},
"style": {
"border": "none",
"background-color": "transparent",
"cursor": "pointer"
},
"children": [
{
"elmType": "span",
"attributes": {
"iconName": "Flow"
},
"style": {
"padding-right": "6px"
}
},
{
"elmType": "span",
"txtContent": "Send with GetAccept"
}
]
}

  • The ID of your flow is found by going into your flow (or choose details) and copy the part after flow in the address field:

  • Now you are all set and your Sharepoint environment should look something like this (note the added GetAccept column):

  • Whenever a user clicks Send with GetAccept, the flow is triggered and the user is asked to enter the details and click Run flow and the document will automatically be sent out to your recipient:

  • Of course, it is possible to adjust and customize this flow. In our example, we've added an SMS notification (but could be sent in Teams also of course).

  • You could also further add script to show the current status of the document sent, disable the send button if the document has been sent, and much more (but these are beyond the scope of this guide).

  • You can read more about formatting a button to launch in Sharepoint here

Did this answer your question?