CloudFlare

Automatically Document CloudFlare Zones to NinjaOne

This script will generate a NinjaOne Document template and NinjaOne documents for every domain contained in CloudFlare

Requirements

Make sure the Getting Started guide has been followed

NinjaOne Products

Core RMM

NinjaOne Documentation

Once per day

Role Setting Custom Fields

Display NameNameTypePermissionsDescription

CloudFlare API Token

cloudflareToken

Secure

Technician: Editable Automations: Read/Write

API: None

Your CloudFlare API Token

Global Custom Fields

None

Setup

To run this script create a new CloudFlare API Token with the following permissions:

  • All accounts - Account Settings:Read

  • All zones - Origin Rules:Read, Zone Settings:Read, Zone:Read, DNS:Read, SSL and Certificates:Read, Logs:Read, Page Rules:Read, Firewall Services:Read, Analytics:Read

Once this is created edit the CloudFlare API Token field on your script running device to add in this key.

Matching

Domains are matched using NinjaOne Cloud Monitors. In order to match a domain to an Organization configure a cloud monitor that points to that domain as the target of the Cloud Monitor.

Alternatively if you do not wish to create a Cloud Monitor, you can run the script once and then create a blank Cloudflare document under the correct organization with a name that matches the domain in CloudFlare.

The Script

Last updated