<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Creating Custom Config Template Webhook Payload Template in Network Platform API</title>
    <link>https://community.cisco.com/t5/network-platform-api/creating-custom-config-template-webhook-payload-template/m-p/5403648#M957</link>
    <description>&lt;P&gt;Hi &lt;A href="https://community.meraki.com/t5/user/viewprofilepage/user-id/31472"&gt;@david.bond&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;Webhook Payload Templates do support Network Config Templates. (I just tested again to verify)&lt;BR /&gt;&lt;BR /&gt;FYI, If you are having issues uploading the templates using Postman, it sometimes gets in the way and will evaluate the {{variables}} before the content is sent to Meraki. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;One easy way to avoid this is to create a *.liquid file for your template headers and one for your template body.&lt;/P&gt;&lt;P&gt;You can then use the other API parameters &lt;STRONG&gt;headersFile&lt;/STRONG&gt; &amp;amp; &lt;STRONG&gt;bodyFile&lt;/STRONG&gt; to upload the files without conflict.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DexterLaBora_0-1646346145547.png" style="width: 614px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/262582i6C4D56D178A71ECD/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;You can find a list of example templates here as well as utilities to help create and manage them..&lt;BR /&gt;&lt;A href="https://github.com/meraki/webhook-payload-templates" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/meraki/webhook-payload-templates&lt;/A&gt;&lt;/P&gt;&lt;P&gt;or you can read more on the webhook documentation site&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.cisco.com/meraki/webhooks/#!template-examples-overview" target="_blank" rel="nofollow noopener noreferrer"&gt;https://developer.cisco.com/meraki/webhooks/#!template-examples-overview&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 03 Mar 2022 22:38:09 GMT</pubDate>
    <dc:creator>DexterLabora</dc:creator>
    <dc:date>2022-03-03T22:38:09Z</dc:date>
    <item>
      <title>Creating Custom Config Template Webhook Payload Template</title>
      <link>https://community.cisco.com/t5/network-platform-api/creating-custom-config-template-webhook-payload-template/m-p/5403647#M956</link>
      <description>&lt;P&gt;I'm trying to create a custom Config Template Webhook Payload Template.&lt;/P&gt;&lt;P&gt;I'm sending the following body to:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;POST &lt;SPAN class=""&gt;&lt;SPAN&gt;{{meraki_url}}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;/networks/&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;{{meraki_configTemplate_id}}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;/webhooks/payloadTemplates&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;...but am getting "403 Forbidden".  Sending bad body content results in 400, so I think that what I have below is OK.&lt;/P&gt;&lt;P&gt;Questions:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;STRONG&gt;Is it OK to add a custom Config Template Webhook Payload Template to a Config Template?&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;OK, so what am I doing wrong?!&lt;/STRONG&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Body:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;{ "name": "AlertMagic", "headers": "{\n \"Authorization\": \"Bearer {{sharedSecret}}\"\n}", "body": "{\n \"sourceSystem\": \"meraki\",\n \"alertData\": {{ alertData | jsonify }},\n \"alertId\": \"{{alertId}}\",\n \"alertLevel\": \"{{alertLevel}}\",\n \"alertType\": \"{{alertType}}\",\n \"alertTypeId\": \"{{alertTypeId}}\",\n \"deviceMac\": \"{{deviceMac}}\",\n \"deviceModel\": \"{{deviceModel}}\",\n \"deviceName\": \"{{deviceName}}\",\n \"deviceSerial\": \"{{deviceSerial}}\",\n \"deviceTags\": {{deviceTags | jsonify }},\n \"deviceUrl\": \"{{deviceUrl}}\",\n \"networkId\": \"\",\n \"networkName\": \"{{networkName}}\",\n \"networkTags\": {{networkTags | jsonify }},\n \"networkUrl\": \"{{networkUrl}}\",\n \"occurredAt\": \"{{occurredAt}}\",\n \"organizationId\": \"{{organizationId}}\",\n \"organizationName\": \"{{organizationName}}\",\n \"organizationUrl\": \"{{organizationUrl}}\",\n \"sentAt\": \"{{sentAt}}\",\n \"version\": \"{{version}}\"\n}" }&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2022 00:20:44 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/creating-custom-config-template-webhook-payload-template/m-p/5403647#M956</guid>
      <dc:creator>david.bond</dc:creator>
      <dc:date>2022-03-03T00:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Custom Config Template Webhook Payload Template</title>
      <link>https://community.cisco.com/t5/network-platform-api/creating-custom-config-template-webhook-payload-template/m-p/5403648#M957</link>
      <description>&lt;P&gt;Hi &lt;A href="https://community.meraki.com/t5/user/viewprofilepage/user-id/31472"&gt;@david.bond&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;Webhook Payload Templates do support Network Config Templates. (I just tested again to verify)&lt;BR /&gt;&lt;BR /&gt;FYI, If you are having issues uploading the templates using Postman, it sometimes gets in the way and will evaluate the {{variables}} before the content is sent to Meraki. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;One easy way to avoid this is to create a *.liquid file for your template headers and one for your template body.&lt;/P&gt;&lt;P&gt;You can then use the other API parameters &lt;STRONG&gt;headersFile&lt;/STRONG&gt; &amp;amp; &lt;STRONG&gt;bodyFile&lt;/STRONG&gt; to upload the files without conflict.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DexterLaBora_0-1646346145547.png" style="width: 614px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/262582i6C4D56D178A71ECD/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;You can find a list of example templates here as well as utilities to help create and manage them..&lt;BR /&gt;&lt;A href="https://github.com/meraki/webhook-payload-templates" target="_blank" rel="nofollow noopener noreferrer"&gt;https://github.com/meraki/webhook-payload-templates&lt;/A&gt;&lt;/P&gt;&lt;P&gt;or you can read more on the webhook documentation site&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.cisco.com/meraki/webhooks/#!template-examples-overview" target="_blank" rel="nofollow noopener noreferrer"&gt;https://developer.cisco.com/meraki/webhooks/#!template-examples-overview&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2022 22:38:09 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/creating-custom-config-template-webhook-payload-template/m-p/5403648#M957</guid>
      <dc:creator>DexterLabora</dc:creator>
      <dc:date>2022-03-03T22:38:09Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Custom Config Template Webhook Payload Template</title>
      <link>https://community.cisco.com/t5/network-platform-api/creating-custom-config-template-webhook-payload-template/m-p/5403649#M958</link>
      <description>&lt;P&gt;Since I wrote this, Meraki have fixed a bug.&lt;/P&gt;&lt;P&gt;The same POST now complains:&lt;/P&gt;&lt;P&gt;"&lt;SPAN&gt;Body Liquid error: undefined variable version&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Removing the final ",\n \"version\": \"{{version}}" from the post body then works.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Mar 2022 14:45:23 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/creating-custom-config-template-webhook-payload-template/m-p/5403649#M958</guid>
      <dc:creator>david.bond</dc:creator>
      <dc:date>2022-03-11T14:45:23Z</dc:date>
    </item>
  </channel>
</rss>

