Data mismatch creating a product with Printify

I have a scenario that I made that is supposed to upload an image from google sheets to printify and then make a new printify product using that image.

Everything is working as expected, except for the last module that is supposed to grab the image and create the new product in printify. I keep getting an error:

"The operation failed with an error. [400] blueprint_id: The blueprint id must be an integer. | print_provider_id: The print provider id must be an integer. | variants.0.id: The variants.0.id must be an integer."
INPUT:

[
    {
        "title": "Motivation and Affirmation Ceramic Coffee Mug 15oz",
        "shopId": "2567425",
        "variants": [
            {
                "id": "75654",
                "price": 18,
                "is_enabled": false
            }
        ],
        "description": "Stay inspired with each sip from this 15oz ceramic mug that boasts a collage of motivational and affirmational phrases in varying fonts and orientations. Sporting phrases like 'ENJOY THE LITTLE SHIT' and 'CELEBRATE EVERY DAMN WIN,' this staple beverage partner promises a mindful start to your day. Leaf, star, arrow accents coupled with shades of brown, black, and a dash of red give it an appealing aesthetic. Ideal for anyone seeking a gentle push of motivation or encouragement over their warm beverage.",
        "print_areas": [
            {
                "variant_ids": [
                    "484"
                ],
                "placeholders": [
                    {
                        "images": [
                            {
                                "x": 0.5,
                                "y": 0.5,
                                "id": "65df9f8657a21731b0190138",
                                "angle": 360,
                                "scale": 1
                            }
                        ],
                        "position": "front"
                    }
                ]
            }
        ],
        "blueprint_id": "484",
        "print_details": {
            "print_on_side": "regular"
        },
        "print_provider_id": "65222"
    }
]

OUTPUT:

[
    null
]

I realize that it’s looking for an integer, but the problem is the image ID that I’m getting after uploading the image to printify is not an integer, it’s a long string of numbers and letters.

Thanks in advance!

Welcome to the Make community!

1. Screenshots of module fields and filters

Please share screenshots of relevant module fields and filters in question? It would really help other community members to see what you’re looking at.

You can upload images here using the Upload icon in the text editor:
Screenshot_2023-10-07_111039

2. And most importantly, Input/Output bundles

Please provide the input and 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”.
Screenshot_2023-10-06_141025

A.

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

Uploading them here will look like this:

module-1-input-bundle.txt (12.3 KB)
module-1-output-bundle.txt (12.3 KB)

B.

If you are unable to upload files on this forum, alternatively you can paste the formatted bundles in this manner:

  • Either add three backticks ``` before and after the code, like this:

    ```
    input/output bundle content goes here
    ```

  • Or use the format code button in the editor:
    Screenshot_2023-10-02_191027

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. Thanks!

2 Likes