Formula returns 'empty' result for an existing SendGrid list, causing duplicate creation errors

:bullseye: What is your goal?

I want to retrieve a SendGrid List ID by matching its name using a get(map()) formula. The goal is to avoid creating duplicates and simply update the contact if the list is already there.

:thinking: What is the problem & what have you tried?

There is a major inconsistency between list creation and list detection:

First run (success): When the list didn’t exist, Make successfully followed the “Inexistent” path and created the list Forecast - David L. Shrier 2/18 in SendGrid (screenshot below)

Second run (failure): When testing again with the exact same data, the Tools module returns empty. It fails to find the ID of the list it just created, even though the names are identical.

The error: because it returns “empty”, the Router takes the “Inexistent” path again. This leads to a “400: list name is already in use” error because SendGrid (rightfully) refuses to create the duplicate.

I have tried various formula formats, but the UI often adds unexpected green “+” symbols or strips quotes, which seems to break the matching logic…

:clipboard: Error messages or input/output bundles

Bundle 1: { “ListID”: empty }
RuntimeError: [400] Error on field NAME: list name is already in use

:camera_with_flash: Screenshots (scenario flow, module settings, errors)

My full scenario

The Sendgrid list created first time by Make.

The variable value

The empty result

The error when I test with a new contact, it should normally go to “Exist” for existing list, no Inexistant.

1 Like

Hey there,

Looks like there is an empty space between the speaker name and the date in the array but that’s missing in the formula. Can you double check that they match?

I double-checked the formula and explicitly added the space " " between the variables, but it still returned empty.

To be absolutely sure it wasn’t a formatting issue, I even hardcoded the exact string "Forecast - David L. Shrier 2/18" directly into the formula (removing the variables entirely). Even with the exact hardcoded name, the result is still empty.

But now you have double quotes around forecast.

Yes, I tried something in meantime, sorry. I deleted the quotes.
I added a space between SpeakerName and EventDate.
So this is my result

And what make shows me when I want to run the module. I think it should be an extra “ “ between SpeakerName and EventDate but if I add it manually, I’ll have something like ““ ““ from Make… So I don’t know what do to here for the space.

Did you try hardcoding it again to see if it fetches the correct list by list name, but without the double quotes that you added?

Can you provide your scenario blueprint and output from module 11?

A. Scenario Blueprint

Providing your scenario 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 benefit you in implementing our suggestions as you can view screenshots of the changes or paste corrected modules back into your scenario.

Expand Instructions â—€

A. Export Blueprint

In the scenario editor, click the three dots at the top-right, then select “Export blueprint”.

  • You can upload files and images to this forum by clicking on the upload button:

    Uploading an attachment here will look like this:
    blueprint.json (12.3 KB)

B. Create Public Share Link

In the scenario editor, click on the Share button:

Read more about the scenario sharing feature in the Help Centre.

B. Properly-formatted Output Bundles from a Scenario Run

Please provide the input/output bundles of each of the relevant modules by running the scenario, or get the bundles from a previous run from the Scenario “History” tab.

Providing the bundles from a scenario run will allow others to replicate what is going on, especially if there are complex data structures (nested arrays and collections) and external services. This helps mapping the correct raw variable names from collections (instead of the label/display name).

Format bundles or JSON with the Code button.

Expand Instructions â—€

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

A. Upload a Text File

Save each bundle contents in a plain text editor as a moduleNumber-output.txt file. Open the file to check if it has not added additional formatting or encoded the plain text.

  • You can upload files and images to this forum by clicking on the upload button:

    Uploading an attachment here will look like this:
    module1-input.txt (1.2 KB), module1-output.txt (3.4 KB)

B. Insert a Formatted Code Block

If you are unable to upload files on this forum, alternatively you can paste the bundles AND format them correctly.

:warning: Formatting IS Important! :warning:

Here are some ways to provide text content in a way that it won’t be modified by the forum.

  • Method 1: Type code fence manually —
    Manually type three backticks ``` in a separate line before and after the content, like this,

    ```
    text goes here
    ```
    
  • Method 2: Highlight the pasted content, then click the preformatted text/code button —

  • Method 3: Upload your file elsewhere and share the public link —
    This method is only advised for large files exceeding the forum upload limit.


Sharing these details will make it easier for others to assist you, so that you can get better answers, faster.

— @samliew