Forum Discussion

kaz01's avatar
kaz01
Brass Contributor
Jan 11, 2023
Solved

Track Who sent the form

Hello,

 

We have a post demo survey we would like to send out to prospects after a product demo. How can we track who the sender is? Our sender is an individual on our sales team.

 

We've thought of 1 option and that is to ask the responder for their presenter's name. 

 

Thank You!

  • kaz01's avatar
    kaz01
    Jan 13, 2023

    RobElliott 

     

    Thank you for this "out of the box" solution. Managed to follow your steps and set it up successfully. Team members are thrilled with this solution. Appreciate you sharing your knowledge. 

     

     

  • RobElliott's avatar
    RobElliott
    Silver Contributor

    kaz01 asking for the presenter's name is one option and probably the simplest. Forms doesn't have a method for doing what you want. But you can basically automate the process using a SharePoint list (with JSON-formatted button) and a flow in Power Automate.

     

    For the list you need a column for the email address of the recipient (I usually use the Title column for this), a column for the client, a single line of text column for the button, a single line of text column for the SentBy and a date/time column for the sent date & time.

     

    In Power Automate the trigger is the SharePoint "for a selected item" but add an text input where the person triggering the flow will enter their name.

     

    You then need a get item action to det the details of the selected item.

     

    You might not need this next action but I always use it to get a logo png image file from SharePoint to use in the email.

     

    Next, add a Send an email (v2) action. This will be sent from your email account which is why we've asked the sender to enter their name in the trigger.

     

     Finally for the flow, add an "update item action" which will add the name of the send and the current date and time into the list item. The expression for the Sent column is 

    formatDateTime(utcNow(),'yyyy-MM-dd HH:mm')

     

    For the button you will need the ID of your flow. Save the flow and copy the flow ID from the address bar. Then format the SendButton in advanced mode with the following JSON, replacing the flow ID with your flow ID, and you can change the button text in the txtContent line,  the panel header text and the run flow button text, all in the actionParams line:

    Spoiler
    {
    "elmType": "button",
    "txtContent": "Send Email and Form",
    "customRowAction": {
    "action": "executeFlow",
    "actionParams": "='{\"id\":\"8e02c945-b98d-4c7e-8ed9-39210cfaa205\", \"headerText\":\" ' + [$Client] + '\",\"runFlowButtonText\":\"Send\"}'"
    },
    "style": {
    "background-color": "#cf000f",
    "color": "white",
    "border-radius": "10px",
    "border": "1px solid"
    }
    }

     

     

    When the button is clicked in the list the flow panel will open, the sender will enter their name and click Send. The flow will run.

     

     

     

    The email will be received:

     

    And the SharePoint list will be updated with the name of the sale person sending it and the date it was sent.

     

    Hope that helps.

     

    Rob
    Los Gallardos
    Microsoft Power Automate Community Super User

    • kaz01's avatar
      kaz01
      Brass Contributor

      RobElliott 

       

      Thank you for this "out of the box" solution. Managed to follow your steps and set it up successfully. Team members are thrilled with this solution. Appreciate you sharing your knowledge. 

       

       

Resources