1

I have created a form using InfoPath in one of my SharePoint list. I have added a send email workflow on the same list.

I want to send an email when people submit this form.

The send email workflow worked. However, I realized that every time I submit the form, it sends email to people/person that I choose while creating the workflow.

Is it possible to send an email to different people(people that I have not chosen while creating the workflow)?

3

Depending on your requirements you could do one of these options:

  • Add a people picker field to the InfoPath form to directly add the people involved to the form. From there if you push that field to the SharePoint list as a column, you can reference that column in SharePoint Designer's workflow.
  • Add a column or two in the form library that you fill out manually once the form has been submitted. From there you can reference that column in the workflow designer.
  • Make a new list with a text column and X people-picker columns. Connect that list as a data connection and put the contents of the text column as a dropdown menu. From there you can use the value that the user selected to look up the other X people picker columns from your workflow to reference in your email.
  • A poor choice is to make N versions of your workflow that reference the N different sets of people you may want to email. But this is not advised.

Do any of these ideas seem viable for your situation? If not, can you explain more of what's going on? Things like how many sets of people are there? Or are they random people each time?

If you need help brainstorming more, let me know. I can even toss up an example or two if you're interested.


EDIT 1:

Updating for example.I noted from another answer that you're using SharePoint 2013 and InfoPath 2013 and that I think you know how to publish forms. So from there...

Make sure you've got the Person/group Picker field added to your SharePoint library via the publishing wizard.

IMAGE: Example of added fields to column list...

Once you've finished publishing and have set up the submit connection, add your people. Here's an example where I add myself to the "From" and "To" fields.

IMAGE: Filling out sample form...

After submission to the library:

IMAGE: Showing submitted form in library...

In a new SharePoint 2010 workflow (here I'm using SharePoint Designer 2013 to make a 2010 workflow), make an email command. Here's how you find the people in question:

Inside a step, type "Email" and hit Enter. A command should show up that looks like below:

IMAGE: The 'Email' function in SharePoint Designer Workflows...

In the "To"

  1. Select the book to the right
  2. "Workflow Lookup for a User..."
  3. Under Current Item, find the field you named back when you added the fields from your form as a column to the library. I forgot to change the names to unique names, so here they both are called "Display Name" but you can name them whatever from the publishing wizard in InfoPath.

IMAGE: Adding the linked columns of people to emails...

Do the same in either the "To" or "CC" section of the email interface for whoever is supposed to be the "from" column. I put one in "to" and one in "cc" as I'm in both spots for my example.

Write your email how you want. You can add references to the people in your letter, or just make it generic. You can see part of an email in the background of the previous image I posted.

Save the workflow, and go back to the workflow's properties. Select "Start workflow automatically when an item is created".

IMAGE: Setting workflow to start on submission

Publish the workflow.

Doing a sample with the form that was created you can see I'm in both the "To" and "CC" sections of the email. If I had used someone else's email you'd notice that the To is to whom the task is assigned, and the CC is who sent the task.

IMAGE: Sample Email


EDIT 2:

Connecting fields to your SharePoint library: From the InfoPath Designer, go File > Publish (left hand side) > Publish Form to a SharePoint Library. From there the wizard should pop up:

IMAGE : Publishing Wizard Step 1. Site URL.

Enter the url to your site, including the protocol (http:// or https://). Click Next and select "form library":

IMGAE: Publishing Wizard Step 2. Type of Form.

Either create a new library, or select a library that you want to add the form to:

IMAGE: Publishing Wizard Step 3. Library selection.

Click Next, then "add" in the top section to add a column to SharePoint. Go into the folders and select either AccountId or DisplayName. DisplayName works for my email system. Not sure about yours. Set the three dropwdowns similar to below:

IMGAE: Publishing Wizard Step 4(ish). Selecting field for column.

Do the same with the other person picker. The window should look like this after adding the two people pickers as columns:

IMAGE: Publishing Wizard Step 4. Added Columns.

Click Next and Publish.

  • thank you @KGlasier for helping out! I am new to both sharepoint and InfoPath. Basically what I am trying to do is that anyone within the organization can go to the sharepoint site and utilize the form to assign people to do something. When the individual x assigns something to individual Y, both X, Y should receive an email saying that a form has been submitted. How do I go about this? – user10 Oct 31 '18 at 12:51
  • Here's an example @user10 . Let me know if this needs clarifying. – KGlasier Oct 31 '18 at 14:49
  • Please note that you have to publish the InfoPath fields to the SharePoint list through the publishing wizard. Otherwise you will not find them when you look through the "workflow lookup for a user.,.." above. – KGlasier Oct 31 '18 at 14:51
  • Hi @kGlasier, When I right click on the person/group field properties -> sharepoint server, it has the url of the sharepoint site to query for people/groups! Does this mean that the Person/group Picker field has been added to my SharePoint library via the publishing wizard. or not? If not how do you do that process? – user10 Oct 31 '18 at 15:14
  • 1
    It's working now! YAY! I messed up on the step ( adding the linked columns of people to emails (from the first edit)). I forgot to choose Display Name on "Return Field as." BUT it works now!! THANK YOU SO MUCHHH :) I really appreciate it! @KGlasier – user10 Oct 31 '18 at 16:32
1

Yes, it is possible to send an email to different person every time you submits the form.

To achieve this follow below steps:

  1. Add person or group field in your InfoPath form and SharePoint list. Say EmailReceiver.

  2. While writing email action in workflow, choose this EmailReceiver field in to section of email.

So every time you add any user/group in the EmailReceiver field, workflow will send an email to that particular person or group.

Use following links for more clarification about adding people picker field in infopath form & list and sending an email to the user in person or group field:

  1. Send e-mail in a workflow.

  2. Workflow to send email to contents of a people picker field.

  3. Send email using SharePoint Designer to the users in Person and group field.

  4. Create a column in SharePoint list or library.

  5. How to add people picker field in infopath 2010.

  6. How to add a People Picker to an Infopath for SharePoint Office 365.

  • thank you for helping out. How do I add person or group field in InfoPath form and sharepointlist? I am new to both InfoPath and sharepoint. Thank You!!! – user10 Oct 31 '18 at 13:10
  • Which version of infopath and sharepoint are you using? – Ganesh Sanap Oct 31 '18 at 13:22
  • Added last 3 links in answer. – Ganesh Sanap Oct 31 '18 at 13:36
  • I am using sharepoint 2013 InfoPath 2013!! – user10 Oct 31 '18 at 13:42
  • Try steps given in last 3 links to create people picker in sharepoint list and infopath form. – Ganesh Sanap Oct 31 '18 at 13:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.