Testing email markup against myself not working - google-schemas

I've used this schema example and sent myself an email using the Email Markup App Script.
The mail is recieved but no Event card is shown. I've also validated it with the Google Markup Validator, and I'm not missing any required field. What am I doing wrong?
PD: Only "Action" markup worked for me.

#whitenoisedb I see that you've tried sending the lodgingreservation schema to yourself. If you're copying and pasting the example without modifying the checkinDate and checkoutDate attributes, your card will not generate until 2017.
"checkinDate": "2017-04-11T16:00:00-08:00",
"checkoutDate": "2017-04-13T11:00:00-08:00"
Use a current checkinDate (ex. 2015-12-15T16:00:00-08:00) instead.

If the dates are coming up soon and it is still not showing, there is a chance that this type of Google cards are not supported in your country

Related

ruby on rails how to input text into a website after using Nokogiri to open it

I'm writing a unit test for our app for the forget password mutation. The mutation will send the email with the new randomly generated password to the provided email address, and I want to test this. Right now I'm using this to access yopmail.com
doc = Nokogiri::HTML(open("https://yopmail.com/en/"))
puts doc.to_html
On yopmail.com, there's an input box where u input the disposable email to get to the inbox, I just want to know how I would input the disposable email that I generated in my code into yopmail using Nokogiri or whatever other means. Sorry if the explanation isn't clear, I'm not sure how to make this completely make sense. Thank you.
As TTD already mentioned, Nokogiri can only parse HTML / XML but you can't really control the input (although you can alter the HTML itself but that doesn't help for your problem).
What I would do is to avoid entering user input as it will also make your tests a lot more flaky. You can get your mailbox for instance with https://yopmail.com/?<name-of-your-inbox> so you don't have to enter any input.
Unfortunately, yopmail seems to not offer any API. If you're not bound to yopmail, you could for instance try https://rapidapi.com/Privatix/api/temp-mail which offers an API and it make it easier to parse the email results.

Code by Zapier - Input data field losing information when trying to execute code

I am using code by zapier, javascript.
I've used before and never had problems.
But today, as I am trying to create a new zap, I am reading data from trello and then trying to process the data with code by zapier.
I am filling data coming from trello in the field "Input Data", and then, trying to read the input data in my code using:
var cards = inputData['cards'].split(",");
The problem is that when I test the code, I receive an error:
TypeError: Cannot read property 'split' of undefined
When I go to check the Input Data field, it is losing the information.
Even if I type again, the Input Data information is not storing what I am asking there.
Any ideas?
Thank you
Amanda
Thank you everyone. I haven’t changed a thing.
I’ve tried in the next day with the same zap and that initial code that I posted.
Zapier was cleaning out the field with the data input from Trello (wasn’t detaining the value to pass to the next step).
Now it’s working. As I tried with different browsers on the same day and it was equally not working, I believe it was a bug that was fixed.

Can't get rid of "via" text for Twitter share button

I'm working in a Rails 3.1.8 app and I'm having a problem creating a Twitter share button that produces the text I want. Here is the erb code for the button:
Tweet
This button appears on a page that contains content produced by a particular user. Let's call the user "sam". The text this code produces to be shared on Twitter is:
[some_text] [url of current page] via #sam
I would like to remove the "via #sam", but I cannot figure out how. If I explicitly set data-via I can change the user that the "via" phrase refers to, but I cannot make it disappear.
This support page suggests that omitting the data-via tag should do the trick, but I have found that it does not.
I've searched around the app to try to find a place where this parameter is being set, but I haven't found anything. However, as I'm pretty green with Twitter stuff, I may not be searching for the right thing.
Thanks in advance for your help, and do let me know if I can provide additional info.
ADDENDUM: I've tried add setting data-via to various values, including false, "false", and "", as well as appending ?via= and analogous values to the share URL. Each of these attempts resulted in a bogus via phrase (e.g. "#false"), or a default to "#sam".
Maybe you have an old version of the Javascript being included or cached.
Taking examples from https://dev.twitter.com/docs/tweet-button works as expected when omitting the data-via attribute.
Tweet
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
Working example: http://jsbin.com/uxopur/2/

MVC 4 Tutorial validation errors

I'm following the MVC 4 tutorial and I'm having some trouble with decimals and date validations.
When I try to insert a date in format dd-MM-yyyy (because it is the format defined in the Culture I have my pc in) it returns this error: The field ReleaseDate must be a date.
Also when trying to insert a decimal field like 3,01 it returns a validation message: The field xpto must be a number.
You will probably say in these case to use a dot for this but in the culture i'm using that is the thousands separator like 1.000
Is this a general problem or it is just me?
Thanks in advance for your help.
By "My PC" I assume you mean client side, the browser validation fails? See my article http://msdn.microsoft.com/en-us/library/gg674880(VS.98).aspx - jQuery moved the local specific files so you will have to hunt for them. For debugging 1. disable client side validation and verify server validation works with your local (ie, decimals and dates in your local). Then it's a matter of getting the correct client side validation. This is not really an MVC question, it's more of a "jQuery non-english date/time & decimal validation" type question. You might have to post this question again. Once you solve this, please post your solution.
To solve this quickly, create the simplest possible HTML page with jQuery validation that fails, then post the repro. You can look at the generated HTML from MVC to help you create a simple HTML page.
You can change this behavior by setting the input culture: http://msdn.microsoft.com/en-us/library/bz9tc508.aspx. You can fix it on a specific culture or use 'auto' so the browser will use the user's current culture.

Salesforce Create Buttons and Links option - Custom URL to launch email template

I have an email template that I would like to launch from within the case using a Link/Button. I see the option under setup->customize->cases->button and links I even see where I need to place the URL. What I don't see is nay documentation on how to build the URL to launch an email template. Any help you be great
I don't know if this is documented anywhere by salesforce, but I found from some guess work:
/_ui/core/email/author/EmailAuthor?p3_lkid={!Case.Id}&p2_lkid={!Case.ContactId}&template_id=00X40000000weWn
Just use that as the url content of a custom button or link. This one is for cases, as you are trying to do, but I think this should work for other types of objects as well.
The parameters are p3_lkid, which is the case id, p2_lkid which is the id of the contact you are emailing, and template_id which is hardcoded to the desired email template. (You can find this id by looking in the url of the Setup page for the template)
This was really helpful. I did, however, figure out another way to do it. Click on the "Send an Email" button you currently have. Copy the URL and add &template_id=YOUR TEMPLATE ID.
There is one other ID number that will show up in the original URL. Change that to be the dynamic field you want it to be.
For example:
Copy url from "Send Email": https://na3.salesforce.com/_ui/core/email/author/EmailAuthor?p3_lkid=70150000000Axj1&retURL=%2F70150000000Axj1
Add &template_id=YOUR TEMPLATE ID so it looks like this:
/_ui/core/email/author/EmailAuthor?p3_lkid=70150000000Axj1&retURL=%2F70150000000Axj1&template_id=YOUR TEMPLATE ID
Remove the other id (it's the object you used to send the email - so in this case, I was wanting to be able to send an email directly from a Campaign) and replace with the dynamic field:
/_ui/core/email/author/EmailAuthor?p3_lkid={!Campaign.Id}&retURL=%2F70150000000Axih&template_id=YOUR TEMPLATE ID
And voila! It should work!
Abeyer's answer is good. However, if the template contains solution attachments "{!Case.Solution_Attachments}" the attachments will not get included unless you add the new_template=1 parameter to the URL making it:
/_ui/core/email/author/EmailAuthor?p3_lkid={!Case.Id}&p2_lkid={!Case.ContactId}&template_id=00X40000000weWn&new_template=1

Resources