Skip to main content

Apply templates to a Notion Data Source Item

  • October 23, 2025
  • 3 replies
  • 44 views

DennisWF
Forum|alt.badge.img+5

It’s always bugged me that Notion’s API (and, by extension, its Zapier integration) didn’t support applying a template to a page in a database. You go to all the work of creating detailed templates for your databases, but then can’t use them in automations.

It’s still not supported yet in the Zapier integration, but templates are now exposed in Notion’s API. I learned about it here.

In the meantime, I’ve created a simple Custom Action to apply a template to an existing page - the code is below if you want to copy. It just takes two inputs - the page_id of the page you want to apply the template to, and the template_id that you want to apply.

You can find all the template_ids for a given data source using the GET https://api.notion.com/data_sources/{data_source_id}/templates endpoint. See documentation here. I ran this once and then saved the template_ids I wanted to use as global variables so I could reuse them across different Zaps. 

export async function applyTemplateToPage(params: { pageId: string, templateId: string }): Promise<{ result: string, url: string }> {
// Destructure the input parameters
const { pageId, templateId } = params;

// Construct the URL for the Notion API endpoint
const url = `https://api.notion.com/v1/pages/${pageId}`;

// Define the request body to apply the template
const requestBody = {
template: {
type: 'template_id',
template_id: templateId,
}
};

// Make the API request using fetchWithZapier
const response = await fetchWithZapier(url, {
method: 'PATCH', // Assuming PATCH is used to update the page with a template
headers: {
'Content-Type': 'application/json',
'Notion-Version': '2025-09-03' // Use the updated Notion-Version
},
body: JSON.stringify(requestBody)
});

// Throw an error if the response is not ok
await response.throwErrorIfNotOk();

// Parse the response JSON
const responseData = await response.json();

// Return a confirmation message and the URL of the updated page
return {
result: "Template applied successfully",
url: responseData.url
};
}

 

November 11, 2025

I haven’t seen this announced anywhere yet, but database templates are now natively supported by the Notion integration - you can use the Default template assigned to your data source in Notion, or manually select a template:

 

3 replies

SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • October 24, 2025

Thanks so much for sharing this ​@DennisWF. Really appreciate you helping Notion users in the community by sharing guides like this. 🧡


DennisWF
Forum|alt.badge.img+5
  • Author
  • Zapier Solution Partner
  • November 11, 2025

I haven’t seen this announced anywhere yet, but database templates are now natively supported by the Notion integration - you can use the Default template assigned to your data source in Notion, or manually select a template:

 


SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • November 12, 2025

Awesome find ​@DennisWF!! 🙌 Thanks for following up here to let folks know about it. 🤗