Cloudflare
The Cloudflare modules enable you to monitor, create, or update zones and monitor, create, list, patch, delete, or export/import DNS records in your Cloudflare account.
Getting Started with Cloudflare
Prerequisites
A Cloudflare account
In order to use Cloudflare with Make, it is necessary to have a Cloudflare account. If you do not have one, you can create a Cloudflare account at dash.cloudflare.com/sign-up.
Connecting Cloudflare to Make
To connect your Cloudflare account to Make, you'll need to create an API token or retrieve an API Key in your Cloudflare account.
Choose one of the options for establishing a connection:
Connecting Using an API Token
1. Log in to your Cloudflare account.
2. Click your profile icon in the top-right corner, and select the My Profile option.
3. Open the API Tokens tab, and click the Create Token button.
4. On the API Tokens page, click the Get Started button to create a custom token.
5. Enter the desired name for your token, and add required permissions and additional permissions needed for the modules you want to use in your scenario. Then click Continue to summary and Create a Token.
REQUIRED PERMISSIONS |
|
Additional Permissions
MODULE NAME | PERMISSION REQUIRED FOR THE MODULE |
Watch Zones |
|
Create a Zone |
|
Change a Zone's SSL Setting |
|
Change a Zone's Security Level |
|
Turn a Zone into Development Mode |
|
Watch DNS Records |
|
Create a DNS Record |
|
List DNS Records |
|
Patch a DNS Record |
|
Delete a DNS Record |
|
Export DNS Records |
|
Import DNS Records |
|
Create a Certificate | |
List Certificates | |
Revoke a Certificate | |
Watch User Billings |
6. Copy the token provided.
7. Go to Make, open the Cloudflare module's Create a connection dialog, and select the API Token option in the Authentication Method field.
8. Enter the API Token you have copied in step 6 to the respective field, and click the Continue button to establish the connection.
The connection has been established. You can proceed with setting up the module.
Connecting Using API Key
1. Log in to your Cloudflare account.
2. Click your profile icon in the top-right corner, and select the My Profile option.
3. Open the API Tokens tab, and click the View button for the Global API Key. Enter the password, and copy the displayed Global API Key.
4. Go to Make, open the Cloudflare module's Create a connection dialog, and select the API Key option in the Authentication Method field.
5. Enter the Global API Key you have copied in step 3 to the respective field, enter your account email, and click the Continue button to establish the connection.
The connection has been established. You can proceed with setting up the module.
Zones
A Zone is a domain name along with its subdomains and other identities.
Watch Zones
Retrieves details when a zone is created, updated, or activated.
Connection | |
Event | Select whether you want to watch created, modified, or activated zones |
Limit | Set the maximum number of zones Make will return during one execution cycle. |
Create a Zone
Creates a new zone.
Connection | |
Domain Name | Enter the domain name of the site you want to add. |
Account ID | Enter or select the account ID. If the account ID is not provided in the drop-down menu, you can obtain the account ID in the URL of your Cloudflare account. |
Skip fetching current DNS records | Enable this option to skip automatic attempt to fetch existing DNS records. |
Type | Select the type. A full zone implies that DNS is hosted with Cloudflare. A partial zone is typically a partner-hosted zone or a CNAME setup. |
Change a Zone's SSL Setting
Changes the SSL setting of the specified site.
Connection | |
Zone ID | Map the zone ID, or select the zone you want to change the SSL setting for. |
SSL Setting |
|
Change a Zone's Security Level
Adjusts the security settings.
Connection | |
Zone ID | Map the zone ID, or select the zone you want to change the security level for. |
Security Level | Select the security level you want to set for the zone specified above.
|
Turn a Zone into Development Mode
Modifies the development mode setting of the zone.
Connection | |
Zone ID | Map the zone ID, or select the zone you want to enable the development mode for. |
Development mode | Enable this option to turn on the development mode. |
DNS Records
Watch DNS Records
Returns DNS record details when a DNS record is created or modified.
Connection | |
Zone ID | Map the zone ID, or select the zone you want to watch for DNS records. |
Event | Select whether you want to watch created or modified DNS records. |
Limit | Set the maximum number of DNS records Make will return during one execution cycle. |
Create a DNS Record
Creates a new DNS record for a zone.
Connection | |
Zone ID | Map the zone ID, or select the zone you want to create a new DNS record for. |
Type | Select the type of the new DNS record. See the Cloudflare documentation for each type's fields. |
List DNS Records
Returns DNS records based on specified criteria.
Connection | |
Zone ID | Map the zone ID, or select the zone you want to list DNS records for. |
Requirement | Select the logical operator. Indicate whether to match all search requirements or at least one (any). |
Name | Enter the DNS record name to filter results by. |
Content | Enter the content of the DNS record to filter results by. |
Type | Select the type of the DNS record to filter results by. |
Proxied | DNS record proxied status. |
Order | Select the order in which you want to sort returned DNS records. |
Direction | Select the order of the returned domains. |
Limit | Set the maximum number of DNS records Make will return during one execution cycle. |
Patch a DNS Record
Partially updates a DNS record.
Connection | |
Zone ID | Map the zone ID, or select the zone you want to update a DNS record for. |
DNS Record ID | Map or select the identifier of the DNS record you want to update. |
Type | Select the type of DNS record. |
Delete a DNS Record
Removes a DNS record.
Connection | |
Zone ID | Map the zone ID, or select the zone you want to delete a DNS record from. |
DNS Record ID | Map or select the identifier of the DNS record you want to delete. |
Export DNS Records
Downloads a BIND configuration file.
Connection | |
Zone ID | Map the zone ID, or select the zone you want to download a BIND configuration file for. |
File Name | Enter the file name without .zone extension. Leave this field blank to use |
Import DNS Records
Uploads a BIND configuration file.
Connection | |
Zone ID | Map the zone ID, or select the zone you want to upload a BIND configuration file to. |
Source File | Map the file you want to upload from the previous module (e.g. HTTP > Get a File or Google Drive > Download a File), or enter the file name and file data manually. |
Origin CA
Create a Certificate
Connection | |
Hostnames | Add hostnames you want to bind to the certificate. |
Requested Validity | Select the number of days for which the certificate should be valid. |
Request Type | Select the signature type desired on the certificate. |
Certificate Signing Request | Enter the CSR (a block of encoded text). |
List Certificates
Retrieves origin certificates for the specified zone.
Connection | |
Zone ID | Map the zone ID, or select the zone you want to list certificates from. |
Limit | Set the maximum number of certificates Make will return during one execution cycle. |
Revoke a Certificate
Revoke an existing Origin CA certificate.
Connection | |
Zone ID | Map the zone ID, or select the zone you want to revoke a certificate from. |
Certificate ID | Map the Certificate ID of the certificate you want to revoke. |
Billings
Watch User Billings
Retrieves billing history details when the authorized user is billed.
Connection | |
Limit | Set the maximum number of billing histories Make will return during one execution cycle. |
Make an API Call
Allows you to perform a custom API call.
Connection | |
URL | Enter a path relative to For the list of available endpoints, refer to the Cloudflare API v4 Documentation. |
Method | Select the HTTP method you want to use: GETto retrieve information for an entry. POSTto create a new entry. PUTto update/replace an existing entry. PATCHto make a partial entry update. DELETEto delete an entry. |
Headers | Enter the desired request headers. You don't have to add authorization headers; we've already done this for you. |
Query String | Enter the request query string. |
Body | Enter the body content for your API call. |
Example of Use - List Zones
The following API call returns all zones in your Cloudflare account:
URL:/v4/zones
Method:GET
The result can be found in the module's Output under Bundle > Body > result. In our example, 2 zones were returned:
Common Problems
The operation failed with an error. [403] Error 9109: Unauthorized to access requested resource
Add the permission to your API Token that is required by the module you want to use. Please see the additional permissions list.