Generate HTML files from Make

Hello

I’m struggling with what I think is a simple scenario, any help would be appreciated.

I want to automatically generate blog posts from a database (e.g. Notion, Airtable, …) to take a template file and replace place holders with database fields.

I’ve successfully done this with Webflow but can’t help thinking it’s overkill. I already have the template I need, I just want to generate a page for each database record and copy it to my webiste (probably easiest with FTP)

I’ve seen the great video from Andy O’Neill but it’s the idea of using a template I would really like to nail

Any assistance to help my mental block would be very welcome

Thanks
Mike

May peace be upon you @mdb213


You can take a look at this video

1 Like

Thanks for taking the time to answer. I’ve done that already. It works well but not a big fan of Webflow.

I just want to generate html files directly using a simple template

You could use Search and Replace module to retrieve custom fields using regex.
For example: Hi {{NAME}} … on regex you will search for that string and use the value that you want.

1 Like

Thanks Juani.

I’m doing that. It’s reading and writing files which seems to be the issue now. I can also it it with a custom api but rather do it in pure Make. Doesn’t seem an unreasonable request

So what is the issue @mdb213 ? The approach above noted by @Juani using RegEx would probably be the best way to do this.
What kind of error do you have? Can you provide some screenshots?

1 Like

Hi Bjorn, thanks for your help

As I said the issue now is reading a template file and then writing out an HTML file to an FTP location

Still unsure where exactly you are stuck @mdb213 and what kind of scenario you have . But you can “write files” by:

  • Creating your HTML, for example in a “set variable”
  • Upload the binary data of this variable into your FTP with the upload module

Reading is the same, however you Download the file and then read it by transforming the binary data to text if necessary.

2 Likes

Thanks Bjorn, sounds pretty much what I need. It’s fairly obvious but I didn’t click that read and write is replaced with upload and download. I’ll give it a go

Thanks for taking the time to help
Mike

Hey @mdb213 :wave:

Did you have a minute to try @Bjorn.drivn’s solution? If yeah could you share with us your progress please? This way we keep the community organized and neat.

Thank you very much :pray:

1 Like