Zapier Integration

Zapier allows you to automate workflows using Sharetribe events without writing code. This is optional and does not affect the core Sharetribe - Twinr connection.

When Should You Use Zapier?

Use Zapier when you want to send push notifications to your Twinr mobile app users based on events occurring in your Sharetribe marketplace, such as listing or transaction activities.


πŸ“Œ Important Notes

  • Each push notification must be triggered from one Zap

  • You must create two separate Zaps:

    • Zap 1: Listing Events

    • Zap 2: Transaction Events

  • Each Zap must send data to Twinr’s Push Notification Webhook Endpoint

  • Both Zaps work independently and must be published separately

Prerequisites (Must Be Completed First)

1. Connect Sharetribe Plugin in Twinr

  1. Open Twinr Builder

  2. Go to Plugins β†’ Sharetribe

  3. Enter Client ID and Client Secret

  4. Save and verify the connection


2. Enable Firebase in Twinr

  1. Open Twinr Builder

  2. Enable Firebase for your app

  3. This is required to deliver push notifications to mobile devices


3. Enable Login & Add Login Script (Mandatory)

Push notifications will not work without this step.

  1. Go to Twinr Builder β†’ Screens β†’ Login

  2. Enable Login

  3. Add the Login Script

  4. Save changes

This allows Twinr to:

  • Capture the user’s device token

  • Map Sharetribe users to mobile devices

πŸ“˜ Refer to the Login Help Doc for detailed login setup instructions.

4. Get Twinr Push Notification Webhook Endpoint

  • Twinr will provide you with a Webhook Endpoint

  • This endpoint is used in Zapier to send push notifications


Step-by-Step: Create Zap for Listing Events (Optional)

Create this Zap only if you want push notifications for listing-related events.


Step 1: Create a New Zap

  1. Log in to Zapier

  2. Click Create Zap

Step 2: Select Sharetribe as Trigger App

  1. Choose Sharetribe

  2. Click Continue

  3. Connect your Sharetribe account

  4. Select the correct marketplace

Step 3: Choose Trigger Event (Listing Events)

  1. Select Listing Events

  2. Click Continue

  3. Choose an Event Type, such as:

    • Listing created

    • Listing updated

    • Listing deleted

    • Listing published

  4. Test the trigger and continue

  1. Select Account

  2. Enter Client ID and Client Secret (Available in Sharetribe Application)

Step 4: (Optional) Format Date/Time

  1. Click "Action" or "+"

  2. Add Formatter by Zapier

  1. Select Date / Time

  2. Go to Configure

  3. Format the timestamp if required

  4. Continue

Step 5: Send Push Notification to Twinr

  1. Add Webhooks by Zapier

  1. Choose any HTTP method:

  • POST

  • GET

  • PUT

  • Custom Request

  1. Click "Continue"

  2. Click Method and Select POST

  3. Enter the Twinr Push Notification Webhook Endpoint in URL field

  1. Map required fields (listing data + app_id)

OR

  1. Enter API Request body in the Data field if you choose "Custom Request"

  2. Make Data Pass -Through? - False

  3. Click Continue

  4. Test the request

Step 6: Publish Zap

  • Click Publish

  • Your Listing Events push notification is now live


Step-by-Step: Create Zap for Transaction Events (Optional)

Create this Zap only if you want push notifications for transaction-related events.

Step 1: Create a New Zap

  1. Click Create Zap

Step 2: Select Sharetribe as Trigger App

  1. Choose Sharetribe

  2. Select Transaction Events

  1. Connect your Sharetribe account

  2. Click Continue

  3. Choose any Event Type

  1. Test the trigger

Step 3: (Optional) Run JavaScript Logic

This step identifies who should receive the notification.

  1. Add a new step β†’ Code by Zapier

  2. Choose Run Javascript

Input Data

Field Name
Value

customerId

Transaction β†’ Customer β†’ ID

providerId

Transaction β†’ Provider β†’ ID

Code Snippet

πŸ”Ή In Sharetribe, the customer always initiates the transaction, so the provider is the opposite user.

Step 4: Fetch User Details (Optional)

  1. Add action β†’ Sharetribe

  2. Choose Show User

  3. Map User ID β†’ notifyUserId (from Code step)

  4. Test the step

πŸ”Ή This step fetches user details required for sending notifications.


  1. Add Filter by Zapier

  2. Allow Zap to continue only if app_id exists

  3. This ensures notifications are sent only to valid Twinr users

Step 6: Send Push Notification to Twinr

  1. Add Webhooks by Zapier

  2. Choose POST / GET / PUT / Custom Request

  3. Enter the Twinr Webhook Endpoint

  1. Map transaction data

  2. Test successfully

Step 7: Publish Zap

  • Click Publish

  • Transaction event notifications are now enabled


Final Notes

  • Listing and Transaction Zaps are optional

  • Each Zap triggers one push notification

  • Only published Zaps will work

  • Login Script & Firebase are mandatory

Last updated