WordPress Category Automation Difficulty

Hi, so quick overview of my problem.

I am using ChatGPT to analyze an except from a post I’d like to make to wordpress. ChatGPT then generates a short string of categoryID’s. I’m attempting to use the mapping feature of the WordPress module to categorize these posts from the aforementioned generation. Doing it as a string wasn’t working, so I am using the split function to split each number from the string then the parsenumber function to convert them into integers so that wordpress can understand them. I have got this working to a degree, however, I cannot add more than one post category as when I use the parsenumber function, despite the fact that it does end up converting the text to an integer, I cannot add any kind of separation to it. So I tried breaking it up into multiple steps, where each category is generated independently and then independently converted in a rather long series of OpenAI modules, followed by the parsenumber modules, followed by the WordPress module. I cannot separate them by commas manually even with them being integers as that results in an error. I tried to set it up such that the post is updated (effectively adding 2 more modules), however this simply replaces the categories I had before. I’m pretty confused about this at the moment so any help is greatly appreciated, thanks!!



Welcome to the Make community!

1. Screenshots of module fields and filters

Please share screenshots of relevant module fields and filters in question? It would really help other community members to see what you’re looking at.

You can upload images here using the Upload icon in the text editor:
Screenshot_2023-10-07_111039

2. Scenario blueprint

Please export the scenario blueprint file to allow others to view the mappings and settings. At the bottom of the scenario editor, you can click on the three dots to find the Export Blueprint menu item.

Screenshot_2023-08-24_230826
(Note: Exporting your scenario will not include private information or keys to your connections)

Uploading it here will look like this:

blueprint.json (12.3 KB)

3. And most importantly, Output bundles

Please provide the output bundles of the modules by running the scenario, then click the white speech bubble on the top-right of each module and select “Download output bundles”.
Screenshot_2023-10-06_141025

A.

Save the bundle contents in your text editor as a bundle.txt file, and upload it here into this discussion thread.

Uploading it here will look like this:

bundle.txt (12.3 KB)

B.

If you are unable to upload files on this forum, alternatively you can paste the formatted output bundle in this manner:

  • Either add three backticks ``` before and after the code, like this:

    ```
    input/output bundle content goes here
    ```

  • Or use the format code button in the editor:
    Screenshot_2023-10-02_191027

Providing the output bundles will allow others to replicate what is going on in the scenario even if they do not use the external service.

Following these steps will allow others to assist you here. Thanks!

2 Likes

Thanks, added screenshots!

1 Like

After some more forum research and testing I used the add array method to fix the problem and it worked, the only thing I wish for now is a more efficient way to do it but I’m sure I’ll figure that out!


3 Likes

Heya @JohnForrestor :wave:

I just want to quickly say awesome work figuring this one out with the help of existing community content and through the power of testing. :clap:

Thank you very much for stepping back into this thread and sharing your findings and final setup with us. This is super valuable and can be incredibly helpful to many others looking for similar info. :pray:

1 Like