Hello Make.com community,
I am working on an automation scenario using the Make.com Free Plan and I need assistance with my workflow. I would like to automate the creation of tags for a blog post based on existing tags from WordPress and avoid duplicate tags.
Scenario Overview:
I’m trying to generate tags for a WordPress blog post based on the Clean Tag Name and Clean Tag Slug variables. Here’s how my workflow is structured:
-
Set Clean Tag Variables
- Module 10 & 11: The workflow begins by setting Clean Tag Name and Clean Tag Slug as variables.
-
Search for Existing Tags
- Module 12 (WordPress: Search Tags): I use the WordPress: Search Tags module to search for existing tags in WordPress that match the Clean Tag Name.
-
Set Tag ID
- Module 13 (Set ThisTagId): If I find a matching tag, I save its ID to a variable called
ThisTagId.
- Module 13 (Set ThisTagId): If I find a matching tag, I save its ID to a variable called
-
Create New Tags
- Module 14 (WordPress: Create Tag): If no matching tag is found, I create a new tag in WordPress using the Clean Tag Name and Clean Tag Slug.
-
Aggregate Tags
- Module 15 (Array Aggregator): I use the Array Aggregator module to gather all the tag IDs (from both the existing and newly created tags).
-
Map Function
- Module 16 (Map Function): The Map function is used to process and generate the final list of tag IDs. Here, I combine the tag IDs from the Array Aggregator and any new tags created.
Key Workflow Considerations:
- Tag Limit: The number of tags will not exceed 100 tags.
- Avoiding Duplicates: If a tag already exists, I do not want to create it again. Instead, I will reuse the existing tags from the search result.
- Final Tag List: The tags used in the post will be a combination of the existing tags found from the search and the newly created tags. These tags will then be associated with the post.
Issue:
When I try to map the tag IDs in the Map Function (Module 16), I get errors related to empty values and invalid expressions. Specifically, the expression:
{{map(15.array; if(coalesce(ThisTagId; "") != ""; ThisTagId; 14.id))}}
is throwing errors.
Additionally, in the Array Aggregator, I have selected the following:
- Source Module:
Set ThisTagId - Set variable [13] - Aggregated Fields:
ThisTagId
Despite this setup, I am still unable to successfully map the tag IDs and create or update tags in WordPress.
Request:
Can anyone help me troubleshoot this issue or provide guidance on how to properly:
- Handle empty values in the Map Function.
- Properly set up Array Aggregator to avoid duplicates and ensure the right tags are used.
- Combine both existing and newly created tags to create a final list.
- Re-output the post with the correct tags.
Also, any suggestions on how to improve the workflow would be greatly appreciated.
Thanks in advance! ![]()
Blueprint attached
Gen Tags with Existing Tags Reference - Make Free Plan V.blueprint (2).json (141.6 KB)
