Hi,
On a monthly basis, I would like to send and email to our users asking them a simple Yes/No questions. Their answer should then update a record that exist in CDS.
Is it possible to create an URL with parameters, that triggers a flow which updates a record in CDS? E.g. if the user click the Yes link in the email, the record will be updated accordingly?
Solved! Go to Solution.
Hi
'When a HTTP is received' is an independent flow listening for users clicking on 'Yes' or 'No' link.
You can see the technique in this flow example I am currently using:
So on the email I am implementing different links, all of them pointing to this second flow.
Depending on the link I click on, the variables defind on relativePath: {currentOEM}, {MessageID} and {DekaCertificationID} take different values.
In your case, you will need to handle a variable to track the record the response is related (user responding), another variable to identify the question you are making, and a third one for the answer given.
When user X clicks a YES/NO answer, your second flow is executed, you get user identity from user variable, you also identify the question from question variable, and finally identify answer from answer variable
So your relativePAth should probably look like this:
recordID/{recordID}/questionID/{questionID}/answerValue/{answerValue}
I would suggest you to build your second flow following this advice, add relativePath to the trigger, make sure method is set as GET instead of POST. Then add it a dummy Compose action block to print the variables you are getting from the URL.
SAve it, and copy the trigger URL by clicking the icon on the right.
The https URI I get from my example has this format:
xxxxxx.westeurope.logic.azure.com/workflows/yyyyyyyyyyyyy/triggers/manual/paths/invoke/OEM/{currentOEM}/Message/{MessageID}/DekraCertification/{DekraCertificationID}?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=zzzzzzzzzzzzzzzzzz
Then paste the URL (dont forget https://) on your browser, replace {variables} with dummy values, hit Enter and see this new PA flow execution. If succeded, you can add relevant steps after the dummy Compose, i.e. update the record identified by the recordID in the URL with the given answer.
Once you achieve this, we can start working with the URLs to be added to the email
Please note this technique has some security concerns
Hope this helps
Proud to be a Flownaut!
Yes!
Please have a look to 'When a HTTP is received' trigger in this official link:
https://docs.microsoft.com/en-us/azure/connectors/connectors-native-reqres
Since you will trigger the flow from a link in an email, yuo should add parameter values on the Request URI, this means you need to declare them in the trigger Relative path instead of JSON body. THis technique is explained here:
https://powerusers.microsoft.com/t5/General-Power-Automate/HTTP-request-trigger-MS-Flow/td-p/83574
Hope this helps
Proud to be a Flownaut!
@efialttesthanks for the input. I think I need a bit more guidance on this as I really don't not where to start with this HTTP/jason stuff 😊
My initial thought was to build the flow like this - but do I need to start the with the 'When a HTTP is received'?
1. Trigger the flow on a monthly basis
2. Find the users that needs to be notified
3. For each user, create a new record
4. Send an email to the user with Yes and No links
5. Update the the record created in step 3 with Yes or No based on the input from the email
Like this:
Hi
'When a HTTP is received' is an independent flow listening for users clicking on 'Yes' or 'No' link.
You can see the technique in this flow example I am currently using:
So on the email I am implementing different links, all of them pointing to this second flow.
Depending on the link I click on, the variables defind on relativePath: {currentOEM}, {MessageID} and {DekaCertificationID} take different values.
In your case, you will need to handle a variable to track the record the response is related (user responding), another variable to identify the question you are making, and a third one for the answer given.
When user X clicks a YES/NO answer, your second flow is executed, you get user identity from user variable, you also identify the question from question variable, and finally identify answer from answer variable
So your relativePAth should probably look like this:
recordID/{recordID}/questionID/{questionID}/answerValue/{answerValue}
I would suggest you to build your second flow following this advice, add relativePath to the trigger, make sure method is set as GET instead of POST. Then add it a dummy Compose action block to print the variables you are getting from the URL.
SAve it, and copy the trigger URL by clicking the icon on the right.
The https URI I get from my example has this format:
xxxxxx.westeurope.logic.azure.com/workflows/yyyyyyyyyyyyy/triggers/manual/paths/invoke/OEM/{currentOEM}/Message/{MessageID}/DekraCertification/{DekraCertificationID}?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=zzzzzzzzzzzzzzzzzz
Then paste the URL (dont forget https://) on your browser, replace {variables} with dummy values, hit Enter and see this new PA flow execution. If succeded, you can add relevant steps after the dummy Compose, i.e. update the record identified by the recordID in the URL with the given answer.
Once you achieve this, we can start working with the URLs to be added to the email
Please note this technique has some security concerns
Hope this helps
Proud to be a Flownaut!
@efialttesthanks for the thorough reply.
Right now, this seems a bit to steep for me. Moreover, it might also a bit of overkill compared to what I'm trying to save a few clicks with 🙂
There are also some licenseing questions, when I run a flow that's not triggered from my Dynamics 365 environment - and then you also mention security concerns.
It might be something I come back to later to investigate the possibilities. And I hope others will find your posts helpful.
Once again, thanks for the help.
Thank you for your kindness, I understand your concerns since the scenario discussed is one of the trickiest with Microsoft Flow.
Hope to hear from you if you manage to get it working in the future, in the meantime we will continue trying to help this community to keep on growing
BR
Proud to be a Flownaut!
Can i get email subject without adding it to link parameters?
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
User | Count |
---|---|
43 | |
18 | |
15 | |
14 | |
12 |
User | Count |
---|---|
77 | |
38 | |
29 | |
20 | |
19 |