Why is the Canva "Create Design" action requiring additional parameters (width, height) not defined in the action's configurable properties?

This topic was automatically generated from Slack. You can find the original thread here.

Hi team, I’m running into an issue with the Canva “Create Design” action.
According to the action definition, it only has these three configurable input parameters:

  1. designType (string, required – preset/custom)
  2. title (string, optional)
  3. assetId (string, optional)
    action Object:
{
            "name": "Create Design",
            "description": "Creates a new Canva design. [See the documentation](https://www.canva.dev/docs/connect/api-reference/designs/create-design/)",
            "component_type": "action",
            "version": "0.0.6",
            "key": "canva-create-design",
            "annotations": {
                "readOnlyHint": false,
                "openWorldHint": true,
                "destructiveHint": false
            },
            "configurable_props": [
                {
                    "name": "canva",
                    "type": "app",
                    "app": "canva"
                },
                {
                    "name": "designType",
                    "type": "string",
                    "label": "Design Type",
                    "description": "The desired design type",
                    "reloadProps": true,
                    "options": [
                        {
                            "label": "Provide the common design type",
                            "value": "preset"
                        },
                        {
                            "label": "Provide the width and height to define a custom design type",
                            "value": "custom"
                        }
                    ]
                },
                {
                    "name": "title",
                    "type": "string",
                    "label": "Title",
                    "description": "The name of the design",
                    "optional": true
                },
                {
                    "name": "assetId",
                    "type": "string",
                    "label": "Asset ID",
                    "description": "The ID of the asset to add to the new design",
                    "optional": true
                }
            ]
        },

But when I try to execute the action, I get the following error:

"data": {
  "code": "invalid_field",
  "message": "'width' must not be null."
}

The confusing part:

• In the action inputs, I don’t see width or height.
• if I try using this via a Pipedream workflow, it initially only asks for the first three inputs, but when I select designType → custom (or preset), it expands further and starts requiring additional fields like width and height.
Can you help why the action is asking for these additional parameters (width, height) even though they’re not defined in the action’s configurable_props, and how I should be handling them?

Thanks!

Hi , could you share the code/configuration you use to execute the action?

Hi ,
This is the configuration for API call my other actions are working fine like youtube_data_api-search-videos etc:
code:

private async callPipedreamAPI(
    input: ToolExecutionInput,
    toolMeta: ToolMeta,
    credentials: Recordstring, any,
  ) {
    const endpoint = `${this.baseUrl}/connect/${this.projectId}/actions/run`
    const accessToken = await this.getAccessToken()
    const body = this.buildRequestBody(input, toolMeta, credentials)
    const headers = this.buildRequestHeaders(accessToken)

    console.log(
      'OOOOOOOOOOOOO\n',
      JSON.stringify({ endpoint, body: objectCleaner(body), headers }, null, 2),
    )

    return firstValueFrom(
      this.httpService.post(endpoint, objectCleaner(body), { headers }),
    )
  }

and its output:


 {
  "endpoint": "https://api.pipedream.com/v1/connect/project-id/actions/run",
  "body": {
    "id": "canva-create-design",
    "external_user_id": external_user_id,
    "configured_props": {
      "canva": {
        "authProvisionId": connection-id
      },
      "designType": "custom",
      "title": "title test 1"
    }
  },
  "headers": {
    "Authorization": "Bearer token",
    "Content-Type": "application/json",
    "x-pd-environment": "production"
  }
}

error:

    "data": {
      "code": "invalid_field",
      "message": "'width' must not be null."
    }
  },
  "status": 400,
  "stack": "AxiosError: Request failed with status code 400\n ...."

I suspect that the designType prop is the problem, let me check though

two options are there I’m currently using custom

{
  "designType": ["preset", "custom"]
} 

Hey , I tested on Pipedream Connect Demo and it works for me (image below)

I think the best way to make it work for you is to try to test Canva > Create Design action on Pipedream Connect Demo, switch to the Debug tab, you’ll be able to see request & response payload of each request

Hey , thanks for sharing this Pipedream Connect Demo, tMy question is still the same: on the left side under propName, I only see these 4 configurable_props.

But once I select any of design type option, Pipedream adds extra parameters in UI. for example, in your screenshot it shows design type name (which wasn’t originally part of the configurable_props).
So when I call the action, it throws an error because those additional parameters are missing.

If you select design type: custom, it also asks for Width and Height (again, not part of the original configurable_props) see SS attached.
Since I don’t have these extended/additional params, I can’t ask them from my users, and the action fails.

is there a way or API to get additional params based on user’s selection just like pipedream app doing it and similar to the connect demo

Yes, check out this section of the docs: Executing Actions - Pipedream

Thank you very much, , that reference was really helpful.
I have a few questions:

  1. Can I safely store the dynamic_props_id in my database and reuse it later? I’ve been using the same dynamic_props_id on action execution for about a week, and it’s been working fine. just wondering if it has any expiry.
  2. Are there cases where multiple props have reloadProps: true, or where props depend on each other (nested levels)? Or is there always only one dynamic prop per action?
  1. Yes you can store the dynamic_props_id and use it later, I don’t think it expires, the only gotcha would be if the component definition changes across a major version update
  2. Yes I do believe you can have multiple dynamic props, so you’ll want to use that latest dynamic_props_id when you execute the action.