Skip to content

Build All PIE Connectors — Execution Plan

Backup copy of the active build plan. This file is the authoritative reference for connector build order, architecture decisions, and per-batch details.


Table of Contents


Architecture

Every connector is a single .pie file with three parts:

  1. YAML frontmatter — name, displayName, description, tier: connector, version, manifest (oauth, tool params, automation triggers, heartbeatEvents)
  2. JavaScript handlermodule.exports = { handler, onConnect } using context.oauth.fetch() for API calls
  3. Optional widget===widget=== ... ===widget=== fenced HTML/JS (skip for mass-creation; add later)

Reference implementations:

  • OAuth + tool pattern: plugins/slack.pie
  • OAuth + tool + widget pattern: plugins/hubspot-crm.pie
  • Webhook events pattern: plugins/github.pie
  • ScrapeCreators + monitors: plugins/mass-creation/linkedin-researcher.pie

All new files go under plugins/mass-creation/.


Connector Template Pattern

OAuth Connector Skeleton

yaml
---
name: service-name
displayName: Service Name
description: >-
  Service integration for [capabilities]. Connect via OAuth to get started.
  Write operations require explicit confirmation. No delete operations for safety.
tier: connector
version: 1.0.0
manifest:
  trigger: auto
  oauth:
    provider: custom
    providerName: Service Name
    authorizationUrl: https://...
    tokenUrl: https://...
    scopes: [...]
    clientIdSecret: SERVICE_CLIENT_ID
    clientSecretSecret: SERVICE_CLIENT_SECRET
  developerSecrets:
    SERVICE_CLIENT_ID:
      description: OAuth Client ID
      required: true
    SERVICE_CLIENT_SECRET:
      description: OAuth Client Secret
      required: true
  tool:
    name: service_name
    description: >
      [Action catalog and usage notes]
    parameters:
      type: object
      properties:
        action:
          type: string
          enum: [list of actions]
          description: The action to perform.
      required: [action]
  automation:
    triggers:
      - type: webhook
        eventTypeField: event_type
        events:
          - name: event_name
            description: Description
    allowManualRun: true
    timeout: 120
  heartbeatEvents:
    events:
      - id: event_id
        displayName: Event Name
        matchers:
          - source: tool
            action: action_name
---

ScrapeCreators Connector Skeleton

yaml
---
name: platform-researcher
displayName: Platform Researcher
description: >-
  Research tool powered by ScrapeCreators. [capabilities].
  Costs 1 credit per API call.
tier: tool
version: 1.0.0
manifest:
  trigger: auto
  developerSecrets:
    SCRAPECREATORS_API_KEY:
      description: ScrapeCreators API key (from app.scrapecreators.com). Shared developer key.
      required: true
  automation:
    triggers:
      - type: cron
        default: '*/15 * * * *'
        description: Check monitored targets for new content
    allowManualRun: true
    timeout: 120
  database:
    tables:
      platform_monitors:
        columns:
          id: "uuid primary key default gen_random_uuid()"
          pie_user_id: "text not null default current_setting('app.user_id', true)"
          monitor_type: "text not null"
          target: "text not null"
          label: "text"
          enabled: "boolean not null default true"
          interval_minutes: "integer not null default 60"
          last_checked_at: "timestamptz"
          next_check_at: "timestamptz"
          created_at: "timestamptz default now()"
        rls: "pie_user_id"
      platform_seen_items:
        columns:
          id: "uuid primary key default gen_random_uuid()"
          pie_user_id: "text not null default current_setting('app.user_id', true)"
          monitor_id: "uuid not null references platform_monitors(id) on delete cascade"
          item_id: "text not null"
          detected_at: "timestamptz not null default now()"
        rls: "pie_user_id"
  tool:
    name: platform_researcher
    description: >
      [Tool description with action catalog]
    parameters:
      type: object
      properties:
        action:
          type: string
          enum: [research actions + create_monitor, list_monitors, pause_monitor, resume_monitor, delete_monitor]
      required: [action]
  heartbeatEvents:
    events:
      - id: new_item_detected
        displayName: New Item Detected
        matchers:
          - source: tool
            action: _poll_check
---

Updated Batch List

BatchConnectorsCountAuth TypeNotes
1Google Suite (Sheets, Drive, Docs, Tasks, Meet, Analytics, Ads, Classroom)8provider: googleShared OAuth app, different scopes per connector
2Microsoft (Outlook, Teams, OneDrive)3Custom OAuth (Azure AD)All use Graph API base URL
3Atlassian (Jira, Confluence, Bitbucket)3Custom OAuth (3LO)Shared Atlassian developer app
4CRM (Salesforce, Pipedrive, Attio)3Custom OAuth eachSimilar CRUD-on-entities pattern
5PM (Linear, ClickUp, Monday, Basecamp)4Custom OAuth eachTask/issue CRUD pattern
6Data (Airtable, Supabase, Coda)3Mix OAuth + API keyRecord CRUD pattern
7Communication (Discord, Intercom, Gong)3Bot tokens + OAuthMessaging platforms
8Scheduling/Support (Calendly, Cal.com, Zendesk, Freshdesk, Gorgias)5Mix OAuth + API keyBooking and helpdesk
9E-commerce/Finance (Shopify, Stripe, QuickBooks)3OAuth, webhook-heavyPayment and commerce
10Marketing (Mailchimp, SendGrid, Brevo, ActiveCampaign)4API key basedEmail marketing
11Social Media (LinkedIn Researcher, Pinterest Researcher)2ScrapeCreators dev keyRead-only, polling monitors
12DevOps (GitLab, Twilio, Telegram)3MixVarious auth methods
13Design (Figma, Canva, Miro)3OAuthDesign tool APIs
14HR (BambooHR, Lever)2Mix API key + OAuthAhrefs removed (already exists)

Grand total: 49 new connectors

Already existing (DO NOT rebuild)

These 63 plugins already exist in plugins/ and must not be duplicated:

  • ahrefs-seo.pie (was in original Batch 14 — removed)
  • slack.pie, github.pie, notion.pie, gmail-assistant.pie, google-calendar.pie
  • hubspot-crm.pie, close-crm.pie, x-twitter.pie, meta-ads.pie
  • asana.pie, trello.pie, spotify.pie, dropbox.pie, digitalocean.pie
  • instagram-researcher.pie, youtube-researcher.pie, reddit-researcher.pie, tiktok-researcher.pie
  • linkedin-engagement.pie, facebook-marketplace-watcher.pie, facebook-ad-library-research.pie
  • All other existing .pie files (63 total)

Social Media Strategy (ScrapeCreators)

Existing plugins (DO NOT TOUCH)

These ScrapeCreators-based researchers already exist and function correctly:

  • plugins/instagram-researcher.pie — 11 actions
  • plugins/youtube-researcher.pie — 11 actions
  • plugins/reddit-researcher.pie — 7 actions
  • plugins/tiktok-researcher.pie — 24 actions

New plugins (Batch 11)

Two new ScrapeCreators plugins created under plugins/mass-creation/:

  1. linkedin-researcher.pie — 6 core research actions + 5 monitor actions:

    • Research: get_profile, get_company, get_company_posts, get_post, search_ads, get_ad
    • Monitor: create_monitor, list_monitors, pause_monitor, resume_monitor, delete_monitor
    • Polling cron for new_post_detected heartbeat
    • Database: linkedin_monitors, linkedin_seen_posts
  2. pinterest-researcher.pie — 4 core research actions + 5 monitor actions:

    • Research: search_pins, get_pin, get_user_boards, get_board
    • Monitor: create_monitor, list_monitors, pause_monitor, resume_monitor, delete_monitor
    • Polling cron for new_pin_detected heartbeat
    • Database: pinterest_monitors, pinterest_seen_pins

Auth pattern

All ScrapeCreators plugins use a single shared developer secret:

  • Secret: SCRAPECREATORS_API_KEY
  • Header: x-api-key: {key} on requests to https://api.scrapecreators.com
  • No OAuth, no user-side configuration needed

Heartbeat Events Strategy

1. Webhook-based (OAuth connectors with native webhooks)

Services like GitHub, Stripe, Shopify, Jira, Slack, GitLab have native webhook support:

  • Declare events in automation.triggers[type=webhook].events
  • These automatically become subscribable heartbeat events via buildPluginHeartbeatCatalog()
  • Setup requires registering the PIE webhook URL in the service's dashboard

2. Tool-action-based (all connectors)

Every write action should have a corresponding heartbeat event:

  • Matcher: { source: 'tool', action: 'create_issue' }
  • Common patterns: create_*, update_*, delete_*, send_*
  • Read actions can also have heartbeats (e.g., profile_researched, content_searched)

3. Polling-based (ScrapeCreators + services without webhooks)

For services that don't support webhooks:

  • Cron automation runs every 15 minutes
  • Compares current data with stored "seen" records in database
  • Emits heartbeat events like new_post_detected, new_pin_detected
  • Matcher: { source: 'tool', action: '_poll_check' }

Standard heartbeat event naming

CategoryHeartbeat events
Social / Researchprofile_researched, content_searched, new_post_detected, new_pin_detected, monitor_created
CRMdeal_created, contact_updated, deal_stage_changed, note_added
Project Managementissue_created, task_completed, sprint_started, comment_added
E-commerceorder_placed, product_updated, payment_received, refund_issued
Communicationmessage_sent, channel_created, reaction_added, dm_received
DevOpspush_received, pr_opened, pipeline_completed, issue_commented
Supportticket_created, ticket_resolved, customer_replied, agent_assigned
Marketingemail_sent, campaign_completed, contact_subscribed, email_bounced
Schedulingbooking_created, booking_cancelled, event_rescheduled
Designfile_updated, comment_added, board_modified
HRemployee_updated, timeoff_requested, candidate_stage_changed
Datarecord_created, record_updated, table_modified

Batch Details

Batch 1: Google Suite (8 connectors)

All use provider: google with different scopes. Shared Google Cloud OAuth app.

ConnectorAPICore actions
google-sheetsSheets API v4get_values, update_values, append_values, create_spreadsheet, list_sheets
google-driveDrive API v3list_files, upload_file, share_file, search_files, create_folder
google-docsDocs API v1create_document, get_document, update_document, insert_text
google-tasksTasks API v1list_task_lists, list_tasks, create_task, complete_task, update_task
google-meetMeet REST APIcreate_meeting, get_meeting, list_recordings
google-analyticsGA4 Data APIrun_report, get_realtime_report, list_properties
google-adsGoogle Ads APIlist_campaigns, get_campaign, list_ad_groups, get_report
google-classroomClassroom APIlist_courses, create_assignment, list_submissions, get_course

Batch 2: Microsoft Suite (3 connectors)

All use Microsoft Graph API. Shared Azure AD app.

ConnectorGraph resourceCore actions
outlook/me/messageslist_messages, send_email, create_draft, list_folders, search_messages
microsoft-teams/teams, /chatslist_channels, send_message, create_meeting, list_chats
onedrive/me/drivelist_files, upload_file, share_file, create_folder, search_files

Batch 3: Atlassian Suite (3 connectors)

Atlassian OAuth 2.0 (3LO). Shared developer app.

ConnectorAPICore actions
jiraJira REST API v3search_issues, create_issue, update_issue, list_boards, get_sprint
confluenceConfluence REST API v2list_pages, create_page, update_page, search_content, list_spaces
bitbucketBitbucket REST APIlist_repos, list_pull_requests, create_pr, list_pipelines

Batch 4: CRM (3 connectors)

ConnectorAuthCore actions
salesforceOAuthquery_soql, create_record, update_record, list_leads, list_opportunities
pipedriveOAuthlist_deals, create_deal, list_persons, create_activity, list_pipelines
attioOAuthlist_records, create_record, list_lists, create_note, search_records

Batch 5: Project Management (4 connectors)

ConnectorAPI styleCore actions
linearGraphQLlist_issues, create_issue, update_issue, list_projects, list_cycles
clickupRESTlist_tasks, create_task, update_task, list_spaces, add_comment
mondayGraphQLlist_boards, list_items, create_item, update_item, add_update
basecampRESTlist_projects, list_todos, create_todo, list_messages, create_message

Batch 6: Data & Productivity (3 connectors)

ConnectorAuthCore actions
airtableOAuthlist_records, create_record, update_record, list_bases, list_tables
supabaseAPI keyquery_table, insert_row, update_row, list_tables, run_rpc
codaAPI keylist_docs, list_rows, insert_row, update_row, list_tables

Batch 7: Communication (3 connectors)

ConnectorAuthCore actions
discordOAuth + botsend_message, list_channels, list_guilds, add_reaction, create_channel
intercomOAuthlist_contacts, create_contact, list_conversations, reply_conversation
gongAPI keylist_calls, get_call, get_transcript, list_users

Batch 8: Scheduling & Support (5 connectors)

ConnectorAuthCore actions
calendlyOAuthlist_events, list_event_types, get_invitee, list_scheduled
cal-comAPI keylist_bookings, list_event_types, get_availability
zendeskOAuthlist_tickets, create_ticket, update_ticket, search_tickets, add_comment
freshdeskAPI keylist_tickets, create_ticket, update_ticket, list_contacts
gorgiasAPI keylist_tickets, create_ticket, list_customers, send_message

Batch 9: E-commerce & Finance (3 connectors)

ConnectorAuthCore actions
shopifyOAuthlist_products, create_product, list_orders, list_customers, get_order
stripeAPI keylist_customers, create_charge, list_subscriptions, list_invoices, create_invoice
quickbooksOAuthlist_invoices, create_invoice, list_customers, list_payments, get_report

Batch 10: Marketing & Email (4 connectors)

ConnectorAuthCore actions
mailchimpAPI keylist_campaigns, create_campaign, list_audiences, list_members, add_member
sendgridAPI keysend_email, list_contacts, create_campaign, list_campaigns
brevoAPI keysend_email, list_contacts, create_campaign, list_campaigns
activecampaignAPI keylist_contacts, create_contact, list_deals, create_deal, list_automations

Batch 11: Social Media (2 connectors)

See Social Media Strategy above.

Batch 12: DevOps & Messaging (3 connectors)

ConnectorAuthCore actions
gitlabOAuthlist_projects, list_merge_requests, create_issue, list_pipelines
twilioAPI keysend_sms, make_call, send_whatsapp, list_messages
telegramBot tokensend_message, send_photo, list_updates, get_chat

Batch 13: Design (3 connectors)

ConnectorAuthCore actions
figmaOAuthlist_files, get_file, list_comments, export_images, list_projects
canvaOAuthlist_designs, create_design, export_design, list_templates
miroOAuthlist_boards, list_items, create_sticky, create_frame, add_item

Batch 14: HR (2 connectors)

ConnectorAuthCore actions
bamboohrAPI keylist_employees, get_employee, list_timeoff, create_timeoff_request
leverOAuthlist_candidates, list_postings, get_candidate, list_stages

Per-Connector Checklist

For each .pie file:

  • [ ] YAML frontmatter with correct OAuth config (URLs, scopes from API docs)
  • [ ] Tool definition with full action enum and parameter schema
  • [ ] Webhook event declarations (where the service supports webhooks)
  • [ ] HeartbeatEvents for all write tool actions (create_*, send_*, update_*)
  • [ ] JS handler with: isConnected check, action switch, API helper, formatters, error handling
  • [ ] onConnect function with welcome message listing capabilities
  • [ ] Confirmation rule in tool description for write operations
  • [ ] At least one automation trigger (webhook or polling interval)
  • [ ] Error messages are actionable (not raw API errors)
  • [ ] Manifest passes schema validation

Setup Guide Reference

Full setup instructions for every connector (API keys, OAuth apps, webhook URLs, scopes) are in:

docs-site/docs/reference/connector-setup-guide.md

This includes:

  • ScrapeCreators shared setup (covers all social media plugins)
  • Per-service OAuth app creation steps
  • Webhook URL registration instructions
  • Verification/signing secret configuration
  • Heartbeat events reference

Built with VitePress