Skip to content

Sample Salesforce Marketing Cloud Content Block. Integrates with Google Drive.

Notifications You must be signed in to change notification settings

bohawi/sfmc-cb-gdrive-block

Repository files navigation

sampleblock

Sample Salesforce Marketing Cloud Content Builder Block using the blocksdk.

Deployment

As a node app:

npm install
npm start

One click deployment to heroku:

Deploy

Building your own block from here

# do not fork
git clone git@github.com:bohawi/sfmc-cb-gdrive-block.git <my block name e.g. myblock>
cd <my block name e.g. mybock>
# create your own empty github repository for your new block and copy the clone url for it
git remote set-url origin <your empty repo url>
npm install

Files to edit:

  • src/main.js for your code
  • views/index.hbs for your markup
  • package.json for your block name and description
  • README.md to be your own README

To test your changes locally:

npm run build; npm start

Then go to the block tester app and enter http://localhost:3000 in the text field and click a block. You will have to allow unsecure iframes in your bowser (top right in the url bar in Chrome) first.

Once ready to deploy, commit your changes to your repo and click the deploy to heroku button on it.

Google Integration

Create a Google API key with access to the Google Drive API - [https://console.developers.google.com/]

Create environment variables with your credentials from Google Developer Console:

GOOGLE_CLIENT_ID GOOGLE_APP_ID GOOGLE_DEVELOPER_KEY

About

Sample Salesforce Marketing Cloud Content Block. Integrates with Google Drive.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published