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.
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.
Open Microsoft Power Automate page and go to My Flows → New → Automated - from blank.
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.
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.
Next, select the site address and the list name from a drop down.
Click New step and search for Send email action. Select ‘Send an email (V2)’.
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.
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.
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>
To send an email with multiple attachments, add these 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.
2. Initialize variable
Name the variable and set its type to ‘Array’.
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.
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":
}
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.
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.
Open Microsoft Power Automate page and go to My Flows → New → Automated - from blank.
Select the trigger that starts the flow. Search for Plumsail and select ‘Form is submitted’ trigger, click Create.
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.
Select ‘Enter custom value’ from a drop down and paste From ID that can be found in Flow Settings of the form.
To copy Form ID, open the form in the designer, go to Flow settings and do the following:
Make sure that ‘Trigger MS Flow when the form is submitted’ option is turned on.
Click Generate button and copy Form ID.
Click OK and save the form.
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:
Click New step and search for Send email action. Select ‘Send an email (V2)’.
You can add any dynamic content from the form to the subject and body of the email.
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.
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" />
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’.
To insert the HTML table to the email body, switch the body input to the code view.
Then, add output of the ‘Create HTML table’ step to the email body.
To send an email with multiple attachments, add these steps.
1. Initialize variable
Name the variable and set its type to ‘Array’.
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.
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":
}
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.