What Firebase Triggers and Actions are Supported?#

Supported Triggers#

  • None yet!

Supported Actions#

  • Create Child Record - Add a new record to Firebase using the push() API (https://www.firebase.com/docs/javascript/firebase/push.html)
  • Update/Set record by ID - Calls update() on the path provided. Will create the record if it does not already exist or update it if it does.
  • Delete record by ID - Remove a record from Firebase

How to Get Started with Firebase#

To get started with Firebase on Zapier, first you will need to click to connect your Firebase account to use with your Zap

select account

Next, you'll be asked to enter your Instance and Secret. The instance is the first part of your Firebase URL. For example, if my Firebase URL is https://kato.firebaseio.com, then the instance is kato.

config account

To find your Secret, please follow these steps:

  1. Click the Gear Icon in the top right and choose "Project Settings"
  2. Choose the "Database" tab.
  3. Add your secret and click "show" to reveal it.

If you have entered your details correctly, you will be successfully connected.

Customizing Fields to Store#

Normally, Firebase will store all the fields from the incoming trigger data. If you want to modify which fields get stored, you can select a list by using the icon in the corner:

fields to store

If you want to alter the field names (for example, due to some invalid character errors), you can do this by putting the new name in the left box on the "fields" section and inserting the field on the right box like this

custom field names

You can add more fields but using the + to add more field boxes.

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

Common Problems with Firebase#

Invalid data error (Couldn't parse JSON object)#

Sometimes you will see an error that says "Invalid data; couldn't parse JSON object, array, or value. Perhaps you're using invalid characters in your key names."

This error occurs when the fields you are trying to send to Firebase contain invalid characters. Firebase prohibits key names from containing:

  • . (period)
  • $ (dollar sign)
  • [ (left square bracket)
  • ] (right square bracket)
  • # (hash or pound sign)
  • / (forward slash)

To get around the error, you will need to manually assign names to the keys. See the Customizing Fields to Store section for details.

My Firebase Zap isn't triggering when I add new records#

New records need to appear at the end of your data for this to work. If you aren't using push IDs, your records need to be ordered lexicographically or by priority so that new records appear last.

A simple way to accomplish this is by calling setWithPriority and using Firebase.ServerValue.TIMESTAMP to order by timestamp.

Error: Empty key in "Path to data". Probably tried to use a field which was empty as part of the path#

Make sure you remove the beginning and ending / from the Path field.

For example, /customers/new/ becomes customers/new.

Database secrets are currently deprecated#

Firebase is moving to a new authentication system. We're planning on updating our app, but in the meantime the database credentials have become a little bit harder to find.

To find your database secret, follow these instructions:

  1. Click on the settings/cog wheel icon next to your project name at the top of the new Firebase Console
  2. Click Project settings
  3. Click on the Service Account tab
  4. Click on the Database Secrets link in the inner left-nav
  5. Hover over the non-displayed secret and click Show

I'm getting "Firebase paths/keys cannot contain the characters $ # . [ ]" but there are no invalid characters included in the path/keys#

Users sometimes encounter this error if anything that is being supplied in the value has a pipe ( | ) character in it. For example:

pipe in value

This has to due with the way our system encodes key/value pairs. The recommend solution is to not include invalid characters in the value that is included or use a Formatter step to remove the characters.

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

Popular Things To Do With Firebase#

Get Help