Push data from Zapier to Glide tables

Hi guys,

Currently there are only Zapier automations that trigger on Glide Apps, but you can not do anything within.

I’m sure there are a lot of other people who would also want to use native Glide Tables, but are unable to because we can not automatically add data to it.

In my use case, I want to create an automated advertising report for clients. I could do this with another table but as there seems to be a maximum of one Google Sheet I’m afraid I’ll run out of options very soon, making GlideTables the only option.

My request therefore is: create a Zapier integration with which we can push data to Glide Tables.

2 Likes

So you mean you want to add data to Glide Tables, like adding rows? Wouldn’t it be possible with the Glide API?

Zapier would exactly use the Glide API for actions. This is why Zapier is paid service as it does all the API work for you, you just have to map fields.

Hi, a few months ago i created a custom request in Webhooks by Zapier in order to add rows to my glide table.

in the code, i referenced the json details as glide present it when going to “show api” on the table.

Now, a few months later, i copied my zap as i made some changes, but my connection to the api doesnt want to work any longer. has Glide changed the way i need to connect to the api? when i went to my pages show api , it also looked different and now im not sure how to troubleshoot it as im not an expert in APIs - the zapier error is: Error (HTTP Status Code: 400)

do you perhaps have an idea on what this could be?

thanks

400 means that you’ve sent a bad request. It could be either malformed JSON, or incorrect references.

If you can provide a screen shot of what you see with “Show API usage” and also what you have in Zapier, I might be able to help you spot the problem.

Be sure to redact any private data, especially your API token.

Hi Darren,

Thanks alot, here is the show api copy of code:

import * as glide from "@glideapps/tables";

const enquiriesTable = glide.table({
    token: "xx",
    app: "xx",
    table: "native-table-OMHAcghgN3aDTWlRdWYi",
    columns: {
        zapierCurrentUser: { type: "string", name: "Owner/CurrentUser" },
        zapierStatus: { type: "string", name: "Lead Status/Status" },
        zapierLinked2: { type: "string", name: "NjI5K" },
        zapierLinked3: { type: "string", name: "O7mv1" },
        zapierDateAdded: { type: "date-time", name: "Lead Status/Date Added" },
        zapierContactPerson: { type: "string", name: "Lead Details/Contact Person" },
        zapierMobile: { type: "string", name: "Lead Details/1a_propctrl imported mobile" },
        zapierResidentialListing: { type: "string", name: "Lead Details/Residential Listing" },
        zapierCommentsEnc: { type: "string", name: "Comments" },
        zapierEmailAddress: { type: "string", name: "Lead Details/Email Address" },
        zapierProvince: { type: "string", name: "Lead Details/Province" },
        zapierLeadSource: { type: "string", name: "Lead Details/Lead Source" },
        zapierSourceDescription: { type: "string", name: "Lead Details/Source Description" },
        zapierBranch: { type: "string", name: "Lead Details/Branch" },
        zapierPageUrl: { type: "uri", name: "Lead Details/Page Url" },
        zapierArea: { type: "string", name: "Area" },
        zapierListingType: { type: "string", name: "Imported Listing Type" },
        leadType: { type: "string", name: "837iN" }
    }
});

const enquiriesID = await enquiriesTable.addRow({
    // Add columns here
});

and here is the zapier code:

{
    "appID": "CNO5GDvnlgXbh9aAf66p",
    "mutations": [
        {
            "kind": "add-row-to-table",
            "tableName": "native-table-OMHAcghgN3aDTWlRdWYi",
            "columnValues": {
                "Owner/CurrentUser": "{{_GEN_1681800266186__output__0}}",
                "NjI5K": "None",
                "O7mv1": "None",
                "Lead Status/Date Added": "{{190231198__date}}",
                "Lead Status/Status": "Not Verified",
                "Lead Details/Contact Person": "{{_GEN_1681800266187__output__0}}",
                "Lead Details/1a_propctrl imported mobile": "{{_GEN_1681800266188__output__0}}",
                "Lead Details/Residential Listing": "{{_GEN_1681800266189__output__0}}",
                "Lead Details/Email Address": "{{190231198__reply_to__email}}",
                "Lead Details/Province": "See property url",
                "Lead Details/Lead Source": "Private Property",
                "Lead Details/Source Description": "Listing Enquiry",
                "Lead Details/Branch": "Cornerstone Property Partners",
                "Lead Details/Page Url": "{{190231202__output}}",
                "Imported Listing Type": "See property url",
                "Area": "{{_GEN_1681800266190__output__0}}",
                "Comments": "{{190231207__output}}"
              
            }
        }
    ]
}

lastly i assume one can push data from multiple sources into the same glide table?

thanks

Can you show me the curl version please?

Yes, that’s possible.

curl --request POST 'https://api.glideapp.io/api/function/mutateTables' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer xxx' \
  --data-raw '{
  "appID": "CNO5GDvnlgXbh9aAf66p",
  "mutations": [
    {
      "kind": "add-row-to-table",
      "tableName": "native-table-OMHAcghgN3aDTWlRdWYi",
      "columnValues": {
        "Owner/CurrentUser": "Zapier/CurrentUser",
        "Lead Status/Status": "Zapier/Status",
        "NjI5K": "Zapier/Linked2",
        "O7mv1": "Zapier/Linked3",
        "Lead Status/Date Added": "Zapier/Date Added",
        "Lead Details/Contact Person": "Zapier/Contact Person",
        "Lead Details/1a_propctrl imported mobile": "Zapier/Mobile",
        "Lead Details/Residential Listing": "Zapier/Residential Listing",
        "Comments": "Zapier/Comments_enc",
        "Lead Details/Email Address": "Zapier/Email Address",
        "Lead Details/Province": "Zapier/Province",
        "Lead Details/Lead Source": "Zapier/Lead Source",
        "Lead Details/Source Description": "Zapier/Source Description",
        "Lead Details/Branch": "Zapier/Branch",
        "Lead Details/Page Url": "Zapier/Page Url",
        "Area": "Zapier/Area",
        "Imported Listing Type": "Zapier/Listing Type",
        "837iN": "Lead Type"
      }
    }
  ]
}'

Okay, I can’t see anything obviously wrong there. My next guess would be that there may be reserved characters in your data that is invalidating the JSON payload.

Is it possible that any of you data fields contain double quotes or multi-line strings? (these are the most common things that can cause breakage). When using Make, we would construct our payload using a JSON module to avoid this. I’m not sure if Zapier has something similar.

Hi Darren, not that i can notice…i even encoded the comments string to ensure there is multiline strings. - let me have a look if zapier has that…

@Darren_Murphy , can you spot any outputs in this payload that could break the json?

unflatten:	yes
method:	POST
url:	https://api.glideapp.io/api/function/mutateTables
data:	{
  "appID": "CNO5GDvnlgXbh9aAf66p",
  "mutations": [
    {
      "kind": "add-row-to-table",
      "tableName": "native-table-OMHAcghgN3aDTWlRdWYi",
      "columnValues": {
        "Owner/CurrentUser": "Nick Wood",
        "Lead Status/Status": "Not Verified",
        "NjI5K": "NA",
        "O7mv1": "NA",
        "Lead Status/Date Added": "Tue, 18 Apr 2023 21:09:02 +0000",
        "Lead Details/Contact Person": "Naisha
",
        "Lead Details/1a_propctrl imported mobile": "0677912293",
        "Lead Details/Residential Listing": "RR3775775",
        "Comments": "Nick%20Wood%20Please%20contact%20me%20regarding%20this%20property.%202%20bed%20apartment%20in%20Table%20View%2C%206%20Xanadu%20Heights%2014",
        "Lead Details/Email Address": "woolfnaisha@gmail.com",
        "Lead Details/Province": "See Property Url",
        "Lead Details/Lead Source": "Private Property",
        "Lead Details/Source Description": "Listing Enquiry",
        "Lead Details/Branch": "Cornerstone Property Partners",
        "Lead Details/Page Url": "https://tracking.privateproperty.co.za/tracking/click?d=-w6W86IciuWXXrmHJTeBO9bX8Dd_S1prUHCZBpAe9xxV3Qg0xNhl_ThYkutTdT6Rbm02UQkdWQnwUP0tpzRvl3_XPOmXFfRFdL-6m1Sy8oEvogkMlGP7WAF_t9o-SySX2xuuaDxxMEjcEqlDo2bmCONtsImE9XeTh35rAPeFLLzH1ixRrX47VM2CknLEFAaPm4YPOrV8RfZrMkdOV0SyztN3h3N73xAWkX4_T25c4mDuMpFcGTU6M4_kP4txCh0vv2Y0eIM9VRAYihHE4jeG8Tk10T6gca46S4JxLEWGXFDg0",
        "Area": "Table View, 6 Xanadu Heights 14 North Road",
        "Imported Listing Type": "See Property Url",
        "837iN": "No label"
      }
    }
  ]
}

I seem to have a problem with my “Lead Details/Contact Person” field, with Regex :

(?<=From:)\s*(.*)

it seems my regex brings back the person’s name, plus adds a “enter” into it… do you have any suggestion on how to resolve?

this is what the text look like

Private Property Ref:

RR3784303

Your Agency Ref:

22e840fa-1725-42f1-bd55-0dc2252ff0a3

My contact details

From:

Elizabeth De Jonge

Cell:

656014128

Email:

<mailto:dejongetiekie@gmail.com>

dejongetiekie@gmail.com

ID:

I would expect that to work as it is, but you could try modifying it to call out the newline explicitly and exclude it. Try the following:
(?<=From:)\s*(.*)(?<!\n)

1 Like