I am using powershell script and smpt server to send email.
I am reading the html file from local path to send the actionable message for email.
Below is my html file:
<script type="application/adaptivecard+json">{
"type":"AdaptiveCard",
"version":"1.0",
"hideOriginalBody":true,
"body":[
{
"type":"TextBlock",
"text":"Visit the Outlook Dev Portal",
"size":"large"
},
{
"type":"TextBlock",
"text":"Click **Learn More** to learn more about Actionable Messages!"
},
{
"type":"Input.Text",
"id":"feedbackText",
"placeholder":"Let us know what you think about Actionable Messages"
}
],
"actions":[
{
"type":"Action.Http",
"title":"Send Feedback",
"method":"POST",
"url":"https://...",
"body":"{{feedbackText.value}}"
},
{
"type":"Action.OpenUrl",
"title":"Learn More",
"url":"https://learn.microsoft.com/outlook/actionable-messages"
}
]
}</script>
Visit the Outlook Dev Portal to learn more about Actionable Messages.
reference :https://learn.microsoft.com/en-us/outlook/actionable-messages/send-via-email#feedback
only body tag part is visible in outlook not the json part.
Why the Json is not working?
What is the correct way to use this code?
What is file name i should use either filename.html or filename.Json?
JSON is working in codeplayground and not working if i save the filename as .html and .JSON.
Kindly guide me.
It would be grateful if someone help this out.
Thanks.
"The originator property must be set to a valid provider ID generated by the Actionable Email Developer Dashboard. Leaving this property empty when sending to others results in the card being removed."
If you just want to test the sender and the recipient has to be the same account.
Related
I have no JSON knowledge at all. I am using a ticketing system and need help to setup on below code that the ticket comments are also emailed to the user. I am adding on CC and that the email must be in plain text when received on the other end. Not sure if this is possible at all, but please if it is would greatly appreciate any help I can get.
{
"request": {
"email_ccs": [
{ "user_mail": "joeblog#myemail.com", "action": "put" }
]
}
}
I am getting a JSON response back from my API get request. Within the response, there are some HTML elements like anchor tags and line breaks.
How can I display that response and have those html elements appear as actual elements instead of JSON?
For example, this is part of my response:
[
{
"commentDescriptions": [
{
"commentDescription": "Corrections can be made 24 hours after
submitting your application by logging back into your application at <a
href=http://www.somewebsite.org/ style=font-size:inherit;font-
weight:bold;>www.website.org</a>. You must use your User ID and password to
retrieve your application. If you need additional help with your application,
contact the Customer Relations Branch by email at <a
href=mailto:support#email.com style=font-size:inherit;font-
weight:bold;>websitelink</a>.<br/> If your mailing address or email address
changes, you must make the correction on your Application. </br><a
href=https://www.mywebsite.com/ style=font-size:inherit;font-
weight:bold;>Click here</a>
},
]
}
]
I cannot use any external libraries, packages or jquery. All must be done with Angular 7.
here's a newb question. I created an adaptive-card for use in outlook that has an action.http that sends a POST to a webhook url with a single variable entered by the user, which is an email address. This is working great, now i want to use that to send the same message to the user in Teams and as a notification in Windows. I am using Flow and selected the "Post your own adaptive card as the Flow bot to a user". I then entered my json code that i used for the adaptive card for outlook but it doesnt work. So I would assume since the action.http seems to only be available for outlook that I have to change that action for teams to be an action.submit, but then im stuck, where is it submitting to? how do i have it do a POST to my webhook url with the variable data entered by the user?
I did make sure i have the flow bot added to teams and logged in and approved for use for my user for testing. I have also added App Studio to teams and then used it's "card editor" to tweak and practice with the code for the adaptive-card in Teams. I changed my action to be action.submit and finally got a button to appear in the card in Teams but i dont know how to deliver the data which should be the email the user enters, "{\"email\":\"{{email.value}}\"}" to a url using a POST. I dont know what happens when they hit the action.submit button. I have also scoured the internet and microsoft docs for a better understanding but there are no examples of this that I have been able to find.
I used this in the original Adaptive.Card for outlook
{
"type": "ActionSet",
"horizontalAlignment": "Center",
"actions": [
{
"type": "Action.Http",
"title": "Button Text",
"method": "POST",
"body": "{\"email\":\"{{email.value}}\"}",
"url": "mywebhookurl"
}
You are correct that Action.Http is currently not supported in non-Outlook Adaptive Cards. Therefore, you currently have no way of using a Teams Adaptive card to reach your webhook URL.
Action.Submit is generally meant to go to a bot. In this case, it would be Flow, but this isn't currently supported in Flow.
Thankfully,
The fully-custom / interactive card is a scenario we have on our radar.
So unfortunately, you're not doing anything wrong. It just isn't supported yet. I'd imagine that this is why the "Post your own adaptive card..." flow is still in preview:
I have created a script to automatically send a subscription-confirmation e-mail when a client submits a form.
In the e-mail, I embed an image that is fetched from my website with the UrlFetchApp class (https://developers.google.com/apps-script/reference/url-fetch/url-fetch-app).
var logoUrl = "https://my.site.com/path/to/logo.png"
var logoBlob = UrlFetchApp.fetch(logoUrl).getBlob().setName("logo");
...
MailApp.sendEmail({
to: client.email,
subject: "...",
htmlBody: // html with reference to image like this:
"<img src='cid:logo' width='107' height='160'/>"
,
inlineImages: {
logo: logoBlob,
}
});
Since last week, this UrlFetchApp line causes a time-out error (error message in Dutch):
Time-out: https://my.site.com/path/to/logo.png (regel 4, bestand 'inschrijvingsbevestiging', project 'inschrijvingsbevestiging')
This has worked before without any problem, the image file also is accessible from the given URL with a browser.
I'm new to javascript and google-apps-scripts so I have no idea where to start searching for a solution. The reference manual does not mention the time-out.
Any ideas on how to solve this?
EDIT When I change the logoUrl path to some other image (I tried "https://www.google.be/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png", the script works fine. So maybe there is a problem with my site?
EDIT 2 Since the script works fine with another logo, the problem must lie on my webhost. I worked around the problem by putting the logo on my Drive, as suggested in the comments.
The integration guidlines for the Spotify Apps API mentions DefaultTabs and how it should be expressed in the manifest.json file to achieve tabbing in your Spotify app. Unfortunately I have problem getting this to work and the app that it refers to (Tabs, with the URI spotify:app:tabs) for example doesn't exist in my preview build of the Spotify application.
The application can specify what tabs it wants in the manifest file, in the DefaultTabs attribute. The attribute must be a list of records. Each record must contain the attributes arguments and title. The title can, and should, be localized by making it into a record with attributes for each language (currently en, fr and es).
I have tried the following:
Adding this snippet to my manifest.json file:
"DefaultTabs": [{
arguments: [],
title: {"en": "På TV4"}
}
]
Quitting the Spotify application and reloading it.
Load my app by entering it's address spotify:app:name in the address field.
Here I expected to see the tabs loaded, but it wasn't. Any help with the correct syntax would be appreciated.
I had a few issues at first too, but the following snippet works for me:
"DefaultTabs": [
{
"arguments": "test",
"title": { "en": "test" }
},
{
"arguments": "test2",
"title": { "en": "test2" }
}
]
I think you are probably missing the arguments.
Also check out the Kitchensink demo app and sourcecode in GitHub: https://github.com/ptrwtts/kitchensink