Docs Home

Zapier Integrations

Learn more about zapier integrations in our help documentation.

Zapier Integration

Publish Posts via Zapier Using the Postly API

Connect Postly to thousands of apps using Zapier.
Use your Postly API Key to publish posts, upload media, sync content from CMS tools, or automate your recurring workflows.

This guide covers:

  1. Connecting Zapier → Postly using API Key
  2. Building Zap steps to publish a post
  3. Fetching Workspaces
  4. Fetching Social Accounts
  5. Uploading media
  6. Creating & scheduling posts
  7. Full Zap blueprint examples

1. Get Your API Key

Navigate to:

Dashboard → Automations → API → Generate API Key

Use this key in all Zapier Webhook/API calls:

X-API-KEY: your_api_key_here

2. Zapier Setup Overview

A typical Zap workflow looks like:

Trigger (new record / webhook / schedule)
        ↓
Format Data (Zapier Formatter)
        ↓
Fetch Workspaces (GET /workspaces)
        ↓
Fetch Social Accounts (GET /socials)
        ↓
Upload Media (POST /files)
        ↓
Create Post (POST /posts)
        ↓
Slack/Email Confirmation (optional)

3. Step 1 — Add a Trigger

Choose a trigger such as:

  • New Notion page
  • New Airtable record
  • New Shopify product
  • New RSS item
  • Zapier Schedule (daily / hourly)
  • Webhook trigger

This provides the caption, image URL, publish time, etc.


4. Step 2 — GET Workspaces

Webhooks by Zapier → Custom Request

Method: GET
URL: https://openapi.postly.ai/workspaces

Headers:

X-API-KEY: your_api_key_here

Example Response

{
  "code": "success",
  "data": [
    { "_id": "workspace_123", "name": "Main Workspace" }
  ]
}

5. Step 3 — GET Social Accounts

GET /socials

Method: GET
URL:

https://openapi.postly.ai/socials?workspaceId=workspace_123

Headers:

X-API-KEY: your_api_key_here

Example Output

[
  { "_id": "fb_1", "platform": "facebook", "name": "FB Page" },
  { "_id": "ig_1", "platform": "instagram", "name": "IG Page" }
]

6. Step 4 — Upload Media

If your trigger provides a URL, you're good.

If you need to upload a file (image/video):

Zapier File Upload Example

Method: POST
URL: https://openapi.postly.ai/files

Headers:

X-API-KEY: your_api_key_here

Body (Form-Data):

  • workspaceId: your workspace ID
  • file: choose “File” field from the trigger

Response:

{
  "url": "https://cloud.postly.ai/media/filename.jpg"
}

Use this returned URL when creating the post.


7. Step 5 — Create or Schedule Post

Endpoint: POST /posts

Method: POST
URL: https://openapi.postly.ai/posts

Headers:

Content-Type: application/json
X-API-KEY: your_api_key_here

JSON Body Example:

{
  "workspaceId": "workspace_123",
  "text": "New product launch! 🚀",
  "platforms": ["facebook", "instagram"],
  "media": [
    {
      "type": "image",
      "url": "https://cloud.postly.ai/media/file123.jpg"
    }
  ],
  "schedule": {
    "type": "scheduled",
    "datetime": "2025-01-25T14:30:00Z"
  }
}

Example Response

{
  "code": "success",
  "data": {
    "_id": "post_789",
    "status": "scheduled"
  }
}

8. Full Zapier Blueprint Examples

A) Auto-Post from Google Sheets → Postly

  1. Trigger: New Row in Google Sheets
  2. Formatter: Convert date/time to ISO format
  3. Upload media (optional)
  4. Create Post (POST /posts)
  5. Slack message → “Post created successfully”

B) Auto Publish Shopify Products → Postly

  1. Trigger: New Product Added
  2. Formatter: Build caption (price, category, tags)
  3. Upload product image
  4. Create Post on IG + FB
  5. Notify store team

C) Auto Publish RSS to Social Media

  1. Trigger: New RSS Item
  2. Build caption from title & description
  3. Create Post
  4. (Optional) Add hashtag logic using Formatter + Paths

9. Best Practices

  • Store API Key in Zapier Auth Headers
  • If using schedules, send datetime as:
2025-10-17T14:30:00Z
  • Upload media before creating the post
  • Ensure connected accounts exist inside Postly first
  • Use Zapier’s Paths for multi-platform logic