ProsessPilotene

Gatsbyjs source plugin for Dynamics Marketing

A simple source plugin, using standard Microsoft Dynamics 365 Marketing APIs, to allow Gatsby based sites create a marketing calendar.

Please note; This plugin is in development, and is not production ready. Contributions and improvements are welcome.

🚀 Quick start

To get started creating a new plugin, you can follow these steps:

  1. Install the plugin to your existing Gatsby site npm install
npm install @prosesspilotene/gatsby-source-dynamics-marketing
  1. Include the plugin in a Gatsby site

Inside of the gatsby-config.js file of your site (in this case, my-gatsby-site), include the plugin in the plugins array:

module.exports = {
  plugins: [
    // other gatsby plugins
    // ...
     {
      resolve: `@prosesspilotene/gatsby-source-dynamics-marketing`,
      options: {
        apiKey: process.env.DYNAMICS_MARKETING_EVENT_APIKEY,
        apiEndPoint: process.env.DYNAMICS_MARKETING_EVENT_ENDPOINT,
        Origin: process.env.GATSBY_PUBLIC_URL,
      },
    },
  ],
}

Then create the environment variables for your API Key, EndPoint and origin

  1. Verify the plugin was added correctly

The plugin added by the starter implements a single Gatsby API in the gatsby-node that logs a message to the console. When you run gatsby develop or gatsby build in the site that implements your plugin, you should see this message.

You can verify your plugin was added to your site correctly by running gatsby develop for the site.

You should now see a message logged to the console in the preinit phase of the Gatsby build process:

$ gatsby develop
success open and validate gatsby-configs - 0.033s
success load plugins - 0.074s
Loaded gatsby-source-dynamics-marketing
success onPreInit - 0.016s
...

🎓 Learning Microsoft Dynamics Marketing

If you’re looking for more guidance on how to use Dynamics Marketing, contact our support staff at support@prosesspilotene.no

🎓 Learning Gatsby

If you’re looking for more guidance on plugins, how they work, or what their role is in the Gatsby ecosystem, check out some of these resources: