Skip to content

Instantly share code, notes, and snippets.

View google-promotions-json-ld
/*
AMPscript.com
https://ampscript.com/company-logo-in-gmail-using-promotions-tab/
*/
%%[
SET @JSONStart = Concat('<', 'script type="', 'application/ld+json"','>')
SET @JSONEnd = Concat('<','/','script','>')
]%%
%%=TreatAsContent(@JSONStart)=%%
[{
View parse-json-ssjs-ampscript
/*
AMPscript.com
https://ampscript.com/parsing-json-with-ampscript/
*/
%%[ set @JSON = '{"name": AMPscript.com","email": "AMPscript@ampscript.com"}' ]%%
<!doctype html>
<html>
<head>
<meta charset="utf-8">
@jacksonpchen
jacksonpchen / gmail-deal-badge
Last active Dec 2, 2020
Gmail Promotions Tab Deal Badge
View gmail-deal-badge
<!-- Deal Badge -->
<!-- AMPscript.com -->
<!-- https://ampscript.com/company-logo-in-gmail-using-promotions-tab/ -->
<div itemscope="" itemtype="http://schema.org/DiscountOffer">
<meta itemprop="description" content="AMPscript.com">
<meta itemprop="discountCode" content="AMPSCRIPT">
<meta itemprop="availabilityStarts" content="2020-03-10T00:00:00Z">
<meta itemprop="availabilityEnds" content="2020-04-05T00:00:00Z">
</div>
@jacksonpchen
jacksonpchen / gmail-custom-logo
Last active Dec 2, 2020
Gmail Promotions Tab Custom Logo
View gmail-custom-logo
@jacksonpchen
jacksonpchen / add-to-publication-list
Last active Dec 2, 2020
Add to Publication List
View add-to-publication-list
/*
AMPscript.com
*/
SET @rr = CreateObject("RetrieveRequest")
SetObjectProperty(@rr, "ObjectType", "List")
AddObjectArrayItem(@rr,"Properties","ListName")
AddObjectArrayItem(@rr,"Properties","ID")
@jacksonpchen
jacksonpchen / ssjs-run-automation
Last active Feb 4, 2021
Marketing Cloud SSJS Run Automation
View ssjs-run-automation
/*
AMPscript.com
https://ampscript.com/how-to-run-automations-more-frequently-using-ssjs/
*/
<script runat="server">
Platform.Load("Core","1.1.1");
var automationCustomerKey = "[Customer Key Goes Here]"
var rr = Platform.Function.CreateObject("RetrieveRequest");
Platform.Function.SetObjectProperty(rr, "ObjectType", "Automation");
Platform.Function.AddObjectArrayItem(rr, "Properties", "ProgramID");