Use this guide to email a survey to the customer when an Opportunity is won, by building a record-triggered flow with Send InPoll Survey. For admins.
InPoll has no packaged flow for Opportunities, so you build it yourself. It follows the same pattern as the Case flow: a record-triggered flow, a condition, and the Send InPoll Survey action.
Before you start
- Create and publish a survey, for example a short satisfaction survey about the sales process. See Create a survey from a template.
- The survey site must be ready. See Set up the survey site (guided).
- In Setup, open Deliverability and set Access level to All email.
- Read Send a survey from any Flow, which explains every input and output of the action.
Choose who gets the survey
When the related record is an Opportunity, InPoll cannot find the person by itself. It does that only for a Case, a Contact or a Lead. You must give the recipient in the action, in one of two ways:
- Recipient Id: the Id of a Contact, Lead or User.
- Email Address: an email address.
If you fill in neither, nothing is sent and Message says: No recipient. Give a Contact, Lead or User, an email address, or a Case that has a Contact.
Suggestion: use the Opportunity's primary contact (not tested)
This part is not described in the InPoll source and has not been tested. It uses standard Salesforce Flow elements, so check it in your own org.
- Add a Get Records element before the action. Choose the object Opportunity Contact Role.
- Add the conditions Opportunity Id equals {!$Record.Id} and Primary equals True. Store only the first record.
- In the Send InPoll Survey action, set Recipient Id to the Contact Id of the record you got.
- Add a Decision before the action to skip the survey when Get Records finds nothing. This avoids a No recipient message.
If you do not use contact roles, you can fill in Recipient Id from another field in your own data model that holds the Contact.
Build the flow
- In Setup, enter Flows in the Quick Find box and click Flows.
- Click New Flow.
- Choose Record-Triggered Flow and click Create.
- For Object, choose Opportunity.
- For Trigger the Flow When, choose A record is updated.
- Under Set Entry Conditions, add a condition for a won Opportunity. For example, Won equals True.
- Under When to Run the Flow for Updated Records, choose Only when a record is updated to meet the condition requirements. This sends the survey once, when the Opportunity becomes won.
- Under Optimize the Flow for, choose Actions and Related Records.
- Click Done.
- Optional: add the Get Records element and the Decision from the suggestion above.
- Click the plus icon, then Action. Search for Send InPoll Survey and select it.

- Set Survey Name to the name of your published survey, or set Survey Id.
- Set Related Record Id to {!$Record.Id}. The answer is then linked to the Opportunity and to its Account.
- Set Recipient Id to the Contact you found, or set Email Address.
- Optional: fill in Email Subject and Email Message. For example, use {!Record.Name} to put the Opportunity name in the message.
- Click Done, then Save.
- Click Activate.
Test it
- Open a test Opportunity that has a Contact with your own email address.
- Move it to the won stage and save.
- Check your inbox for the email with the Start the survey button.
- In InPoll, open the survey and click Send. The Invitations table shows the invitation and its status.
If nothing arrives, read Message in the action output and see the troubleshooting list in Send a survey from any Flow.
Good to know
- The survey is sent once per person and Opportunity. If the Opportunity is updated again, InPoll shows Already Sent and does not send a second email.
- The answer is linked to the Opportunity (as its related record) and to its Account, and to the Contact when the recipient is a Contact.
- You can use the same pattern for other objects. Always give Recipient Id or Email Address unless the record is a Case, Contact or Lead.
