इसे छोड़कर कंटेंट पर जाएं

Connectors

अपने ऐप को Slack, Resend, और ElevenLabs जैसी third-party सेवाओं से जोड़ें। Credentials एन्क्रिप्टेड होते हैं और actions पहले से authenticated होते हैं।

Connectors की मदद से तुम code में raw API keys मैनेज किए बिना अपने ऐप में बाहरी सेवाओं को integrate कर सकते हो। एक बार connection सेट करो, उसे अपने project से bind करो, और Proyecta SDK के ज़रिए अपने ऐप से pre-built actions को call करो। Credentials rest पर encrypted रहते हैं और कभी भी तुम्हारे frontend code के सामने expose नहीं होते।

ConnectorCategoryAuth typeयह क्या करता है
ResendCommunicationsAPI keyTransactional email भेजना, batch emails भेजना, verified domains की सूची देखना
SlackCommunicationsOAuthMessages post करना, channels और users की सूची देखना, messages पर react करना, threads पढ़ना
ElevenLabsAIAPI keyText-to-speech, उपलब्ध voices की सूची देखना, sound effects generate करना

नए connectors नियमित रूप से जोड़े जा रहे हैं।

Connectors कैसे काम करते हैं

Section titled “Connectors कैसे काम करते हैं”
  1. तुम एक connection बनाते हो — credentials देते हो (एक API key या OAuth के ज़रिए sign in)
  2. तुम connection को एक project से bind करते हो — इससे project को उन credentials को इस्तेमाल करने की अनुमति मिलती है
  3. तुम्हारा ऐप actions call करता है — SDK Proyecta Cloud के ज़रिए request भेजता है, जो server-side पर credentials inject करता है

तुम्हारा ऐप code कभी भी raw API key या OAuth token को directly नहीं छूता। Connector system authentication, rate limiting, और audit logging खुद संभालता है।

  1. Builder में अपना project खोलो
  2. Settings > Connectors पर जाओ
  3. Catalog में से कोई connector चुनो (जैसे, Resend)
  4. अपने credentials दर्ज करो:
    • API key connectors (Resend, ElevenLabs): अपनी secret key paste करो
    • OAuth connectors (Slack): Sign in करो और access authorize करो
  5. Connection को एक नाम दो (जैसे, “Production Resend”)
  6. Connection अपने आप test होती है और valid होने पर Active मार्क हो जाती है

अपने ऐप में connector का उपयोग करना

Section titled “अपने ऐप में connector का उपयोग करना”

Connector actions को Proyecta SDK का उपयोग करके server-side code (Convex actions) से call किया जाता है:

'use node';
import { action } from './_generated/server';
import { v } from 'convex/values';
import Proyecta from '@proyecta-ai/sdk';
const proyecta = new Proyecta({ apiKey: process.env.PROYECTA_API_KEY ?? null });
export const notifySlack = action({
args: {
message: v.string(),
},
handler: async (ctx, args) => {
const result = await proyecta.connectors.execute({
connectorId: 'slack',
actionId: 'postMessage',
input: {
channel: '#general',
text: args.message,
},
});
return result.output;
},
});

execute method यह return करती है:

Fieldविवरण
outputAction की return value (shape action पर निर्भर करती है)
durationMsMilliseconds में execution time
invocationIdAudit log entry ID

तुम्हें connector code खुद लिखने की ज़रूरत नहीं है। AI builder जानता है कि तुम्हारे project से कौन-से connectors bound हैं और तुम्हारे लिए integration generate कर सकता है:

  • "Send a welcome email when users sign up" — Resend connector का उपयोग करता है
  • "Post a Slack message when a new order comes in" — Slack connector का उपयोग करता है
  • "Play audio narration on the article page" — ElevenLabs connector का उपयोग करता है
ActionSide effectsविवरण
sendEmailwriteएक single transactional email भेजना
sendBatchwriteएक साथ कई emails भेजना
listDomainsreadVerified sending domains की सूची देखना
ActionSide effectsविवरण
postMessagewriteकिसी channel में message post करना
listChannelsreadWorkspace में channels की सूची देखना
listUsersreadWorkspace members की सूची देखना
reactToMessagewriteEmoji reaction जोड़ना
getThreadreadThread में replies देखना
ActionSide effectsविवरण
textToSpeechwriteText को speech audio में convert करना
listVoicesreadउपलब्ध voices की सूची देखना
generateSoundEffectwriteAI sound effect generate करना
Statusअर्थ
ActiveCredentials valid हैं और connection उपयोग के लिए तैयार है
BrokenCredentials expire हो गए या revoke कर दिए गए — restore करने के लिए उन्हें update करो
  • Credentials को rest पर AES-256-GCM से encrypt किया जाता है
  • Actions प्रति connector प्रति project प्रति minute 1,000 requests तक rate-limited हैं
  • हर action call को एक audit trail के साथ log किया जाता है (connection, action, duration, status)
  • Connections पूरे workspace के scope में होती हैं

क्या मैं एक ही connection को कई projects में उपयोग कर सकता हूँ?

हाँ। Connection एक बार बनाओ और उसे एक ही workspace के किसी भी number के projects से bind करो।

अगर मेरी API key expire हो जाए या revoke हो जाए तो क्या होगा?

Connection status Broken में बदल जाती है। इसे restore करने के लिए Settings > Connectors में credentials अपडेट करो।

क्या मैं frontend से connector actions call कर सकता हूँ?

नहीं। Credentials को secure रखने के लिए connector actions को server-side code (Convex actions) से ही call करना होगा। SDK Proyecta Cloud के ज़रिए route करता है, जो server-side पर authentication inject करता है।

क्या मैं अपने खुद के custom connectors जोड़ सकता हूँ?

अभी नहीं। Custom connector definitions roadmap पर हैं।

  • और connectors (Google, Twilio, SendGrid, और भी बहुत कुछ)
  • Custom connector definitions — अपनी खुद की API लाओ
  • Connected services से incoming events के लिए Webhook ingestion
  • OAuth gateway — client-initiated flows के लिए भी tokens server-side रखना