Push data from zapier into Glide table

Hi,

i currently have a solution whereby I parse & format data from an email, and push it into my glideapp’s google sheet. i think this is affecting my apps speed as this table is growing daily and the tab related to it loads very slowly.

my understanding is that a glide table will give me better performance, but for some reason i am not able to from zapier push data to a new row in a glide table - do you have any best practice suggestion on how best to do this in realtime?

thanks
ilse

Have you seen the documentation for using the Glide API? It includes a video that shows how to set this up with Zapier.

1 Like

Hi Jeff,

thanks, i have not yet worked through it as i assumed it works the same as pushing to a sheet. i will work through it thanks!

1 Like

Not directly related to your query, but if you know exactly what you want to parse and the input is a bit all over the place as it is with emails, I think OpenAI’s text-davinci-003 can help you get it very reliably.

Me and @eltintero were pushing Make error emails to our Slack a while ago but the formatting isn’t great at all and contains a lot of unnecessary information. Parsing info from that using regex isn’t easy at all, but using a prompt with OpenAI API, it made life much easier for us.

3 Likes

HI,

Thanks again for the share - for some reason i am getting stuck after following all the necessary steps - i think it might be related to my field mapping but for some reason i cannot seem to spot it. any chance anyone could have a look for me:

Here is my curl:

curl --request POST 'https://api.glideapp.io/api/function/mutateTables' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer MYPASSWORDISHERE' \
    --data-raw '{
    "appID": "BrQNyJ1cAwA5n33O75eY",
    "mutations": [
        {
            "kind": "add-row-to-table",
            "tableName": "native-table-PbjvEC7xpZOoBj2NxAna",
            "columnValues": {
                "Name": "Owner/CurrentUser",
                "Owner/ReferredToUser": "Owner/ReferredToUser",
                "Owner/ReferredFromUser": "Owner/ReferredFromUser",
                "Lead Status/Status": "Lead Status/Status",
                "Lead Status/WA Date": "Lead Status/WA Date",
                "Lead Status/Date Added": "Lead Status/Date Added",
                "Lead Status/ReferredToDate": "Lead Status/ReferredToDate",
                "Lead Status/DateArchived": "Lead Status/Date Archived",
                "Lead Status/Date Emailed": "Lead Status/Date Emailed",
                "Lead Details/": "Lead Details/Contact Person",
                "Lead Details/Lead Type": "Lead Details/Lead Type",
                "Lead Details/1a_propctrl imported mobile": "Lead Details/1a_propctrl imported mobile",
                "Lead Details/Email Address": "Lead Details/Email Address",
                "Lead Details/Province": "Lead Details/Province",
                "Lead Details/Lead Source": "Lead Details/Lead Source",
                "Lead Details/Source Description": "Lead Details/Source Description",
                "Lead Details/Branch": "Lead Details/Branch",
                "Lead Details/Page Url": "Lead Details/Page Url",
                "Lead Details/Residential Listing": "Lead Details/Residential Listing",
                "Imported Listing Type": "Imported Listing Type",
                "Comments": "Comments",
                "Area": "Area",
                "Property Address": "Property Address",
                "Property Type": "Property Type",
                "Price/Rental From": "Price/Rental From",
                "Is favorited?": "Is favorited?",
                "Current user email": "Lead Owner/Current user email",
                "Referral/CommissionExpected": "Referral/CommissionExpected"
            }
        }
    ]
}'

Here is my zap details i have configured:

  • Error:Status Code 400 Bad Request


And here is my table details:
“Name”: This is the Owner/CurrentUser field in GlideTable: Text
“Lead Status/Status”: Text field in glideTable
“Lead Status/Date Added”: date field in glideTable
“Lead Details/”: This is the Lead Details/Contact Person field in GlideTable:Text
“Lead Details/1a_propctrl imported mobile”: Phone number field in glideTable
“Lead Details/Email Address”:email field in glideTable
“Lead Details/Province”: Text field in glideTable
“Lead Details/Lead Source”: “Property 24”, Text field in glideTable
“Lead Details/Source Description”: “Contact Request”,Text field in glideTable
“Lead Details/Branch”: “Cornerstone Property Partners”, Text field in glideTable
“Lead Details/Page Url”: url field in glideTable
“Lead Details/Residential Listing”: Text field in glideTable
“Imported Listing Type”: Text field in glideTable
“Comments”: Text field in glideTable
“Area”:Text field in glideTable

If you’re getting a 400, then the most likely cause is malformed JSON.
Do any of your fields contain multi-line strings, double quotes or tabs?
Any of those would break it.

If that’s the case, you either need to escape them, or use a module that will construct the JSON payload for you. Make has a JSON module that does this, I’m not sure about Zapier.

1 Like

i have one multi-line string where i extract comments from the email template - i use the extract pattern function in zapier formatter. but the comments field will only sometimes be multi-line dependening on the user input… i wonder how i would handle that…

thanks alot Darren, i removed my comments field from my json and the api actually worked for the first time.

now i can just focus on figuring out how to get my comments field also posted…

If Zapier doesn’t have a native way of generating JSON, the other option would be to URLencode your comments field before sending it (presuming that Zapier can do that). Then you could decode that in Glide using the Decode Text Plugin.

Update: yeah, looks like Zapier can do URL encoding.

i managed to use the zapier formatter tool > Utilities and converted my multiline line item to a string… the api seem to have pushed it through.

1 Like

@Darren_Murphy , in hindsight… 90% worked with a few odd exceptions - after reading about the encoding/decoding that is the more failproof solution in my opinion - i have implemented and happy with the outcome.

thanks alot

2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.