Merge - At my wits end!

I’ve been using AI to walk me through setting up some automation for my blog and its been rough to say the least. I’ve spent the last 2 days from sunrise to sunset trying to work things out.

So my scenario is that a Notion - Watch Database Items module checks to see if any page in my Notion Blog Tracker has a Status of Ready to Publish and Automation Trigger = True.

Then it routes to an iterator to iterate through the tags values. Then to a Notion Search Objects to pull the Notion / Wordpress ID from a table.

Then it goes to a Router which is where things go haywire.

The router has these paths -
Route A - If the Tag Name already exists then store the Tag ID in a Set Variable - TagID field / variable.

Route B - If the Tag Name DOES NOT exist then pass to HTTP to POST to wordpress to update the Tags and then Set Variable - TagID as above.

Route C - MY ATTEMPT TO RECOMBINE THE ROUTES –
Using an Array Aggregator to try to compile a list of the TagIDs to use in creating a draft post.

The closest I can get is having the Array Aggregator outputting an array of empty variables which crashes everything.

I watched the Router Magic Formula video but still not getting it.

Please help!

1 Like

Welcome to the Make community!

You have not yet provided sufficient information to demonstrate the problem that would allow us to reproduce the scenario and any error(s).

To allow others to assist you with your scenario, please provide the following:

1. Relevant Screenshots

Could you please share screenshots of your full scenario? Also include screenshots of any error messages, module settings (fields), relevant filter settings (conditions), and module output bundles. We need to see what you’re working with to give you the best advice.

You can upload images here using the Upload icon in the text editor:

We would appreciate it if you could upload screenshots here instead of linking to them outside of the forum. This allows us to zoom in on the image when clicked, and prevent tracking cookies from third-party websites.

2. Scenario Blueprint

Please export the scenario blueprint. Providing your scenario blueprint file will allow others to quickly recreate and see how you have set up the mappings in each module, and also allows us take screenshots or provide module exports of any solutions we have for you in return - this would greatly benefit you in implementing our suggestions as you can simply paste module exports back into your scenario editor!

To export your scenario blueprint, click the three dots at the bottom of the editor then choose ‘Export Blueprint’.

You can upload the file here by clicking on this button:

3. Output Bundles of Modules

Please provide the output bundles of each of the relevant modules by running the scenario (you can also get this without re-running your scenario from the History tab).

Click on the white speech bubbles on the top-right of each module and select “Download input/output bundles”.

A. Upload as a Text File

Save each bundle contents in a plain text editor (without formatting) as a bundle.txt file.

You can upload the file here by clicking on this button:

B. Insert as Formatted Code Block

If you are unable to upload files on this forum, alternatively you can paste the formatted bundles.
These are the two ways to format text so that it won’t be modified by the forum:

  • Method 1: Type code block manually

    Add three backticks ``` before and after the content/bundle, like this:

    ```
    content goes here
    ```

  • Method 2. Highlight and click the format button in the editor

Providing the input/output bundles will allow others to replicate what is going on in the scenario, especially if there are complex data structures (nested arrays and collections) or if external services are involved, and help you with mapping the raw property names from collections.

Sharing these details will make it easier for others to assist you.

1 Like

blueprint.json (414.2 KB)


So here is a screenshot of my setup with the blueprint json. I’m importing rows from a Notion Table then routing Tags in one direction and Categories in another.
Notion Module 1 → Router Module 1

Then I pull the Text / Number and check to see if it already exists in WordPress.

Iterator Module → Notion Module → Router 2 Module

IF the Tag or Category Exists, then add it to an array.

If the Tag or Category Doesnt exist, then add it to WordPress (HTTP Module 1) and then add to the array.

Once all the tags and categories have been added then go ahead and post the draft to WordPress.

If anything else is needed let me know.

You’ll need to split the categories/tags by comma-space so that it becomes an array (unless you are already iterating an array of categories/tags)

Then, use an iterator on the array so that you can process each category at a time.

Create new category using the name.

Then, if category exists, there will be an error. Handle the error by searching for the category, and resuming with the existing category ID.

Then, aggregate the category IDs into an array using the Array Aggregator.

You can then insert the array of category IDs into the tag/category field.

Similarly, this works the same way for the Wordpress Tags field.

For more information, see How to deal with WordPress errors

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.

Thank you for the reply! I’ll take some time to play with this and see if I can figure it out. It makes sense to me for the most part.

Side question - I know the structure of the setup in Notion can have a big impact. Normally in a relational DB I’d create a Master Tags and Master Categories list table and pull from that table.

However it seems that there is quite a bit of difference in how the Notion module handles a Select vs Multi-Select vs Relational field. Is that correct?

The tags and categories fields are setup as Multi-Select which pulls them in as an Array which I then iterate through. However I just realized that this creates a bit of a problem since its currently only creating the missing Tag or Category in WordPress and NOT updating the table in Notion.

How much does this change the logic / flow?

1 Like

Another question as I’m playing around - Whats the difference between using the WordPress - Create Category module OR using the HTTP Request POST to try to create the category?

Having trouble with the WordPress module creating the connection. I can create the connection fine in HTTP but the API Key from the HTTP module doesnt seem the be working in the WordPress create connection

1 Like