×
Pastebin

Overview

The Pastebin plugin provides capabilities to pull a paste ID, an identifier for a text paste, from the Pastebin.com website.

Functionality

The Pastebin plugin provides a node to fetch a paste using a paste ID or pastebin.com URL.

Flow Node

Adds Pastebin.com text to the message using the paste ID or by gleaning the paste ID from the URL supplied in the Paste ID property.
Property
Description

Name

The display name of the node within the flows.


Paste ID

This field defines the location from the message, flow, global, or JavaScript expression to use as the data source for the paste ID. The paste ID can be specified directly. If the source is a pastebin.com URL, the paste ID will be determined from there. Additionally, the node context can also be changed. The following contexts are supported.

  • msg.: This selects part of the incoming message as the source of the data. This is typical choice.
  • flow.: This selects part of the flow context’s saved data as the source. This information is shared with only the nodes on a given tab.
  • global.: This selects part of the global context’s saved data as the source. This information is shared by all nodes regardless of tab.
  • J: expression: JSONata expression language to perform query and transform operations on the payload.

Learn More

JSON Message Format

The following samples show the JSON content added to the message payload, which conform to Node Messaging Format.  The content exists within the pastebin object.

Success

The italicized, green text is inserted into the message payload upon a successful request.  The node in the following sample was configured to use the msg.payload.url as the Paste ID.

"payload": {
    "pastebin": {
        "pasteId": "[paste_id]",
        "paste": "... Paste Content from Pastebin.com ..."
    },
    "url": "https://pastebin.com/[paste_id]"
}

Error

The italicized, maroon text is inserted into the message payload upon a failed request. The node in the following sample was configured to use the msg.payload.theId as the Paste ID.

"payload": {
    "pastebin": {
        "pasteId": "[paste_id]",
        "error": {
            "error_code": 5,
            "error_message": "Error 404, paste not found!"
        }
    },
    "theId": "[paste_id]"
}
Nevelex Labs, Main Office

Metro Office Park
2950 Metro Drive, Suite 104
Bloomington, MN 55425
Phone: +1 952-500-8921

©Nevelex Labs, LLC. 2018-2024, All Rights Reserved.

EULA