All Collections
Scheduling pipeline exports
Scheduling pipeline exports

Utilize Zapier to schedule exports of data within a pipeline to a Google Sheet on a regular cadence

Caitlyn Grundy avatar
Written by Caitlyn Grundy
Updated over a week ago

If you have not used Zapier before, please sign up for an account and connect your Streak account to it. 

By default, all system fields (Name, Stage, Assigned To, Notes) and custom fields will be exported by this process. Magic column data will not be exported. The Exporting magic columns section at the end of this document will go into more detail about that.

Creating your Zap

Get a quick start with a Zapier template here.

  1. Create a zap and select Schedule from the Built-In Apps section

  2. Select the cadence you’d like the export to occur at

  3. Create an Action step to your Zap and select Code from the Built-In Apps section

  4. From the two options, select Run Python.

This will present you with a new screen asking for Input Data. This needs to include the following variables (on the left side):

  1. apiKey (more info)

  2. pipelineKey (navigate to the pipeline you intend to export from and take the string beginning with “agxz” from the URL in your address bar)

  3. spreadsheetID (navigate to the Sheet you intend to export to and take the string between /d/ and /edit from the URL in your address bar)

In the section beneath it titled Code, paste the following snippet:

import requests

Streak = requests.Session()

Streak.auth = (input_data['apiKey'],'')

settings = {
   "exportBoxes": True,
   "exportContacts": False,
   "exportOrganizations": False,
   "pipelineKey": input_data.get('pipelineKey',''),
   "spreadsheetId": input_data.get('spreadsheetID','')

export ="" + input_data['pipelineKey'] + "/exportjobs", json=settings)

output = export.json()

This code can be customized very easily. 

Exporting Contacts and Organizations (exportContacts and exportOrganizations) can be switched from False to True if you’re looking to also export them. Just be sure to keep the capitalization or Zapier will be unable to interpret the code.

When you’re done, click Continue and Send Test To Code by Zapier. After completion, your spreadsheet will have a programmatic export from that exact moment. 

Click Finish, give your Zap a name, and turn it On

Exporting magic columns

If you want to export magic columns, you will need to manually and explicitly include all (custom + magic) of the columns you want to export in a way our server understands.

This can be more challenging, so if you’re having trouble, please contact us and we’ll be happy to help.

Below, you’ll find an example that includes Name, Stage, Assigned To, and Notes. Underneath “Notes” there is:

  • A custom column (type is “FIELD” and a “fieldKey” is specified) named “Title”

  • A magic column (type is “PROPERTY” and “propertyName” is specified)

Below is an example of what the code would look like if you were to include magic columns in this export. Something to keep in mind if you want to the export to pull all your custom columns AND your magic columns, you’ll need to find and enter any of the custom columns in your pipeline, into the code below, in the following format.

You’ll need to get the fieldKeys that live in our database in order to insert them into the code below.


Once you have all your custom columns defined and fieldKeys coded like in the above example, the rest of the code below is what you’d paste into the ‘code by Zapier’ box in Step 2 of your Zap. You paste this part after:

"spreadsheetId": input_data.get('spreadsheetID','') 

So the code should look like this. Again in this example. I'm exporting the following columns: Name, Stage, the Assigned to, Notes, and Title.

settings["columnsToExport"] = [

{"headerTranslatedName":"Assigned To","type":"PROPERTY","propertyName":"assignedToSharingEntries"},


The below snippet contains all of our magic columns. You would add these inside the above code for any magic column data you want exported.

    {"headerTranslatedName":"Date Created","type":"PROPERTY","propertyName":"creationTimestamp"},

    {"headerTranslatedName":"Last Updated","type":"PROPERTY","propertyName":"lastUpdatedTimestamp"},

    {"headerTranslatedName":"Last stage change","type":"PROPERTY","propertyName":"lastStageChangeTimestamp"},

    {"headerTranslatedName":"Last email","type":"PROPERTY","propertyName":"lastEmailUpdatedTimestamp"},

    {"headerTranslatedName":"Last email from","type":"PROPERTY","propertyName":"lastEmailFrom"},

    {"headerTranslatedName":"First email from","type":"PROPERTY","propertyName":"firstEmailFrom"},

    {"headerTranslatedName":"Message count","type":"PROPERTY","propertyName":"totalNumberOfEmails"},

    {"headerTranslatedName":"Sent email count","type":"PROPERTY","propertyName":"totalNumberOfSentEmails"},

    {"headerTranslatedName":"Received email count","type":"PROPERTY","propertyName":"totalNumberOfReceivedEmails"},

    {"headerTranslatedName":"First email","type":"PROPERTY","propertyName":"firstEmailTimestamp"},

    {"headerTranslatedName":"First email sent","type":"PROPERTY","propertyName":"firstEmailSentTimestamp"},

    {"headerTranslatedName":"First email received","type":"PROPERTY","propertyName":"firstEmailReceivedTimestamp"},

    {"headerTranslatedName":"Last email sent","type":"PROPERTY","propertyName":"lastEmailSentTimestamp"},

    {"headerTranslatedName":"Last email received","type":"PROPERTY","propertyName":"lastEmailReceivedTimestamp"},

    {"headerTranslatedName":"Completed Task Count","type":"PROPERTY","propertyName":"taskCompleteCount"},

    {"headerTranslatedName":"Incomplete Task Count","type":"PROPERTY","propertyName":"taskIncompleteCount"},

    {"headerTranslatedName":"Overdue Task Count","type":"PROPERTY","propertyName":"taskOverdueCount"},

    {"headerTranslatedName":"Next task due","type":"PROPERTY","propertyName":"soonestTaskDueDate"},

    {"headerTranslatedName":"Most overdue task","type":"PROPERTY","propertyName":"earliestOverdueTaskDueDate"},

    {"headerTranslatedName":"Percent completed","type":"PROPERTY","propertyName":"taskPercentageComplete"},

    {"headerTranslatedName":"Task Count","type":"PROPERTY","propertyName":"taskTotal"},

    {"headerTranslatedName":"Call Log Count","type":"PROPERTY","propertyName":"callLogCount"},

    {"headerTranslatedName":"Meeting Count","type":"PROPERTY","propertyName":"meetingNotesCount"},

    {"headerTranslatedName":"Last call log","type":"PROPERTY","propertyName":"mostRecentCallLogTimestamp"},

    {"headerTranslatedName":"Last meeting","type":"PROPERTY","propertyName":"mostRecentMeetingNotesTimestamp"},

    {"headerTranslatedName":"First call log","type":"PROPERTY","propertyName":"firstCallLogTimestamp"},

    {"headerTranslatedName":"First meeting","type":"PROPERTY","propertyName":"firstMeetingNotesTimestamp"},

    {"headerTranslatedName":"Total Call Log Duration","type":"PROPERTY","propertyName":"totalCallLogDuration"},

    {"headerTranslatedName":"Total Meeting Duration","type":"PROPERTY","propertyName":"totalMeetingNotesDuration"},

    {"headerTranslatedName":"Last Interaction Type","type":"PROPERTY","propertyName":"lastTouchpointType"},

    {"headerTranslatedName":"Last Interaction Time","type":"PROPERTY","propertyName":"lastTouchpointTimestamp"},

    {"headerTranslatedName":"Follwer Count","type":"PROPERTY","propertyName":"followerCount"},

    {"headerTranslatedName":"Comment Count","type":"PROPERTY","propertyName":"commentCount"},

    {"headerTranslatedName":"Thread Count","type":"PROPERTY","propertyName":"gmailThreadCount"},

    {"headerTranslatedName":"File Count","type":"PROPERTY","propertyName":"fileCount"},


Did this answer your question?