0

I love how you can get an object's payload in a Zapier trigger step now. I can parse out just about anything. But after that, should I need to reference a linked object I need to pull another webhook from a different object in a resulting action step. When I use GET or Fetch and even a custom app I built, the results are parsed into line items and the nested fields are put into a list of comma separated by title and then by value.

My JSON from insightly looks like this:

{
"entity": {
    "ORGANISATION_ID": 132425186,
    "ORGANISATION_NAME": "Go Chargers",
    "OWNER_USER_ID": 1689885,
    "DATE_CREATED_UTC": "2019-01-22T02:03:54",
    "DATE_UPDATED_UTC": "2019-02-10T02:07:43.37",
    "VISIBLE_TO": "EVERYONE",
    "CUSTOMFIELDS": [{
        "CUSTOM_FIELD_ID": "Advisor__c",
        "FIELD_VALUE": 3726249
    }, {
        "CUSTOM_FIELD_ID": "ContactTaxMatters__c",
        "FIELD_VALUE": 280789638
    }, {
        "CUSTOM_FIELD_ID": "ContactTaxMattersSpouse__c",
        "FIELD_VALUE": 280790046
    }, {
        "CUSTOM_FIELD_ID": "Financial_Advisor__Billed__c",
        "FIELD_VALUE": false
    }, {
        "CUSTOM_FIELD_ID": "Inactive__c",
        "FIELD_VALUE": false
    }, {
        "CUSTOM_FIELD_ID": "Price__Calculated__c",
        "FIELD_VALUE": 747.0
    }, {
        "CUSTOM_FIELD_ID": "Renew_2017__c",
        "FIELD_VALUE": true
    }, {
        "CUSTOM_FIELD_ID": "Renew_2018__c",
        "FIELD_VALUE": true
    }, {
        "CUSTOM_FIELD_ID": "Renew_2019__c",
        "FIELD_VALUE": true
    }],
    "ADDRESSES": [{
        "ADDRESS_TYPE": "POSTAL",
        "COUNTRY": "United States"
    }, {
        "ADDRESS_TYPE": "PRIMARY",
        "COUNTRY": "United States"
    }],
    "CONTACTINFOS": [],
    "DATES": [],
    "TAGS": [],
    "LINKS": [{
        "LINK_ID": 199459171,
        "CONTACT_ID": 280790046,
        "ORGANISATION_ID": 132425186,
        "ROLE": "Spouse"
    }, {
        "LINK_ID": 199459178,
        "CONTACT_ID": 280789638,
        "ORGANISATION_ID": 132425186,
        "ROLE": "Tax Matters Contact"
    }, {
        "LINK_ID": 200901030,
        "ORGANISATION_ID": 132425186,
        "PROJECT_ID": 8913396
    }, {
        "LINK_ID": 200901074,
        "ORGANISATION_ID": 132425186,
        "PROJECT_ID": 8913407
    }, {
        "LINK_ID": 200901242,
        "ORGANISATION_ID": 132425186,
        "PROJECT_ID": 8913431
    }],
    "ORGANISATIONLINKS": []
}

}

It's the custom fields that throw me. I have no issue getting to them via code steps using JS or Python when in raw payload format, but after Zapier gets their hands on them they aren't so useful.

So, the question is can I get another raw payload from a GET request in an action step of a Zap? Or, is there a better way to do this. I need the Raw payload in the Trigger as it is as that is the "Organization" that will later update the "Project."

To add a little more to this, it's the more complicated structure of the "CUSTOMFIELDS": [{ "CUSTOM_FIELD_ID": "Advisor__c", "FIELD_VALUE": 3726249 that I have the most trouble with. Any help would be greatly appreciated.

  • if you're comfortable with it, it sounds like writing a small app will be your best bet here. You get the most control and can pass around data however you want. I typically do this and pass a json string so Zapier doesn't change any of the fields. Then I can read/parse/filter in a code step as needed. – xavdid Feb 11 '19 at 20:43
  • I have an app going and it works, but it does the same thing as above where it parses out the fields wrong. I haven't a clue how to get it to pass a string. Are there any example apps out there or is there someone we can hire? – Eric Greenspan Feb 12 '19 at 16:26
  • For my workaround, you'd use `return {data: JSON.strintify(output)}`, which won't be touched by zapier itself. It's a bit of a workaround and wouldn't fly for public apps, but for private use it's great. and for hiring, I'd talk to the folks mentioned on our experts page: https://zapier.com/help/integration-developers-partners/. They'll be able to devote time to your problem and get you set. – xavdid Feb 12 '19 at 17:02
  • Thanks David. I am a Zapier Expert. :) – Eric Greenspan Feb 24 '19 at 13:02
  • This is solved by you here https://stackoverflow.com/questions/55699288/is-there-a-simpler-way-to-extract-parse-nested-object-values-that-is-not-fixed/55713014#55713014 – Eric Greenspan Jun 08 '20 at 21:02

0 Answers0