How to send email notification after submitting SharePoint form with Power Automate

Using Power Automate (MS Flow), you can send a customized email with form data. You can create a flow using a default SharePoint connector or Plumsail Forms connector.

The default SharePoint connector can be used if your form has SharePoint fields only.

But in case you want to utilize Plumsail common fields or controls in your flow - you need to use Plumsail Forms connector.

SharePoint connector

Here you find instructions on how to create an automated flow using SharePoint connector from scratch. You can also create the same flow from the Microsoft Power Automate template and jump to Configure ‘Send an email’ action step.

Configure the Flow

Open Microsoft Power Automate page and go to My FlowsNewAutomated - from blank.

Creating a flow


Select the trigger that starts the flow. Search for SharePoint, and you will see all triggers related to SharePoint events. Select ‘When an item is created’ trigger and click Create.

Selecting a trigger


If this is the first time you are using the SharePoint connector, you will be asked to sign in to create a connection. Click Sign in and enter your SharePoint credentials.

Setting up SharePoint connector


Next, select the site address and the list name from a drop down.

Selecting site and list name

Configure ‘Send an email’ action

Click New step and search for Send email action. Select ‘Send an email (V2)’.

Adding send email action


You can add any dynamic content from the SharePoint item to the subject and body of the email. For instance, invoice ID and the name of the user who created the item.

Email example

Adding Ink Sketch to email body

The Ink Sketch control picture is stored as a base64 string. To insert a base64 string to the email body, first, you need to switch the body input to the code view.

Code view

Then, paste this HTML code line to the email body and add field that stores Ink Sketch data from the dynamic content.

<img src= alt="img" /></p>

insert InkSketch

Adding attachments to email

To send an email with multiple attachments, add these steps.

Flow steps


1. Get attachments

Returns the list of attachments for the specified list item. Specify site address and list name, and add current item ID from the dynamic content.

Get attachments


2. Initialize variable

Name the variable and set its type to ‘Array’.

Initialize variable


3. Get attachment content

Add ‘Apply to each’ action for iterating through the attachments. ‘body’ is the output from ‘Get Attachments’ step

Insert the ‘Get attachment content’ action inside

Specify site address and list name. For the ID field select ID output from the ‘When an item is created’ trigger. For the File identifier field select the Id output from ‘Get Attachments’ action.

Get attachment content


4. Append to array variable

Add ‘Append to array variable’ action inside ‘Apply to each’ step. Select the variable name from the drop-down. In the value section, map file name and its content.

{
"Name": ,
"ContentBytes":
}

Append to array variable


5. Send an email (V2)

Now you can add the attachments array to the email template.

Go to ‘Send and email’ action. Сlick Show advanced options, switch attachments field to input entire array. Add the variable output to the attachments input field.

Send an email with attachements

Plumsail Forms connector

If you want to send an e-mail with common fields and do not want to save them to a SharePoint item, use Plumsail Forms connector.

Important

Plumsail Forms connector submissions are licensed under Public Web Forms license, not SharePoint Forms license.

Here you find instructions on how to create an automated flow using Plumsail Forms connector from scratch. You can also create the same flow from the Microsoft Power Automate template and jump to Configure ‘Send an email’ action step.

Configure the Flow

Open Microsoft Power Automate page and go to My FlowsNewAutomated - from blank.

Creating a flow

Select the trigger that starts the flow. Search for Plumsail and select ‘Form is submitted’ trigger, click Create.

Trigger


If this is the first time you are using Plumsail Forms connector, you will be asked to sign in to Plumsail account to create a connection. Click Sign in and enter your account credentials.

connection


Select ‘Enter custom value’ from a drop down and paste From ID that can be found in Flow Settings of the form.

Adding form ID


To copy Form ID, open the form in the designer, go to Flow settings and do the following:

  1. Make sure that ‘Trigger MS Flow when the form is submitted’ option is turned on.

  2. Click Generate button and copy Form ID.

  3. Click OK and save the form.

Form ID


Using Plumsail Forms connector the form data is submitted as JSON. To parse all the data, add ‘Parse JSON’ action. For the Content field select body of the form, and for the Form Schema - paste Form Schema from Flow Settings:

JSON

Configure ‘Send an email’ action

Click New step and search for Send email action. Select ‘Send an email (V2)’.

Sen an email step


You can add any dynamic content from the form to the subject and body of the email.

Email

Adding Ink Sketch to email body

The Ink Sketch control picture is stored as a base64 string. To insert a base64 string to the email body, first, you need to switch the body input to the code view.

Code view

Then, paste this HTML code line to the email body and add field that stores Ink Sketch data from the dynamic content.

<img src= alt="img" />

insert InkSketch

Adding DataTable to email body

The DataTable control is stored as an array of objects.

Add ‘Create HTML table’ step to convert an array of objects to HTML table. For the From field select DataTable control from the dynamic content and set Columns to ‘Automatic’.

Create HTML table


To insert the HTML table to the email body, switch the body input to the code view.

Code view


Then, add output of the ‘Create HTML table’ step to the email body.

add HTML table

Adding attachments to email

To send an email with multiple attachments, add these steps.

Flow steps

1. Initialize variable

Name the variable and set its type to ‘Array’.

Initialize variable

2. HTTP

Add the ‘Apply to each’ action for iterating through the attachments. ‘Attachments1’ is the common field output.

To get the content of the attached files add ‘HTTP’ action. Select GET in Method dropdown field and add url to the Uri field.

HTTP


3. Append to array variable

Add ‘Append to array variable’ action inside ‘Apply to each’ step. Select the variable name from the drop-down. In the value section, map file name and its content.

{
   "Name": ,
   "ContentBytes":
}

Append to array variable


4. Send an email

Go to ‘Send and email’ action. Сlick Show advanced options, switch attachments field to input entire array. Add the variable output to the attachments input field.

Send an email with attachements