You need to delete (many) posts on a WordPress website and also delete the featured image associated with each post.
Hours of rote work cut into a fraction with this automation.
pending
posts, with oldest firstThis is arbitrary and depends on your own use case. Maybe you have an editor who needs to approve the post deletion. You might want to get approval by email, slack msg or ticketing system.
Or maybe you just want to monitor the process and spare specific posts from deletion.
I used the Filter node to only grab the first item
(itemIndex < 1
) which in this case was the oldest pending
post.
This could also be expanded to two separate workflows:
pending
post is created that sends an approval requestThis would require another HTTP request, similar to the DELETE post request, that instead publishes the post.