I need your help with setting up a scenario for processing news articles.
Goal:
I’m trying to get the publication date of a news article using Apify (specifically, the “Website Content Crawler” actor) and then filter out articles that were published more than 7 days ago.
Modules and Logic Involved:
Module 103 (Apify - Run an Actor): Runs the “Website Content Crawler” actor to scrape the news article URL. I expect this actor to extract the full news text and its metadata, including the publication date (datePublished), which is often found in the jsonLd structure.
Module 105 (Apify - Get Dataset Items): Retrieves the results from the actor’s run in the previous step.
Next Step (Filter / Processing Module): Here, I want to use the retrieved publication date to compare it with the current date. If the news is older than 7 days, the scenario should not process it further.
The Problem:
I’m encountering an issue when trying to retrieve the publication date value from Module 105 (Apify - Get Dataset Items). I’m attempting to use the variable path {{105.metadata.jsonLd[].datePublished}} for mapping. However, when I try to use this variable (e.g., in a subsequent module for a check or directly in a filter), I don’t get the expected date value.
It seems that:
Either the path {{105.metadata.jsonLd[].datePublished}} is incorrect.
Or the data within the jsonLd array has a different structure than I expect.
Or I’m not correctly handling the jsonLd[] array (perhaps I need to retrieve a specific element of the array, for instance, the first one if it exists there).
What I want to achieve:
Successfully extract the publication date (datePublished) from the Apify results (Module 105).
Convert this date into a format suitable for comparison.
Set up a filter that only allows news articles published within the last 7 days (inclusive) to pass through.
Questions for the Community:
How can I correctly access the datePublished value within the jsonLd array (returned by the Apify - Get Dataset Items module)? Is there a standard way to work with such arrays in Make if the required value is expected to be in, for example, the first element of the jsonLd array?
Could someone suggest the best way to inspect the actual data structure returned by Module 105 to accurately determine the correct path to datePublished?
What are the best practices for implementing date-based filtering in Make.com when the date comes from an external service (like Apify) and might require parsing and formatting?
I’m attaching a screenshot of the part of my scenario where I’m trying to use this date in an OpenAI module (ID 32 from my blueprint), although I understand the main problem lies in retrieving the data from Module 105.
It seems like jsonLd is an array containing another array, so it should be something like this instead, assuming you only want to reference the first item in the arrays.
{{105.metadata.jsonLd.1.1.datePublished}}
(copy-paste the above into the field, or type it exactly as shown)
Hope this helps! Let me know if there are any further questions or issues.
Hello!
I’m very grateful that you’ve come forward to help me!
Either I did something wrong or it didn’t work.
The date of this news item is more than 7 days from today, so the filter should have said “Yes” and the news item should NOT have been allowed to go any further.
If you need further assistance, please provide the following:
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”.
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.
Hi! I’m having the same issue. I’ve tried the modification @samliew advised, but I got an empty value. I can map the item in the array, but when running the scenario, every item in the array misses (date, headline, etc.)
@Yurii1 I’ve found the solution (witht the help of ChatGPT o3). The problem is that the data you and I wanted to map is in a Collecton within an array. So first, you have to tell Make which Collection to search, and then give the ‘raw name’ of the data.
You must hardcode the collection number (in my case: 2), and the raw data (in my case: headline) to have the value as a result. You can find the raw data by hoovering your mouse on the output bundle.
In my case it looks like this: {{1.metadata.jsonLd[2].headline}}
I attach a screenshot, hope it helps. Good luck with your scenario!
Janos