{"slug":"segment-automation","title":"segment-automation","summary":"Automate Segment tasks via Rube MCP (Composio): track events, identify users, manage groups, page views, aliases, batch operations. Always search tools first for current schemas.","platform":"ChatGPT","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-08-16T13:38:50.795117Z","repo":{"url":"https://github.com/sickn33/agentic-awesome-skills","stars":46883,"forks":6831,"license":"MIT","updatedAt":"2026-09-25T05:43:16Z"},"bodyHtml":"<hr>\n<h2>name: segment-automation\ndescription: \"Automate Segment tasks via Rube MCP (Composio): track events, identify users, manage groups, page views, aliases, batch operations. Always search tools first for current schemas.\"\nrisk: critical\nsource: community\ndate_added: \"2026-02-27\"</h2>\n<h1>Segment Automation via Rube MCP</h1>\n<p>Automate Segment customer data platform operations through Composio's Segment toolkit via Rube MCP.</p>\n<h2>Prerequisites</h2>\n<ul>\n<li>Rube MCP must be connected (RUBE_SEARCH_TOOLS available)</li>\n<li>Active Segment connection via <code>RUBE_MANAGE_CONNECTIONS</code> with toolkit <code>segment</code></li>\n<li>Always call <code>RUBE_SEARCH_TOOLS</code> first to get current tool schemas</li>\n</ul>\n<h2>Setup</h2>\n<p><strong>Get Rube MCP</strong>: Add <code>https://rube.app/mcp</code> as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.</p>\n<ol>\n<li>Verify Rube MCP is available by confirming <code>RUBE_SEARCH_TOOLS</code> responds</li>\n<li>Call <code>RUBE_MANAGE_CONNECTIONS</code> with toolkit <code>segment</code></li>\n<li>If connection is not ACTIVE, follow the returned auth link to complete Segment authentication</li>\n<li>Confirm connection status shows ACTIVE before running any workflows</li>\n</ol>\n<h2>Core Workflows</h2>\n<h3>1. Track Events</h3>\n<p><strong>When to use</strong>: User wants to send event data to Segment for downstream destinations</p>\n<p><strong>Tool sequence</strong>:</p>\n<ol>\n<li><code>SEGMENT_TRACK</code> - Send a single track event [Required]</li>\n</ol>\n<p><strong>Key parameters</strong>:</p>\n<ul>\n<li><code>userId</code>: User identifier (required if no <code>anonymousId</code>)</li>\n<li><code>anonymousId</code>: Anonymous identifier (required if no <code>userId</code>)</li>\n<li><code>event</code>: Event name (e.g., 'Order Completed', 'Button Clicked')</li>\n<li><code>properties</code>: Object with event-specific properties</li>\n<li><code>timestamp</code>: ISO 8601 timestamp (optional; defaults to server time)</li>\n<li><code>context</code>: Object with contextual metadata (IP, user agent, etc.)</li>\n</ul>\n<p><strong>Pitfalls</strong>:</p>\n<ul>\n<li>At least one of <code>userId</code> or <code>anonymousId</code> is required</li>\n<li><code>event</code> name is required and should follow consistent naming conventions</li>\n<li>Properties are freeform objects; ensure consistent schema across events</li>\n<li>Timestamp must be ISO 8601 format (e.g., '2024-01-15T10:30:00Z')</li>\n<li>Events are processed asynchronously; successful API response means accepted, not delivered</li>\n</ul>\n<h3>2. Identify Users</h3>\n<p><strong>When to use</strong>: User wants to associate traits with a user profile in Segment</p>\n<p><strong>Tool sequence</strong>:</p>\n<ol>\n<li><code>SEGMENT_IDENTIFY</code> - Set user traits and identity [Required]</li>\n</ol>\n<p><strong>Key parameters</strong>:</p>\n<ul>\n<li><code>userId</code>: User identifier (required if no <code>anonymousId</code>)</li>\n<li><code>anonymousId</code>: Anonymous identifier</li>\n<li><code>traits</code>: Object with user properties (email, name, plan, etc.)</li>\n<li><code>timestamp</code>: ISO 8601 timestamp</li>\n<li><code>context</code>: Contextual metadata</li>\n</ul>\n<p><strong>Pitfalls</strong>:</p>\n<ul>\n<li>At least one of <code>userId</code> or <code>anonymousId</code> is required</li>\n<li>Traits are merged with existing traits, not replaced</li>\n<li>To remove a trait, set it to <code>null</code></li>\n<li>Identify calls should be made before track calls for new users</li>\n<li>Avoid sending PII in traits unless destinations are configured for it</li>\n</ul>\n<h3>3. Batch Operations</h3>\n<p><strong>When to use</strong>: User wants to send multiple events, identifies, or other calls in a single request</p>\n<p><strong>Tool sequence</strong>:</p>\n<ol>\n<li><code>SEGMENT_BATCH</code> - Send multiple Segment calls in one request [Required]</li>\n</ol>\n<p><strong>Key parameters</strong>:</p>\n<ul>\n<li><code>batch</code>: Array of message objects, each with:\n<ul>\n<li><code>type</code>: Message type ('track', 'identify', 'group', 'page', 'alias')</li>\n<li><code>userId</code> / <code>anonymousId</code>: User identifier</li>\n<li>Additional fields based on type (event, properties, traits, etc.)</li>\n</ul>\n</li>\n</ul>\n<p><strong>Pitfalls</strong>:</p>\n<ul>\n<li>Each message in the batch must have a valid <code>type</code> field</li>\n<li>Maximum batch size limit applies; check schema for current limit</li>\n<li>All messages in a batch are processed independently; one failure does not affect others</li>\n<li>Each message must independently satisfy its type's requirements (e.g., track needs event name)</li>\n<li>Batch is the most efficient way to send multiple calls; prefer over individual calls</li>\n</ul>\n<h3>4. Group Users</h3>\n<p><strong>When to use</strong>: User wants to associate a user with a company, team, or organization</p>\n<p><strong>Tool sequence</strong>:</p>\n<ol>\n<li><code>SEGMENT_GROUP</code> - Associate user with a group [Required]</li>\n</ol>\n<p><strong>Key parameters</strong>:</p>\n<ul>\n<li><code>userId</code>: User identifier (required if no <code>anonymousId</code>)</li>\n<li><code>anonymousId</code>: Anonymous identifier</li>\n<li><code>groupId</code>: Group/organization identifier (required)</li>\n<li><code>traits</code>: Object with group properties (name, industry, size, plan)</li>\n<li><code>timestamp</code>: ISO 8601 timestamp</li>\n</ul>\n<p><strong>Pitfalls</strong>:</p>\n<ul>\n<li><code>groupId</code> is required; it identifies the company or organization</li>\n<li>Group traits are merged with existing traits for that group</li>\n<li>A user can belong to multiple groups</li>\n<li>Group traits update the group profile, not the user profile</li>\n</ul>\n<h3>5. Track Page Views</h3>\n<p><strong>When to use</strong>: User wants to record page view events in Segment</p>\n<p><strong>Tool sequence</strong>:</p>\n<ol>\n<li><code>SEGMENT_PAGE</code> - Send a page view event [Required]</li>\n</ol>\n<p><strong>Key parameters</strong>:</p>\n<ul>\n<li><code>userId</code>: User identifier (required if no <code>anonymousId</code>)</li>\n<li><code>anonymousId</code>: Anonymous identifier</li>\n<li><code>name</code>: Page name (e.g., 'Home', 'Pricing', 'Dashboard')</li>\n<li><code>category</code>: Page category (e.g., 'Docs', 'Marketing')</li>\n<li><code>properties</code>: Object with page-specific properties (url, title, referrer)</li>\n</ul>\n<p><strong>Pitfalls</strong>:</p>\n<ul>\n<li>At least one of <code>userId</code> or <code>anonymousId</code> is required</li>\n<li><code>name</code> and <code>category</code> are optional but recommended for proper analytics</li>\n<li>Standard properties include <code>url</code>, <code>title</code>, <code>referrer</code>, <code>path</code>, <code>search</code></li>\n<li>Page calls are often automated; manual use is for server-side page tracking</li>\n</ul>\n<h3>6. Alias Users and Manage Sources</h3>\n<p><strong>When to use</strong>: User wants to merge anonymous and identified users, or manage source configuration</p>\n<p><strong>Tool sequence</strong>:</p>\n<ol>\n<li><code>SEGMENT_ALIAS</code> - Link two user identities together [Optional]</li>\n<li><code>SEGMENT_LIST_SCHEMA_SETTINGS_IN_SOURCE</code> - View source schema settings [Optional]</li>\n<li><code>SEGMENT_UPDATE_SOURCE</code> - Update source configuration [Optional]</li>\n</ol>\n<p><strong>Key parameters</strong>:</p>\n<ul>\n<li>For ALIAS:\n<ul>\n<li><code>userId</code>: New user identifier (the identified ID)</li>\n<li><code>previousId</code>: Old user identifier (the anonymous ID)</li>\n</ul>\n</li>\n<li>For source operations:\n<ul>\n<li><code>sourceId</code>: Source identifier</li>\n</ul>\n</li>\n</ul>\n<p><strong>Pitfalls</strong>:</p>\n<ul>\n<li>ALIAS is a one-way operation; cannot be undone</li>\n<li><code>previousId</code> is the anonymous/old ID, <code>userId</code> is the new/identified ID</li>\n<li>Not all destinations support alias calls; check destination documentation</li>\n<li>ALIAS should be called once when a user first identifies (e.g., signs up)</li>\n<li>Source updates may affect data collection; review changes carefully</li>\n</ul>\n<h2>Common Patterns</h2>\n<h3>User Lifecycle</h3>\n<p>Standard Segment user lifecycle:</p>\n<pre><code>1. Anonymous user visits -&gt; PAGE call with anonymousId\n2. User interacts -&gt; TRACK call with anonymousId\n3. User signs up -&gt; ALIAS (anonymousId -&gt; userId), then IDENTIFY with traits\n4. User takes action -&gt; TRACK call with userId\n5. User joins org -&gt; GROUP call linking userId to groupId\n</code></pre>\n<h3>Batch Optimization</h3>\n<p>For bulk data ingestion:</p>\n<pre><code>1. Collect events in memory (array of message objects)\n2. Each message includes type, userId/anonymousId, and type-specific fields\n3. Call SEGMENT_BATCH with the collected messages\n4. Check response for any individual message errors\n</code></pre>\n<h3>Naming Conventions</h3>\n<p>Segment recommends consistent event naming:</p>\n<ul>\n<li><strong>Events</strong>: Use \"Object Action\" format (e.g., 'Order Completed', 'Article Viewed')</li>\n<li><strong>Properties</strong>: Use snake_case (e.g., 'order_total', 'product_name')</li>\n<li><strong>Traits</strong>: Use snake_case (e.g., 'first_name', 'plan_type')</li>\n</ul>\n<h2>Known Pitfalls</h2>\n<p><strong>Identity Resolution</strong>:</p>\n<ul>\n<li>Always include <code>userId</code> or <code>anonymousId</code> on every call</li>\n<li>Use ALIAS only once per user identity merge</li>\n<li>Identify before tracking to ensure proper user association</li>\n</ul>\n<p><strong>Data Quality</strong>:</p>\n<ul>\n<li>Event names should be consistent across all sources</li>\n<li>Properties should follow a defined schema for downstream compatibility</li>\n<li>Avoid sending sensitive PII unless destinations are configured for it</li>\n</ul>\n<p><strong>Rate Limits</strong>:</p>\n<ul>\n<li>Use BATCH for bulk operations to stay within rate limits</li>\n<li>Individual calls are rate-limited per source</li>\n<li>Batch calls are more efficient and less likely to be throttled</li>\n</ul>\n<p><strong>Response Parsing</strong>:</p>\n<ul>\n<li>Successful responses indicate acceptance, not delivery to destinations</li>\n<li>Response data may be nested under <code>data</code> key</li>\n<li>Check for error fields in batch responses for individual message failures</li>\n</ul>\n<p><strong>Timestamps</strong>:</p>\n<ul>\n<li>Must be ISO 8601 format with timezone (e.g., '2024-01-15T10:30:00Z')</li>\n<li>Omitting timestamp uses server receive time</li>\n<li>Historical data imports should include explicit timestamps</li>\n</ul>\n<h2>Quick Reference</h2>\n<table>\n<thead>\n<tr>\n<th>Task</th>\n<th>Tool Slug</th>\n<th>Key Params</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Track event</td>\n<td>SEGMENT_TRACK</td>\n<td>userId, event, properties</td>\n</tr>\n<tr>\n<td>Identify user</td>\n<td>SEGMENT_IDENTIFY</td>\n<td>userId, traits</td>\n</tr>\n<tr>\n<td>Batch calls</td>\n<td>SEGMENT_BATCH</td>\n<td>batch (array of messages)</td>\n</tr>\n<tr>\n<td>Group user</td>\n<td>SEGMENT_GROUP</td>\n<td>userId, groupId, traits</td>\n</tr>\n<tr>\n<td>Page view</td>\n<td>SEGMENT_PAGE</td>\n<td>userId, name, properties</td>\n</tr>\n<tr>\n<td>Alias identity</td>\n<td>SEGMENT_ALIAS</td>\n<td>userId, previousId</td>\n</tr>\n<tr>\n<td>Source schema</td>\n<td>SEGMENT_LIST_SCHEMA_SETTINGS_IN_SOURCE</td>\n<td>sourceId</td>\n</tr>\n<tr>\n<td>Update source</td>\n<td>SEGMENT_UPDATE_SOURCE</td>\n<td>sourceId</td>\n</tr>\n<tr>\n<td>Warehouses</td>\n<td>SEGMENT_LIST_CONNECTED_WAREHOUSES_FROM_SOURCE</td>\n<td>sourceId</td>\n</tr>\n</tbody>\n</table>\n<h2>When to Use</h2>\n<p>This skill is applicable to execute the workflow or actions described in the overview.</p>\n<h2>Limitations</h2>\n<ul>\n<li>Use this skill only when the task clearly matches the scope described above.</li>\n<li>Do not treat the output as a substitute for environment-specific validation, testing, or expert review.</li>\n<li>Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.</li>\n</ul>\n","files":[{"path":"SKILL.md","sizeBytes":9184,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-08-16T13:44:59.973583Z","sha256":"CFC9C36247B80E4DA7D4F960399D79008C5266D8E4FF28A115EFBD5FCFBD69D3","sizeBytes":3591},"review":null,"source":{"repositoryUrl":"https://github.com/sickn33/agentic-awesome-skills","path":"skills/segment-automation","license":"MIT","commit":"f2bba339de74414b0771234cbe4f6a15258e32a3","subtreeSha":"F42B159041A734BABB68DFC31425190E1263F4F2AB6B857F94DB3C5BD7D4441D","lastSyncedAt":"2026-09-25T06:48:39.853703Z"},"reviewedAt":"2026-08-16T13:55:07.732629Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/sickn33/agentic-awesome-skills/tree/main/skills/segment-automation"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install sickn33-agentic-awesome-skills@llmmart"},{"target":"git","command":"git clone https://github.com/sickn33/agentic-awesome-skills.git"}]}