Pagination and filters

What are you trying to achieve?

I’m working on a Make scenario to fetch loads from SuperDispatch using their API, specifically for orders delivered within the last 24 hours. The SuperDispatch API provides paginated data, so I’m using pagination to ensure I retrieve all relevant records. Once the data is in Make, I need to filter and compare it with existing records in Zoho CRM to prevent duplicates, using the Load ID field as the unique identifier.

The challenge I’m facing is setting up the correct filter in Zoho CRM to identify and skip records that already exist based on the Load ID. I’ve tried using various text operators (in Zoho Search only text operators is ok), but duplicates are still being created. Any advice on configuring Zoho CRM search or filters correctly in Make to ensure only new loads are added?

Steps taken so far

I made scenario step by step by guide of pagination, but im struggling 2 days and chatgpt cant help me :frowning:

Here’s an overview of each module in scenario

  1. Tools (Set Multiple Variables) - This module initializes any variables needed for the scenario. These variables might include parameters like the start time for filtering loads within the last 24 hours or initial values for pagination.

  2. Repeater - This module is used to repeat actions in the scenario for a specific number of times or until a condition is met. It could be set to handle multiple pages of API results, ensuring that each page of loads is processed.

  3. Get Page URL (Set Multiple Variables) - This module captures the URL for the next page in the API response, enabling pagination. It likely checks if there’s a “next page” link and sets it as a variable to fetch the following batch of loads.

  4. Get Access Token (Make a Request) - This module makes an API call to SuperDispatch to retrieve an access token. This token is essential for authenticating further requests to the SuperDispatch API and may have to be refreshed periodically.

  5. Get Loads by Access Token (Make a Request) - With the access token, this module retrieves loads from the SuperDispatch API. It includes filters for:

Status: set to “delivered.”
Delivery completed_at: only loads delivered in the last 24 hours.

  1. Next (Set Multiple Variables) - This module captures the “next” URL for pagination from the API response if additional pages are available. It allows the scenario to keep looping through pages until all loads are retrieved.

  2. Iterator - This module breaks down the list of loads into individual items so that each load can be processed separately in subsequent modules. This is necessary for checking each load’s ID individually in Zoho CRM.

  3. Search Load ID in Zoho CRM (Search Objects) - For each load, this module searches in Zoho CRM by Load ID to determine if the load already exists. It helps prevent duplicate entries. If the load is found, it proceeds to the next item without creating a duplicate.

  4. Filter (If Not Exist) - This filter is applied to check if a load doesn’t exist in Zoho CRM. Only loads that are not found in the previous step proceed to the “Create Load” step.

  5. Create Load in Zoho (Create an Object) - If a load is confirmed as unique (i.e., it doesn’t exist in Zoho CRM), this module creates a new record in Zoho CRM with the relevant load details.

I tried a lot of filters, but still i have multiple records in Zoho :frowning:

What condition and text operator i should use after Zoho Search CRM and before Zoho create object? (last 2 modules)

Screenshots: scenario setup, module configuration, errors





Welcome to the Make community!

I would suggest completing the Make Academy before jumping into building a complete scenario. If you need specific assistance when you are building a scenario it’s easier to help you then. Otherwise, you can also hire a professional by posting a request in the Hire a Pro category.

Here are some useful links and guides you can use to learn more on how to use the Make platform, apps, and app modules. I found these useful when I was learning Make, and hope they might benefit you too —

Getting Started

Help Centre Basics

Articles & Videos

If you need further assistance, please provide the following:

1. Scenario Blueprint

Please export the scenario blueprint file to allow others to view the mapped variables in the module fields. At the bottom of the scenario editor, you can click on the three dots to find the Export Blueprint menu item.

2. Output Bundles of Modules

Please provide the output bundles of the modules by running the scenario (or get from the scenario History tab), then click the white speech bubble on the top-right of each module and select “Download input/output bundles”.

A. Upload as Text File

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

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 even if they do not use the external service.

Following these steps will allow others to assist you here.

Did you know, this forum has a Hire a Pro category, where you can post your request for off-site specialised help on other platforms (video call/screenshare/private messaging/etc.)? This may help you get your issue resolved faster especially if it is urgent. It is important to post your request in the Hire a Pro category, as forum members are not allowed to advertise their services (even offer FREE assistance to help) in other categories like here. Once you have posted in the Hire a Pro category, that will allow other members to provide booking links to our calendars for a free consultation and video assistance (including screen share).

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.