Detect post insert & update

I use algolia as a search engine on my site.

My goal is to automatically update the Algolia index without having to launch the script or having to use a cron.

Using GHOST APIs, is there a way to identify each post update or insert action?

This way, as soon as I identify an edit action I can start the server-side algolia script.

Thank you

Hey @vasilli! I’ve found a couple of approaches you could try:

Hope this helps! Interested to see the results :+1:

Thanks a lot,
I have just implemented this mechanism, really a nice method.
With the insert it works perfectly.
With the update I find some problems, it seems not to work, I have to do further tests.

1 Like

Pleased it’s working for you but keep us posted on your findings. I’m sure the Ghost community will appreciate it :rainbow:

Of course, I briefly describe the steps to follow.

Once understood the mechanism is quite easy.

  • create an account on zapier.
  • from your zapier profile, connect with your ghost blog using the zapier Admin API Key found in Integrations > Zapier from your ghost panel.
  • accept the invitation from kevin@algolia.com to use the algolia with zapier here.
  • follow the various steps to link your algolia account with the zapier account (previously connected with ghost).

It may be confusing to configure the app from the zapier panel, but after a few minutes you should be able to set everything up.

Really useful integration, but I still have to check the update if it works properly. With the insert there are no problems.

If you need more information just ask.

1 Like