Skip to main content

Hello guys, I Zain, I am having hard time in creating draft produt in Shopify.
I have typeform connected with Zapier - Zapier connected with Shopify

Form is submitting in Zapier, Getting full response, product is creating in shopify
But I am unable to get file urls

I am doing run javascript event on all steps
Also doing rest API instead of graphql.
Here is my code for step 2 to process form data, m not sure what am I doing wrong here
output = {
  whyItMatters: inputData.whyItMatters || '',
  solution: inputData.solution || '',
  challenges: inputData.challenges || '',
  overview: inputData.overview || '',
  zap_id: inputData.zap_id || '', // This is the response ID
  title: inputData.title || '',
  images: m
    {
      id: "0fLTGDFUVbH6",
      title: "Add Photos to your fundraiser (1/3)",
      ref: "cc9f052f-4501-4d5c-be7d-431a79be17d5",
      properties: {
        description: "Add a few photos to help tell your story. Please make sure your photos are less than 25MB."
      },
      validations: {
        required: true
      },
      type: "file_upload",
      // Ensure that the field name 'field_0fLTGDFUVbH6' exists and has a value in inputData
      url: https://api.typeform.com/responses/files/${inputData.zap_id}/${inputDatar'field_0fLTGDFUVbH6'] || ''} 
    },
    {
      id: "aQCvk1JvZv87",
      title: "Add Photos to your fundraiser (2/3)",
      ref: "f35af3ba-1afd-4159-a441-352c17daf7b2",
      properties: {
        description: "Add a few photos to help tell your story. Please make sure your photos are less than 25MB."
      },
      validations: {
        required: true
      },
      type: "file_upload",
      // Ensure that the field name 'field_aQCvk1JvZv87' exists and has a value in inputData
      url: https://api.typeform.com/responses/files/${inputData.zap_id}/${inputDatar'field_aQCvk1JvZv87'] || ''}
    },
    {
      id: "KDwjMaQCRp7T",
      title: "Add Photos to your fundraiser (3/3)",
      ref: "96960558-52b0-4dee-8424-fb5b818b9764",
      properties: {
        description: "Add a few photos to help tell your story. Please make sure your photos are less than 25MB."
      },
      validations: {
        required: true
      },
      type: "file_upload",
      // Ensure that the field name 'field_KDwjMaQCRp7T' exists and has a value in inputData
      url: https://api.typeform.com/responses/files/${inputData.zap_id}/${inputDatap'field_KDwjMaQCRp7T'] || ''}
    }
  ]
};

If anyone can help it would be great

If anyone can give a detail solution for above it would be great, I already had a bad scene with client because of delay in project.