UNPKG

@yaring/n8n-nodes-meta

Version:

N8N node for publishing content to Facebook, Instagram, and Threads with access token authentication. Supports text posts, photos, videos, Reels, carousels, and stories.

587 lines 16.2 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.threadsFields = exports.threadsOperations = exports.instagramFields = exports.instagramOperations = exports.facebookFields = exports.facebookOperations = void 0; exports.facebookOperations = [ { displayName: 'Operation', name: 'operation', type: 'options', noDataExpression: true, displayOptions: { show: { resource: ['facebook'], }, }, options: [ { name: 'Create Text Post', value: 'createTextPost', description: 'Create a text post on Facebook', action: 'Create a text post', }, { name: 'Create Photo Post', value: 'createPhotoPost', description: 'Create a photo post on Facebook', action: 'Create a photo post', }, { name: 'Create Video Post', value: 'createVideoPost', description: 'Create a video post on Facebook', action: 'Create a video post', }, { name: 'Create Link Post', value: 'createLinkPost', description: 'Create a link post on Facebook', action: 'Create a link post', }, ], default: 'createTextPost', }, ]; exports.facebookFields = [ { displayName: 'Target Type', name: 'targetType', type: 'options', options: [ { name: 'Page', value: 'page', description: 'Post to a Facebook Page', }, { name: 'Group', value: 'group', description: 'Post to a Facebook Group', }, { name: 'User Profile', value: 'user', description: 'Post to user profile (limited availability)', }, ], default: 'page', description: 'Select where to publish the content', displayOptions: { show: { resource: ['facebook'], }, }, }, { displayName: 'Target ID', name: 'targetId', type: 'string', required: true, default: '', description: 'ID of the Facebook Page, Group, or User to post to', displayOptions: { show: { resource: ['facebook'], }, }, }, { displayName: 'Message', name: 'message', type: 'string', typeOptions: { rows: 4, }, required: true, default: '', description: 'The text content of the post', displayOptions: { show: { resource: ['facebook'], operation: ['createTextPost'], }, }, }, { displayName: 'Photo URL', name: 'photoUrl', type: 'string', required: true, default: '', description: 'URL of the photo to upload', displayOptions: { show: { resource: ['facebook'], operation: ['createPhotoPost'], }, }, }, { displayName: 'Caption', name: 'caption', type: 'string', typeOptions: { rows: 3, }, default: '', description: 'Caption for the photo (optional)', displayOptions: { show: { resource: ['facebook'], operation: ['createPhotoPost'], }, }, }, { displayName: 'Video URL', name: 'videoUrl', type: 'string', required: true, default: '', description: 'URL of the video to upload', displayOptions: { show: { resource: ['facebook'], operation: ['createVideoPost'], }, }, }, { displayName: 'Video Description', name: 'videoDescription', type: 'string', typeOptions: { rows: 3, }, default: '', description: 'Description for the video (optional)', displayOptions: { show: { resource: ['facebook'], operation: ['createVideoPost'], }, }, }, { displayName: 'Link URL', name: 'linkUrl', type: 'string', required: true, default: '', description: 'URL to share', displayOptions: { show: { resource: ['facebook'], operation: ['createLinkPost'], }, }, }, { displayName: 'Link Message', name: 'linkMessage', type: 'string', typeOptions: { rows: 3, }, default: '', description: 'Message to accompany the link (optional)', displayOptions: { show: { resource: ['facebook'], operation: ['createLinkPost'], }, }, }, ]; exports.instagramOperations = [ { displayName: 'Operation', name: 'operation', type: 'options', noDataExpression: true, displayOptions: { show: { resource: ['instagram'], }, }, options: [ { name: 'Create Carousel Post', value: 'createCarouselPost', description: 'Create a carousel post with multiple photos/videos', action: 'Create a carousel post', }, { name: 'Create Photo Post', value: 'createPhotoPost', description: 'Create a photo post on Instagram', action: 'Create a photo post', }, { name: 'Create Reels', value: 'createReels', description: 'Create Instagram Reels (short vertical videos)', action: 'Create a reels', }, { name: 'Create Story', value: 'createStory', description: 'Create an Instagram Story', action: 'Create a story', }, { name: 'Create Video Post', value: 'createVideoPost', description: 'Create a video post on Instagram (feed video)', action: 'Create a video post', }, ], default: 'createPhotoPost', }, ]; exports.instagramFields = [ { displayName: 'Instagram Business Account ID', name: 'instagramBusinessAccountId', type: 'string', required: true, default: '', description: 'ID of the Instagram Business Account', displayOptions: { show: { resource: ['instagram'], }, }, }, { displayName: 'Image URL', name: 'imageUrl', type: 'string', required: true, default: '', description: 'URL of the image to post', displayOptions: { show: { resource: ['instagram'], operation: ['createPhotoPost'], }, }, }, { displayName: 'Caption', name: 'caption', type: 'string', typeOptions: { rows: 4, }, default: '', description: 'Caption for the photo (optional)', displayOptions: { show: { resource: ['instagram'], operation: ['createPhotoPost'], }, }, }, { displayName: 'Video URL', name: 'videoUrl', type: 'string', required: true, default: '', description: 'URL of the video to post', displayOptions: { show: { resource: ['instagram'], operation: ['createVideoPost'], }, }, }, { displayName: 'Video Caption', name: 'videoCaption', type: 'string', typeOptions: { rows: 4, }, default: '', description: 'Caption for the video (optional)', displayOptions: { show: { resource: ['instagram'], operation: ['createVideoPost'], }, }, }, { displayName: 'Reels Video URL', name: 'reelsVideoUrl', type: 'string', required: true, default: '', description: 'URL of the video for Instagram Reels (MP4 format, vertical orientation recommended)', displayOptions: { show: { resource: ['instagram'], operation: ['createReels'], }, }, }, { displayName: 'Reels Caption', name: 'reelsCaption', type: 'string', typeOptions: { rows: 4, }, default: '', description: 'Caption for the Reels (optional, supports hashtags and mentions)', displayOptions: { show: { resource: ['instagram'], operation: ['createReels'], }, }, }, { displayName: 'Cover Image URL', name: 'coverImageUrl', type: 'string', default: '', description: 'URL of the cover image for the Reels (optional, JPEG format)', displayOptions: { show: { resource: ['instagram'], operation: ['createReels'], }, }, }, { displayName: 'Media Items', name: 'mediaItems', type: 'fixedCollection', default: { mediaItem: [{ mediaUrl: '', mediaType: 'IMAGE' }] }, description: 'List of media items for the carousel', typeOptions: { multipleValues: true, }, displayOptions: { show: { resource: ['instagram'], operation: ['createCarouselPost'], }, }, options: [ { name: 'mediaItem', displayName: 'Media Item', values: [ { displayName: 'Media Type', name: 'mediaType', type: 'options', options: [ { name: 'Image', value: 'IMAGE', }, { name: 'Video', value: 'VIDEO', }, ], default: 'IMAGE', description: 'Type of media item', }, { displayName: 'Media URL', name: 'mediaUrl', type: 'string', required: true, default: '', description: 'URL of the media item', }, ], }, ], }, { displayName: 'Carousel Caption', name: 'carouselCaption', type: 'string', typeOptions: { rows: 4, }, default: '', description: 'Caption for the carousel post (optional)', displayOptions: { show: { resource: ['instagram'], operation: ['createCarouselPost'], }, }, }, { displayName: 'Story Media URL', name: 'storyMediaUrl', type: 'string', required: true, default: '', description: 'URL of the image or video for the story', displayOptions: { show: { resource: ['instagram'], operation: ['createStory'], }, }, }, { displayName: 'Story Media Type', name: 'storyMediaType', type: 'options', options: [ { name: 'Image', value: 'IMAGE', }, { name: 'Video', value: 'VIDEO', }, ], default: 'IMAGE', description: 'Type of media for the story', displayOptions: { show: { resource: ['instagram'], operation: ['createStory'], }, }, }, ]; exports.threadsOperations = [ { displayName: 'Operation', name: 'operation', type: 'options', noDataExpression: true, displayOptions: { show: { resource: ['threads'], }, }, options: [ { name: 'Create Text Post', value: 'createTextPost', description: 'Create a text post on Threads', action: 'Create a text post', }, { name: 'Create Photo Post', value: 'createPhotoPost', description: 'Create a photo post on Threads', action: 'Create a photo post', }, { name: 'Create Video Post', value: 'createVideoPost', description: 'Create a video post on Threads', action: 'Create a video post', }, ], default: 'createTextPost', }, ]; exports.threadsFields = [ { displayName: 'Threads User ID', name: 'threadsUserId', type: 'string', required: true, default: '', description: 'ID of the Threads User', displayOptions: { show: { resource: ['threads'], }, }, }, { displayName: 'Text', name: 'text', type: 'string', typeOptions: { rows: 4, }, required: true, default: '', description: 'The text content of the Threads post', displayOptions: { show: { resource: ['threads'], operation: ['createTextPost'], }, }, }, { displayName: 'Image URL', name: 'imageUrl', type: 'string', required: true, default: '', description: 'URL of the image to post', displayOptions: { show: { resource: ['threads'], operation: ['createPhotoPost'], }, }, }, { displayName: 'Photo Text', name: 'photoText', type: 'string', typeOptions: { rows: 3, }, default: '', description: 'Text to accompany the photo (optional)', displayOptions: { show: { resource: ['threads'], operation: ['createPhotoPost'], }, }, }, { displayName: 'Video URL', name: 'videoUrl', type: 'string', required: true, default: '', description: 'URL of the video to post', displayOptions: { show: { resource: ['threads'], operation: ['createVideoPost'], }, }, }, { displayName: 'Video Text', name: 'videoText', type: 'string', typeOptions: { rows: 3, }, default: '', description: 'Text to accompany the video (optional)', displayOptions: { show: { resource: ['threads'], operation: ['createVideoPost'], }, }, }, ]; //# sourceMappingURL=FacebookInstagramThreadsDescription.js.map