Azure logic apps 'o365 connector' action 'send approval email' returning null for property 'useremailaddress'. Why? - azure

Azure logic apps 'o365 connector' action 'send approval email' returning null for property 'useremailaddress'. Why?
The Azure logic apps documentation for the 'office 365 outlook connector' shows that the 'ApprovalEmailResponse' object returns 'SelectedOption' and 'UserEmailAddress'. I get the correct value back for 'SelectedOption' but 'UserEmailAddress' always returns 'null'.
https://learn.microsoft.com/en-us/connectors/office365/#approvalemailresponse
How do I get the --> email address <-- of the user that selects 'Approve' or 'Reject' buttons in the email? If an email is forwarded to another person I would like to know who (email address) clicked approve or reject.
***This is what I get if I use the recommended settings mentioned in the replies below. For production we want to set "Use only HTML message" and "Show confirmation dialog" both set to "yes".

After reproducing from our end, we understood that the messages which are recorded as HTML messages aren't capturing all the responses. For this, Make sure you have the below parameters set Hide HTML message to 'yes'.
RESPONSE REQUEST IN OUTLOOK
AFTER RESPONSE HAS BEEN RECORDED
UPDATED ANSWER
Logic App outlook connector:
result:

So... It looks like (in this particular action) the only way to get the email address of the person that clicks approve or reject is to not use HTML and to instead rely on using the action card, that is provided by the logic app action, in the email. With 'Hide HTML message' set to 'yes'. However... I was not able to find a way to render my custom card from the one provided in the email. As a workaround, I use markdown in the body of the action. Not great but looks the same as the HTML version I was going-for. If anyone can figure out how to edit/customize the card that is provided in the email by this specific logic app action. Please... let me and Microsoft (sarcasm) know.

Related

How to determine which user clicked on a button

I'm sending messages with block elements (buttons) to channel using Slack API. How can I get the username displayed when someone approves or rejects the request? I send the message using chat.postMessage.
You should have interactivity enabled for your app. Since you are using buttons you need to reference how to handle interactive components. Essentially, you need to give your buttons an action_id which is it's unique identifier and will help you determine the source of the action (including the user) when the button is clicked. You will parse the action payload that sent to your app to get the user information you need and use that information in a subsequent call to chat.postMessage.
I was having trouble getting the user with the payload, using body instead worked for me:
In Bolt Python:
#app.action("approve_button")
def approve_request(ack, say, body, payload):
# Acknowledge action request
ack()
user_details = body['user']
username = user_details['name']
.....

How do you call a 3rd party API from inside watson assistant?

Creating a chatbot using IBM's Watson Assistant, and I need to make a determination I'm trying to send the zip code to a third party API that will return the city and state so I know where the client is located so I can (a) know which services are available and (b) have a better idea on how to direct the conversation from there. But I am at a loss as to how to do this.
I can do this from within Python, but trying to code it in a JSON editor doesn't work.
Webhooks are used to do this from inside the Dialog skill in an Assistant.
IBM Watson Assistant webhooks documentation
The docs do not mention it, but the Assistant will POST to the URL with a JSON body containing the parameters you specify as key value pairs. For example if in the Dialog Node the context variable $zipcode equals '99501' and you specify the parameters "key" = zipcode and "value" = "$zipcode".
Then the HTTP post body is
{ "zipcode" : "99501" }
The response from the service is put into another context variable, and this can then be used for other things. For example in the Dialog Node which calls the webhook, in the "Return variable" section put webhook_result_zipcode to put the response into that context variable.
You can also in the dialog node Assistant responds section, return a message which contains some part of the webhook response. For example in the Dialog Node editor
"If assistant recognizes" $webhook_result_zipcode "Respond with" The code is "$webhook_result_zipcode.response.result.sent" This will tell the user the code which is returned deep within the webhook response in response.result.sent in the response body.
You can also click the Cog next to the response, and in the dialog, click ... next to "Assistant responds" and open the context editor. This opens a context editor (at the top of the dialog) which allows setting of another context variable from part of the webhook response. For example under "Then set context" for "Variable" set zipcode and for "Value" set "$webhook_result_zipcode.response.result.sent.zipcode". This will extract a zipcode value from deep within the webhook response and place it in the context variable zipcode.
Of course then you must find a zipcode location service which accepts a HTTP post and looks for the code in the body.

IFTTT Webhooks - Not receiving email (but the response says that it was sent)

I'm following this tutorial to send email in App Inventor: https://www.hackster.io/taifun/trigger-ifttt-to-send-an-email-using-app-inventor-9df505 (You will have to scroll down on the page to view the tutorial)
The tutorial is straight forward and easy to understand. However, the IFTTT service (Maker) is now called "Webhooks".
I don't know what else has changed since that tutorial was written.
Following the tutorial:
the URL is correct https://maker.ifttt.com/trigger/Sendmail/with/key/*MYKEY*
the RequestHeaders are correct Content-Type: application/json
the PostText is correct: { "value1" : "faeryofiris#gmail.com", "value2" : "test", "value3" : "test body" }
I have double and triple checked for spelling errors.
Once I click a button to send this email, I receive the response:
"Congratulations! You've fired the Sendmail event!"
Except... there is no email. Both emails are my actual emails, so they are valid emails. "faeryofiris#gmail.com" should be the "FROM" email, and "pixiibomb#gmail.com" is the email that is registered on IFTTT (this should be the email that receives a message from faeryofiris) I keep refreshing my gmail, and still... no email.
Any ideas?
I've run into this issue several times. The solution has always been to click "Edit Connection" on the Webhooks Service Settings page. This will get you a new key. It doesn't solve their issue which is that keys tend to die for no explained reason but it should get your setup working again.

Gmail unsubscribe link shows 'undefined', though link is correct

In Gmail when you have an email from a newslist, you get a 'unsubscribe' link next to the email address, like this:
Google+ <noreply-67e4f7ae#plus.google.com> Unsubscribe
If you click it, it says:
Unsubscribe from Google+
Google+ provides a page at plus.google.com
where you can manage your email subscriptions. Learn more
Okay, when I send newsletters, I get the following message with 'undefined' instead, note that the link is actually right, it's just the text label that's wrong:
Unsubscribe from newslist#mywebsite.com
Sender provides a page at
undefined where you can manage your email subscriptions. Learn more
I'm sending the following header:
List-Unsubscribe: <mailto:unsubscribe-request#mywebsite.com?subject=Unsubscribe+my+newsletter>,
<http://www.mywebsite.com/instant_unsubscribe.php?id=111&email=myemail#mywebsite.com>
Any ideas how I stop is saying 'undefined' and change 'sender' to my website?
Thanks!

Sharepoint task list doesn't send email on item creation

I've created a custom workflow which creates a task item when the workflow is kicked off.
alt text http://img19.imageshack.us/img19/2862/screenshot310200942100p.png
I've also created a few custom content types for the document library and task list.
For the document library:
First, I add a document library and configure it to allow custom content types. Then I add my content type, which is based off the document content type. After, I add a workflow under workflow settings. Here, I select my custom workflow, give it a name and tell sharepoint to create a New task list to store the tasks in.
For the task list:
Now that I have a sharepoint created task list, I go there and allow custom content types and make sure "Send e-mail when ownership is assigned?" is set to Yes. Then I add my two custom content types which are both based off a workflow task content type. Thats all I should do.
When I start my workflow, it does add the approval task (I'm using a CreateTaskWithContentType activity which is named createApprovalTask), but no email is sent out for the created task.
The code I'm using in the createApprovalTask activity is:
// make a new GUID for this task
createApprovalTask_TaskId = Guid.NewGuid();
// set simple properties of task
createApprovalTask.TaskProperties.AssignedTo = "a valid domain\user";
createApprovalTask.TaskProperties.Title = "Review Contract: " + approvalWorkflowActivated_WorkflowProperties.Item.DisplayName;
createApprovalTask.TaskProperties.SendEmailNotification = true;
If I create a document library and use one of Sharepoint's built-in workflows (Approval for example), and tell it to create a task list for it, when an item is added to that list, it sends out the email correctly. So, the setting for the outgoing mail server are correct, as we're receiving other emails just fine.
I'm using a SendEmail activity right after the createApprovalTask activity to send an email back to the submitter telling them we've received their approval request. The code for that is something similar to:
sendApprovalRecievedEmail.Body = emailBody;
sendApprovalRecievedEmail.Subject = emailSubject;
sendApprovalRecievedEmail.To = emailTo;
sendApprovalRecievedEmail.From = emailFrom;
This works, so the submitter receives their custom email, but the task owner never receives the task item email.
Unfortunately, our mail servers were blocking the emails for some reason. I wasted a good 2 1/2 days searching around for this problem...and it turns out our IT department didn't have their sh*t together.
Thanks everyone.
you have to make sharepoint outgoing email settings properly.
example is shown in below link
http://sharepoint-amila.blogspot.com/2008/02/outgoin-email-settings.html
if you need to send an email through the c#.net code you can use below method to send emails in custom workflows.
SPUtility.SendEmail Method (Microsoft.SharePoint.Utilities)
example is shown in below link
http://www.sharepoint-amila.blogspot.com/
Is it possible to point out a SharePoint user by "domain\user" like you do with createApprovalTask.TaskProperties.AssignedTo? Isnt the ID required?
"id;#domain\username"

Resources