Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Creating pages programmatically via API using saved patterns

  • Hello,
    I’m experimenting with n8n and Gemini/OpenAI APIs. I am working on an automation that generates WordPress pages and posts from a Google Sheet containing the list of pages to be created, along with other relevant information.

    My goal is to provide the AI with the available GenerateBlocks Patterns and GeneratePress Elements, so it can use them when composing the pages. Specifically, I want the AI to maintain the block structure while replacing the placeholder text with generated content.

    I was wondering: is it possible to achieve this? Also, is there a documentation or an official guide available on how to do this programmatically?

    Thank you!

  • Hi there,

    we don’t have documentation for this kind of thing.
    You could try exporting a post template, either as HTML or JSON, with placeholder content to be included in your prompt eg.

    1. build your post content template with blocks and placeholder content
    2. ensure the placeholders are easily identifiable eg. [[TITLE]] [[DESCRIPTION]]
    3. export the post HTML / JSON

    Now the prompt could be set to only replace placeholder content leaving block data intact.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.