Named Variables#

There are times when we have a single field in a trigger that contains info you want split out into multiple fields, or maybe you only want part of that field to come through to the action. We use a special function called named variables to help make this possible.

Note: For named variables to work you MUST have control over the data in your trigger. If your trigger data is an email that was automatically generated and you can't change the formatting, named variables won't be able to help you.

Let's see an example of named variables in action. Let's say I create a new note in Evernote, but I want to use data from that note to populate different fields in a Salesforce lead. In the body of my note I'll put the data I want a variable for in parentheses like this:

Evernote Note

Now when I check the available fields to use in the action of my zap, I can see the Named Variable fields available to choose from:

Zap fields

I'll select those fields just like I would with any other standard field from Evernote. And when I send my test note to Salesforce, here's the end result:

Salesforce Lead

You can use this for any field you like, just make sure that you can add in the names and parentheses for your trigger data and you don't mind that the trigger service has the names and parentheses formatted that way. Also, make sure the named variable only has letters, numbers, or underscores. For example, id() will work as a named variable, id#() will not.

Tip: Remember, to be able to find the Named Variable fields when setting up the action of your Zap, we'll need to have seen a sample of them first. So make sure you submit a trigger with those in it before checking the action of your Zap. For example, if you are using these in an email, send in a new email with your named variable fields first.

↑ Was this documentation useful? Yes No (Suggest Edits)

Modifying Dates & Times#

There's times when you'll want to manipulate dates and times in your Zap, and we provide a couple different means for you to do so.

Timestamps#

If you want to include the time your Zap runs in your Zap (or use that as an approximation of when the trigger occurs), you can use the following field in your Zap:

{{zap_meta_human_now}}

When used in a date-formatted field, that placeholder will return a date/time stamp from the timezone set in your Zapier profile settings. If you have no timezone picked, it defaults to UTC. This will print a human-readable string in MM/DD/YY hh:mmA format (for example, 07/15/16 06:05PM).

If you need a machine readable string, such as for sending to a Google Calendar create event action, you should use:

{{zap_meta_utc_iso}}

This command is similar to the first, but it will print the date/time in a format that other machines (and APIs) can read. This command won't consider the time zone set in your profile settings, and will output an ISO-8601 timestamp in UTC time (for example, 2016-07-15T18:07:48+00:00).

NOTE: When you use this timestamp, it will not show up in the sample data nor when you check the testing step in your Zap. It's only after your Zap actually takes an action in the background that the timestamp will be replaced.

Adjusting Dates and Times#

Other times you may have a date or time that you want to adjust for your purposes. For example, your trigger service gives you a meeting start time, but you want to be able to include an end time 3 hours afterwards. To do this, you'll use the following syntax right after the date/time field you want to adjust.

IMPORTANT: You need a space between the placeholder and the adjustment, or it will not work.
Datetime modifier with space Datetime modifier without space

Reformatting Dates and Times#

If you need to reformat a date, perhaps to change an American date format to International format, want to remove the time or date from a value, or want to add or subtract dates with more options, add a Formatter action to your Zap. It can reformat the date or time to the format you want before adding it to your action app.

For more info on Formatter, see:

Recurring Actions#

To schedule recurring actions, you may want to try using a Schedule trigger or a Google Calendar "Event Start" trigger. For more info on that, see:

Modifier Options#

  • +7h - 7 hours after the date/time in the field.
  • +10d - 10 days after the date/time in the field.
  • -45m - 45 minutes before the date/time in the field.

You can mix and match those as well. Remember you need to put a space between these!

  • +5h +30m - 5 hours and 30 minutes after the date/time in the field
  • -2d -12h - 2 days and 12 hours before the date/time in the field.

Human Readable Dates/Times#

We also are able to parse a range of "human readable" transformations like "tomorrow", "today", or "three weeks from now". See this list for more ideas about what is possible.

A few things to be mindful of when using modifiers:

  • They only work if you are inserting the time into a date/time field. Date/time fields have icons next to the name.
  • They will not be reflected in the UI inside the Zap editor -- they are performed before writing any Task to the Action of a Zap.
  • You cannot use decimals like 0.5h. Write it as 30m instead.

Example#

In the interface for a Zap that copies a Google Calendar Event from one calendar to another, you might have a field that looks like:

Detailed event time fixing.

↑ Was this documentation useful? Yes No (Suggest Edits)

Avoiding Zap Loops#

Some users will want to use Zapier in order to keep two services up to date on the same object, and you might want to use two Zaps that do the same thing in opposite directions to do so. When you do this, you'll want to take steps to avoid a "loop" of duplicate objects when those Zaps are triggered.

Note: this will not enable syncing or updating two records across services, it simply keeps Zapier from performing a non-stop loop between two services.

Let's take the example that I want to sync Salesforce contacts to Google Contacts, and vice versa. If I have one Zap that moves contacts from Salesforce to Google, and another that does the opposite, that means that each time I create a Salesforce contact, it will trigger my first Zap, whose action triggers my second Zap, whose action triggers my first Zap, etc. That can lead to dozens of duplicate contacts if the service doesn't have de-duplication measures through the API.

To fix this, I use filters and make use of fields that I otherwise wouldn't use. I take a look at the available Salesforce trigger fields, and decide that the "Reports To Name" field is one I don't really use.

Salesforce fields

I then create a filter for my Salesforce to Google Zap, telling it to run only when the Reports To field has "#sf" inside. The exact text used isn't important, but this makes it easier for me to remember.

Salesforce filter

Then whenever I create a Salesforce contact, I remember to put in that bit of text in the Reports To field. Now I know that contact will trigger the Zap, and any that come across from Google will not.

Salesforce contact

To completely "close the loop", I do the same thing with my other Zap. I determine the Website field isn't one that I use, so I set up a filter to only run the Zap when that field contains "#ggl". Now when I create Google Contacts, I use that bit of text in that field and can be assured that my Zaps aren't going to duplicate the contact over and over again.

This process can be used for any Zap where the trigger and action are mirrors of each other. The important things to do are:

  • Find fields in both trigger services that you don't use
  • Set up filters for text in those fields
  • Use that text when creating new objects for that trigger

If you follow those steps, you'll never have to worry about a "loop" from those Zaps again.

↑ Was this documentation useful? Yes No (Suggest Edits)

Disable SSL Certificate Checks#

Before you make any changes or contact Zapier support, use the SSL checker to verify your SSL certificates are installed properly!

What are SSL Certificates?#

SSL certificates are a very important part of the internet. These certificates allow encrypted communication between your browser and https://zapier.com. They also allow your browser to guarantee you're actually looking at the webpage we intended. Both of these details prevent would-be attackers from snooping on your private browsing or business data.

SSL certificates are also widely used when dealing with APIs. The same technology that lets your computer's browser talk securely to https://zapier.com also allows Zapier to talk securely to other web services (like Gmail, Salesforce, or Zendesk) in order to access your data on your behalf.

In order for SSL certificates to work, both parties (ie. your browser and https://zapier.com) must "trust" an independent third-party, known as a Certificate Authority (CA), who signs every SSL certificate they issue.

There are hundreds of CAs on the internet. In fact, for SSL to work properly, the list of CAs both parties "trust" must be continually updated -- an onerous detail.

You can find a list of the CAs we trust here.

How does Zapier use SSL Certificates?#

Zapier does checks against SSL certificates on every API call we make to ensure the data we send/receive is secure. Usually, the services we communicate with are responsible for setting up and managing the certificates, so users don't have to think about this part of the process.

Some services, however, allow you to specify your own domain (like Desk, JIRA, SugarCRM, Magento). In most cases, it's required that your domain also have its own SSL certificate for API communication to take place. More importantly, Zapier has to trust the CA that signed your SSL certificate!

It's possible that you'll purchase an SSL certificate that is issued by a CA that Zapier doesn't trust. This does not mean anything is wrong with that CA, we simply haven't added them to our list of trusted ones yet.

When Zapier encounters a certificate from an "untrusted" CA, you might see this type of error:

SSL Error on Zapier

In order to get around this verification step, click the "Advanced Settings" option in your user profile settings that allows you to disable SSL certificate checks. Essentially, this means both parties (your server and Zapier) don't have to trust the CA in order for communication to take place. You'll still need a signed SSL certificate, but we won't enforce that it is valid.

Disable SSL Certificate Checks on Zapier

WARNING: You should only do this as a last resort. Disabling these checks may enable an attacker to manipulate the data sent to Zapier or eavesdrop on data sent out of Zapier to websites with said SSL certificates. If you disable checks and adding an account still yields an SSL error, we highly recommend you revert the option back to enabled then contact support and we can debug further.

NOTE: We are respecting this "disable" option on a case by case basis for services. If you come across a service where you're still hitting SSL errors even after disabling the check, let us know. Currently, this option only affects:

  • Desk
  • Jira
  • Quickbooks
  • Redmine
  • RSS
  • SugarCRM
  • Webhooks

NOTE: An "SSL" error doesn't necessarily imply a certificate problem. For example: "SSLERROR: The read operation timed out" is actually not a certificate problem. This error simply indicates the remote server didn't respond to our requests in a timely manner.

↑ Was this documentation useful? Yes No (Suggest Edits)

Using Custom Values in Dropdowns#

In some cases, you find yourself needing to provide the value dynamically from your Trigger service rather than selecting one of the provided options. This can be accomplished by setting a custom value.

To start, open the list of options and choose "Use a Custom Value". It usually appears at the bottom of the list.

Select custom value option

The dropdown will turn into a text box, where you can type anything you want.

Typing a custom value

You can also use data from your Trigger. You'll choose the same 'Use a Custom Value' option:

Trigger Data Options

Things to Remember#

Name Fields#

If there is a drop down, the Action app will only accept the options available in that dropdown. So in the following label drop down, if I tried to send along "white" the Zap would fail as that is not one of the named options:

Trello Label drop down

ID Fields#

Some fields also will only accept an ID. You can see these as they will have a gray ID number next to each drop down item like this:

Pipedroive stage drop down

When you see this, the action app will only accept the data in gray to set your field. For example, if I wanted to set the "Idea (Pipeline)" stage, I would have to send on the number 6 in the custom field. If I sent the words "Idea (Pipeline)" the task would error.

What to do when values across two apps don't match#

In the scenarios where you need to send an ID to an action app which will not be available in the trigger app, you can use the Formatter app to create a Lookup Table which will translate the data from one app into the data the other app needs. A tutorial of how to do this can be found here.

When can't I use a custom value in a drop down?#

On occasion this won't be possible if we need to pull in fields associated with the drop down. For example, you cannot choose a custom value for a Sheet on a Google Sheets Action, since we pull in the column titles linked to a sheet from that option.

↑ Was this documentation useful? Yes No (Suggest Edits)

Field Types#

When you are setting up your Action's template you'll notice that some fields have icon's next to them. That's because certain field types are looking for certain formats of data. In this guide we'll cover those field types so you can make sure you're sending on the right kind of data and avoid running into errors.

Icons#

Found an Icon and not sure what it means? Select your icon's title below to find out more.


Datetime fields

Number Fields

True/False (Boolean) fields

File fields

Decimal fields

Field descriptions#

Find descriptions for each field type below.

Datetimes#


Datetime fields are only looking for a date to be sent on. They can also be fairly complicated, but we do our best to interpret any date or time you throw at us! For example, all of the below are supported:

  • tomorrow at noon
  • next friday at 7pm
  • 2/13/2014 8pm
  • 2014-02-26T16:56 (standard ISO format)
  • 1393462573 (a unix timestamp)

You can also modify your dates with dynamic modifications. These are useful if you want to add or subtract time from your date field.

It’s important to note that the datetime examples above will only work if the field on the action side contains the calendar and clock icon like this:

datetime icons

Numbers or Integers#


Numbers are very common in the world of Zapier and we do our best to convert information we receive into a clean number. For example, something like 2 burritos will be turned into 2.

numberfields

Often with these fields you'll see a dropdown with apparently "non-number" options in them (such as name or email), but don't be fooled! Lots of apps have ID’s that identify related objects, and you'll need to remember to select an item or send on the correct number!

If you have a drop-down that’s expecting a contact ID of sorts and you want to use a field from the trigger to make the selection more dynamic, you will need to choose a field with an ID next to it. You can read more about those here.

nameids

namenames

True/False - Boolean - Using Checkboxes#


We do our best to turn normal words into their proper true or false representations. For example, "yes" is "true", as is "1" or any string at all! "no" is "false", as is "0" or "f" among others. You will need to look in your Zap to see how those fields are being represented based on the app you're using. If you click on the "Insert Fields" button, you'll be able to locate the checkbox field and see how those values are being presented.

If you are looking to set up a condition where certain action are taken based on whether a checkbox is checked or not, you will need to setup 2 Zaps with custom filters in each one. One Zap would have filter for true value and the other Zap would have a filter for the false value. These values can change depending on how the app sends over those checkbox values.

JFF

Here are some examples showing how Jotform sends over those values.

Files#


When we reference files on Zapier, we mean the actual file object, and not a text field describing the file. For example, a file would be a photo itself, a field describing that file might be the Name, or the URL for that photo. If you put a string of text in a file field, we'll convert it to a .txt file for you. If you give us a URL, we'll inspect the URL and try to load in the data there and name it properly. And, if the item is a file from the trigger side, we'll bring it along.

Note: inserting multiple file fields into a single file field is unsupported.

Quick reference: - File: passes file to action app - URL: passes data from URL in the form of a single file to action app - Text: creates a .txt file containing the field contents and uploads to action app*

Decimals or Floats#

Decimals are pretty common and contrary to popular belief, they are not currency specific! They are very similar to numbers/integers except we'll allow a decimal here or add it if it is missing.

Arrays#

An array is a list of data. For example, invoicing apps that have "line items" will often send and receive this data as an array. Arrays pop up in a lot of situations, for example: line items, checklists, addresses, etc.

We only have really limited support for arrays right now, so only certain apps and certain triggers and actions have this functionality.

You can see which fields on an action support line items as they are intended in a box like this:

You are welcome to insert single values in here (for example, no line item in the trigger and array support only on the action), but when given a trigger that provides arrays we will automatically create as many items as needed (for example, array support in both the trigger and action).

This means to send and receive data as an array, you'll need to make sure both the trigger and action both support this.

This will be clarified on the actual trigger and action when you are setting up the Zap like this: with line item support

Arrays are mostly automatic, you just insert what you want to map to this field and we'll figure out the rest for you. If you have a different or specific use case for this, please get in touch and we'll be happy to advise further.

↑ Was this documentation useful? Yes No (Suggest Edits)

How to Get Started with Delay on Zapier#

To get started with Delay, first, search for and select the Delay app:

selecting delay

Then, select the trigger that best fits your workflow:

delay options

Delay Until#

The "Delay Until" allows you to delay performing the next action until a particular date/time. You can set this up in one of two ways.

  1. You can type in a static date and time to tell your Zap exactly when to send along your trigger data to the action.

delay for static

  1. You can use a date field from your trigger app to tell the Zap when to delay the action until. Datetime modifiers will work in this field as well.

trigger fields to modify

Note that the maximum we can hold a task is for 1 month. If the date passed into the Delay Until field is greater than 1 month from when the zap triggered, it will error out.

Delay For#

If you're looking to delay sending data from your trigger to your action using a defined timeframe, you can do that using the "Delay For" trigger. Simply select the value and unit of time from the drop-down to set this up.

delay for details

Once you've filled out those fields, you can continue to setup the action and then test it out to make sure everything is working as you expected. If all looks good, we'll let you know and turn on your Zap.

Zap on

Note that the maximum we can hold a task is for 1 month, so you won't be able to set the Delay For trigger for longer than 4 weeks.

↑ Was this documentation useful? Yes No (Suggest Edits)
Get Help