Find and replace with api workflow

Hi all,

So I’m scratching my head on this one cos it sounds simple but I honestly don’t know why it’s not working with a BE workflow.

Basically, I have a block of text saved on the DB. I have a list of keywords also on DB. I want to loop through the keywords and do a find and replace for each keyword found on the block of text.

Doing it on the frontend works, but the limitation is that it’s only a find and replace for a single keyword (I have an unknown variable of, say 5-10 keywords and the task needs to run on BE anyway)

FE find and replace (works, but not what I need)

So I do pretty much the same thing with a BE workflow using an Schedule API workflow and run the keywords through it instead, here what it looks like:

FE trigger

BE workflow

But it results in no change of the block of text. I’m pretty certain I haven’t gotten anything wrong or overlooked anything (hopefully).

Any pointers? Thanks!

Never mind, being a dummy. Found out what I was doing wrong.

For one, I should have been using schedule API workflow on a list, which I used before but made a mistake which was my setup was wrong (I set ‘text’ and ‘replace’ as a list which I shouldn’t).

This is the right way: