Skip to main content

Hi

May i know if i want to fill the nested json map data into a data field. How should i fill it. 

 

Json:

{
  channelId: 'YOUR_WHATSAPP_CHANNEL_ID',
  to: 'RECIPIENT_OF_THE_MESSAGE(PHONE_NUMBER)',
  type: 'hsm',
  content: {
    hsm: {
      namespace: 'YOUR_NAMESPACE_ID',
      templateName: 'YOUR_TEMPLATE_NAME',
      language: {
        policy: 'deterministic',
        code: 'YOUR_LANG_CODE',
      },
      params:
        { default: 'YOUR_PARAM' }
      ]
    }
  }
}

 

 

Before answering, just want to confirm a few things:

  1. You are building a Zapier integration for your API (as opposed to configuring a Zap as a user, in the Zapier product)?
  2. Your API expects data in the shape of the JSON example you posted?
  3. You are trying to figure out how to design input fields in your Action to allow your users to map data into that object?

If so, I think the general direction you will want to look at is presenting a “flat” structure to your users as you define your input fields, and then using scripting in your perform function to reshape the data before sending it to your API.