\\\",\\n \\\"css_content\\\" : \\\".tweet-text{background-color:#fff2ac;background-image:linear-gradient(to right,#ffe359 0,#fff2ac 100%);font-weight:bolder;font-size:32px;font-family:Roboto,sans-serif;padding:4px}\\\",\\n \\\"generate_img_url\\\": true\\n}\",\"__typename\":\"OauthBody\"},\"bodyParams\":[],\"authorization\":{\"type\":null,\"basicUsername\":\"\",\"basicPassword\":\"\",\"bearerToken\":\"\",\"oauthAccessToken\":null,\"oauthRefreshToken\":null,\"oauthSignerUri\":null,\"__typename\":\"Authorization\"},\"extracts\":[],\"metadataExtracts\":[],\"cellParams\":[],\"tab\":\"Body\",\"__typename\":\"OauthReq\"},\"marketplaceContent\":null,\"integrationConnections\":{\"nodes\":[],\"__typename\":\"IntegrationConnection\"}},\"otherApp\":{\"id\":\"app_1RphjD\",\"name\":\"Node\",\"nameSlug\":\"node\",\"description\":\"Anything you can do with Node.js, you can do in a Pipedream workflow. This includes using most of npm's 400,000+ packages.\",\"appPrompts\":[{\"id\":\"12834\",\"label\":\"Code Review\",\"prompt\":\"Build me an agent that monitors my GitHub repository for new pull requests, automatically analyzes the Node.js code changes using AI to identify potential bugs, security vulnerabilities, performance issues, and code quality problems, then posts detailed review comments directly on the pull request with specific suggestions for improvement and best practices.\",\"__typename\":\"AppPrompt\"},{\"id\":\"12835\",\"label\":\"Error Analysis\",\"prompt\":\"Create an agent that monitors my Node.js application logs from various sources (files, databases, or log services), uses AI to analyze error patterns and stack traces, categorizes issues by severity and frequency, then sends me intelligent summaries via email with root cause analysis and recommended fixes for the most critical problems.\",\"__typename\":\"AppPrompt\"},{\"id\":\"12837\",\"label\":\"Performance Optimization\",\"prompt\":\"Create an agent that monitors my Node.js application performance metrics from APM tools, uses AI to analyze performance bottlenecks, memory leaks, and slow database queries, then generates intelligent recommendations for code optimizations and infrastructure improvements, sending detailed reports to my development team.\",\"__typename\":\"AppPrompt\"},{\"id\":\"12838\",\"label\":\"API Documentation\",\"prompt\":\"Build me an agent that scans my Node.js Express API routes and middleware, uses AI to automatically generate comprehensive API documentation including endpoint descriptions, parameter details, response examples, and usage guidelines, then updates my documentation platform whenever code changes are detected.\",\"__typename\":\"AppPrompt\"},{\"id\":\"12839\",\"label\":\"Test Generation\",\"prompt\":\"Create an agent that analyzes my Node.js application code, uses AI to automatically generate unit tests and integration tests for functions and API endpoints that lack proper test coverage, then creates pull requests with the generated tests and detailed explanations of what each test validates.\",\"__typename\":\"AppPrompt\"},{\"id\":\"12840\",\"label\":\"Migration Assistant\",\"prompt\":\"Build an agent that analyzes my legacy Node.js codebase, uses AI to identify outdated patterns, deprecated dependencies, and compatibility issues, then generates step-by-step migration plans with code examples for upgrading to newer Node.js versions or modern frameworks like Express 5 or Fastify.\",\"__typename\":\"AppPrompt\"},{\"id\":\"23884\",\"label\":\"Dependency Security\",\"prompt\":\"Create an agent that continuously monitors Node.js package.json files and npm dependencies for security vulnerabilities. When new vulnerabilities are discovered in project dependencies, use AI to assess the risk level, analyze the potential impact on the application, and recommend appropriate remediation strategies. The agent should automatically create GitHub issues with detailed vulnerability reports, suggest alternative packages when available, and track the status of security updates across multiple projects.\",\"__typename\":\"AppPrompt\"},{\"id\":\"23885\",\"label\":\"Environment Sync\",\"prompt\":\"Build an agent that automatically synchronizes and validates Node.js environment configurations across development, staging, and production environments. Monitor environment variables, configuration files, and deployment settings to detect inconsistencies or missing configurations. Use AI to analyze configuration patterns, suggest optimal settings for different environments, and identify potential security risks in environment setup. The agent should alert teams about configuration drift and maintain environment documentation.\",\"__typename\":\"AppPrompt\"}],\"authType\":null,\"customFieldsDescriptionMd\":\"\",\"oauthScopes\":[],\"customFields\":[],\"oauthReqsByType\":{\"requestToken\":{\"httpMethod\":\"POST\",\"url\":\"\",\"urlParams\":[],\"headerParams\":[],\"body\":null,\"bodyParams\":[],\"authorization\":{\"type\":\"OAuth\",\"basicUsername\":\"\",\"basicPassword\":\"\",\"bearerToken\":\"\",\"oauthAccessToken\":null,\"oauthRefreshToken\":null,\"oauthSignerUri\":null,\"__typename\":\"Authorization\"},\"extracts\":[],\"metadataExtracts\":null,\"cellParams\":null,\"tab\":null,\"__typename\":\"OauthReq\"},\"authorization\":{\"httpMethod\":\"GET\",\"url\":\"\",\"urlParams\":[{\"key\":\"client_id\",\"value\":\"{{oauth.client_id}}\",\"__typename\":\"Kv\"},{\"key\":\"redirect_uri\",\"value\":\"{{oauth.redirect_uri}}\",\"__typename\":\"Kv\"},{\"key\":\"state\",\"value\":\"{{oauth.state}}\",\"__typename\":\"Kv\"},{\"key\":\"response_type\",\"value\":\"code\",\"__typename\":\"Kv\"},{\"key\":\"scope\",\"value\":\"{{oauth.space_separated_scopes}}\",\"__typename\":\"Kv\"}],\"headerParams\":[],\"body\":null,\"bodyParams\":[],\"authorization\":{\"type\":null,\"basicUsername\":\"\",\"basicPassword\":\"\",\"bearerToken\":\"\",\"oauthAccessToken\":null,\"oauthRefreshToken\":null,\"oauthSignerUri\":null,\"__typename\":\"Authorization\"},\"extracts\":[],\"metadataExtracts\":null,\"cellParams\":null,\"tab\":null,\"__typename\":\"OauthReq\"},\"accessToken\":{\"httpMethod\":\"POST\",\"url\":\"\",\"urlParams\":[],\"headerParams\":[{\"key\":\"content-type\",\"value\":\"application/x-www-form-urlencoded\",\"__typename\":\"Kv\"},{\"key\":\"accept\",\"value\":\"application/json\",\"__typename\":\"Kv\"}],\"body\":null,\"bodyParams\":[{\"key\":\"client_id\",\"value\":\"{{oauth.client_id}}\",\"__typename\":\"Kv\"},{\"key\":\"client_secret\",\"value\":\"{{oauth.client_secret}}\",\"__typename\":\"Kv\"},{\"key\":\"redirect_uri\",\"value\":\"{{oauth.redirect_uri}}\",\"__typename\":\"Kv\"},{\"key\":\"grant_type\",\"value\":\"authorization_code\",\"__typename\":\"Kv\"},{\"key\":\"code\",\"value\":\"{{oauth.code}}\",\"__typename\":\"Kv\"}],\"authorization\":{\"type\":null,\"basicUsername\":\"\",\"basicPassword\":\"\",\"bearerToken\":\"\",\"oauthAccessToken\":null,\"oauthRefreshToken\":null,\"oauthSignerUri\":null,\"__typename\":\"Authorization\"},\"extracts\":[],\"metadataExtracts\":null,\"cellParams\":null,\"tab\":null,\"__typename\":\"OauthReq\"},\"refreshToken\":{\"httpMethod\":\"POST\",\"url\":\"\",\"urlParams\":[],\"headerParams\":[{\"key\":\"content-type\",\"value\":\"application/x-www-form-urlencoded\",\"__typename\":\"Kv\"},{\"key\":\"accept\",\"value\":\"application/json\",\"__typename\":\"Kv\"}],\"body\":null,\"bodyParams\":[{\"key\":\"client_id\",\"value\":\"{{oauth.client_id}}\",\"__typename\":\"Kv\"},{\"key\":\"client_secret\",\"value\":\"{{oauth.client_secret}}\",\"__typename\":\"Kv\"},{\"key\":\"grant_type\",\"value\":\"refresh_token\",\"__typename\":\"Kv\"},{\"key\":\"refresh_token\",\"value\":\"{{oauth.refresh_token}}\",\"__typename\":\"Kv\"}],\"authorization\":{\"type\":null,\"basicUsername\":\"\",\"basicPassword\":\"\",\"bearerToken\":\"\",\"oauthAccessToken\":null,\"oauthRefreshToken\":null,\"oauthSignerUri\":null,\"__typename\":\"Authorization\"},\"extracts\":[],\"metadataExtracts\":null,\"cellParams\":null,\"tab\":null,\"__typename\":\"OauthReq\"},\"__typename\":\"OauthReqsByType\"},\"__typename\":\"App\",\"registryComponents\":[{\"id\":\"sc_0riE00ga\",\"key\":\"node-run-node-code\",\"name\":\"Run Node Code\",\"description\":\"Write custom Node.js code and use any of the 400k+ npm packages available. Refer to the [Pipedream Node docs](https://pipedream.com/docs/code/nodejs) to learn more.\",\"type\":\"ACTION\",\"__typename\":\"SavedComponent\"}],\"componentCodeScaffoldRaw\":\"// To use previous step data, pass the `steps` object to the run() function\\nexport default defineComponent({\\n async run({ steps, $ }) {\\n // Return data to use it in future steps\\n return steps.trigger.event\\n },\\n})\",\"testRequest\":{\"httpMethod\":\"GET\",\"url\":\"\",\"urlParams\":[],\"headerParams\":[],\"body\":null,\"bodyParams\":[],\"authorization\":{\"type\":null,\"basicUsername\":\"\",\"basicPassword\":\"\",\"bearerToken\":\"\",\"oauthAccessToken\":null,\"oauthRefreshToken\":null,\"oauthSignerUri\":null,\"__typename\":\"Authorization\"},\"extracts\":[{\"field\":\"uid\",\"path\":\"id\",\"optional\":null,\"__typename\":\"Extract\"},{\"field\":\"info\",\"path\":\"email\",\"optional\":null,\"__typename\":\"Extract\"}],\"metadataExtracts\":null,\"cellParams\":[],\"tab\":null,\"__typename\":\"OauthReq\"},\"marketplaceContent\":{\"id\":\"2103\",\"markdown\":\"# Overview\\n\\nDevelop, run and deploy your Node.js code in Pipedream workflows, using it between no-code steps, with [connected accounts](https://pipedream.com/docs/code/nodejs/auth), or integrate [Data Stores](https://pipedream.com/docs/data-stores) and [File Stores](https://pipedream.com/docs/projects/file-stores).\\n\\nThis includes [installing NPM packages](https://pipedream.com/docs/code/nodejs#using-npm-packages), within your code without having to manage a `package.json` file or running `npm install`.\\n\\nBelow is an example of installing the `axios` package in a Pipedream Node.js code step. Pipedream imports the **`axios`** package, performs the API request, and shares the response with subsequent workflow steps:\\n\\n# Getting Started\\n\\nTo add a Node.js code step, open a new workflow and include a step.\\n\\n1. Select the **Node** app:\\n\\n\\n\\n2. Then select the **Run Node Code** action:\\n\\n\\n\\nNow you’re ready to write some code!\\n\\nOn the right, you'll see the default code provided by Pipedream:\\n\\n```jsx\\n// To use any npm package, just import it\\n// import axios from \\\"axios\\\"\\n\\nexport default defineComponent({\\n async run({ steps, $ }) {\\n // Reference previous step data using the steps object and return data to use it in future steps\\n return steps.trigger.event\\n },\\n})\\n```\\n\\nYou can write your custom code within the `run` function. `run` is called when this step executes in your workflow.\\n\\nWhen you click **Test** on the Node.js code step, it will display the event data from your trigger step. For instance, if your trigger is an HTTP request, then the HTTP request data will be returned.\\n\\nThis step can execute any Node.js code. However, the **`run`** function, a special Pipedream callback, must be set up correctly to return data. Otherwise, you can run arbitrary code that:\\n\\n- [Consumes or shares data with other steps](https://pipedream.com/docs/code/nodejs#sharing-data-between-steps)\\n- [Send HTTP requests](https://pipedream.com/docs/code/nodejs#making-http-requests-from-your-workflow)\\n- [Return an HTTP response](https://pipedream.com/docs/code/nodejs#returning-http-responses)\\n- [End the entire workflow](https://pipedream.com/docs/code/nodejs#ending-a-workflow-early)\\n- [Use your connected accounts to make authenticated HTTP requests](https://pipedream.com/docs/code/nodejs/auth)\\n- [Reference environment variables](https://pipedream.com/docs/code/nodejs#using-secrets-in-code)\\n- [Display props for entering in dynamic or static data](https://pipedream.com/docs/code/nodejs#passing-props-to-code-steps)\\n- [Retrieve or update data within Data Stores](https://pipedream.com/docs/code/nodejs/using-data-stores)\\n- [Download, upload and manipulate files](https://pipedream.com/docs/code/nodejs/working-with-files)\\n- [Pausing, resuming and rerunning Node.js code steps](https://pipedream.com/docs/code/nodejs/rerun)\\n- [Browser automation with Puppeteer or Playwright](https://pipedream.com/docs/code/nodejs/browser-automation)\\n\\n## Developing pre-built actions and triggers\\n\\nPipedream’s pre-built actions and triggers (a.k.a. Sources) are built using Node.js. [These components](https://pipedream.com/docs/components) allow you to quickly build workflows by reusing logic with different inputs (also known as [props](https://pipedream.com/docs/workflows/using-props)).\\n\\nThese components are open source. [You can fork the Pipedream repository](https://github.com/PipedreamHQ/pipedream) and modify these components to your needs. You can even publish private actions and sources to your workspace for you and your team’s own use.\\n\\nYou can also [contribute actions and triggers to Pipedream’s Registry](https://pipedream.com/docs/apps/contributing) which are published on [Pipedream’s App Marketplace](https://pipedream.com/apps). Publishing your app on Pipedream integrates it for use with code steps as well as streamlined integrations with your own pre-built actions and triggers.\\n\\nComponents can be deployed to your workspace by using the Pipedream CLI, or within your workflows Node.js code steps directly.\\n\\nTo get started:\\n\\n- Learn about Pipedream Node.js powered [Components](https://pipedream.com/docs/components)\\n - [Build a custom action](https://pipedream.com/docs/components/actions-quickstart)\\n - [Build a custom trigger](https://pipedream.com/docs/components/sources-quickstart)\\n- [Integrate your app into Pipedream](https://pipedream.com/docs/apps/contributing#contribution-process)\\n\\n## AI code generation\\n\\nGenerate Pipedream compatible Node.js code within your workflow with human language.\\n\\nTo get started, open a Node.js step and select the **Edit with AI** button.\\n\\n\\n\\nThen, enter your prompt to generate code. Selecting a specific app generates the necessary integration code for API requests.\\n\\nFor example, select the Slack app and use the prompt:\\n\\n```\\nSend a message to a public channel\\n```\\n\\nThis prompt will generate the corresponding code to send an API request to Slack and perform the action using your connected Pipedream account.\\n\\n# Troubleshooting\\n\\nPipedream will show your error traces within your individual steps, under the **Logs** section.\\n\\nTraces across all of your workflows are also available within the [Event History](https://pipedream.com/docs/event-history) in your Pipedream workspace. This gives a global view of all failed executions, and gives you the tools to filter by workflow, time occurred and more.\\n\\n## Pipedream Specific Errors\\n\\nIf there’s an issue with a specific Pipedream level construct, you’ll see specific error messages within the step itself. \\n\\n### Configuration Error\\n\\nA `ConfigurationError` can occur if the props for the code step are invalid. For example, if you’re attempting to update a Google Calendar event, but the `end_date` is *before* the `start_date`, then the action may throw a specific `ConfigurationError` to signal this action isn’t possible.\\n\\nAs a Pipedream action or source developer, you can also leverage `ConfigurationErrors` to guide users of your action or source to pass appropriate data to props in order for the component to function properly.\\n\\nFor more details, visit the [Configuration Error documentation](https://pipedream.com/docs/code/nodejs#configuration-error).\\n\\n### Active Handle Error\\n\\nIf your code is performing an asynchronous action that is not properly awaited, you may see an error.\\n\\nThis error means that *control* has moved onto the next step, but there were unresolved promises within your Node.js code.\\n\\nTo keep Pipedream from moving onto the next step, use `await` on your promises to hold execution until the promise finishes.\\n\\n[Read our docs](https://pipedream.com/docs/code/nodejs/async#the-problem) on implementing asynchronous code in Node.js code steps.\\n\",\"__typename\":\"MarketplaceContent\"}}}","hasNext":false}}
with HTML to Image and Node?
Create an image from HTML. See the documentation
Write custom Node.js code and use any of the 400k+ npm packages available. Refer to the Pipedream Node docs to learn more.
Create a PDF file from HTML. See the documentation
Capture a screenshot from a URL. See the documentation
Create a PDF from a URL. See the documentation
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
html_to_image: {
type: "app",
app: "html_to_image",
}
},
async run({steps, $}) {
const data = {
"html_content" : "<div class=\"mt-4 p-4 text-center\"style=width:500px><span class=\"mb-4 tweet-text\">This is Little Bear. He tolerates baths because he knows how phenomenal his floof will appear afterwards. 13/10</span><div class=\"mt-2 p-4\"><img class=\"mt-4 border rounded-circle shadow\"src=https://docs.htmlcsstoimage.com/assets/images/dog.jpg width=100px></div><h4 class=mt-2>WeRateDogs</h4><span class=text-muted>@dog_rates</span></div><link href=https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css rel=stylesheet crossorigin=anonymous integrity=sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk><link href=\"https://fonts.googleapis.com/css2?family=Roboto:wght@700\"rel=stylesheet>",
"css_content" : ".tweet-text{background-color:#fff2ac;background-image:linear-gradient(to right,#ffe359 0,#fff2ac 100%);font-weight:bolder;font-size:32px;font-family:Roboto,sans-serif;padding:4px}",
"generate_img_url": true
}
return await axios($, {
method: "post",
url: `https://api.htmlcsstoimg.com/api/v1/generateImage`,
headers: {
"CLIENT-API-KEY": `${this.html_to_image.$auth.api_key}`,
},
data,
})
},
})
Develop, run and deploy your Node.js code in Pipedream workflows, using it between no-code steps, with connected accounts, or integrate Data Stores and File Stores
This includes installing NPM packages, within your code without having to manage a package.json file or running npm install.
Below is an example of installing the axios package in a Pipedream Node.js code step. Pipedream imports the axios package, performs the API request, and shares the response with subsequent workflow steps:
// To use previous step data, pass the `steps` object to the run() function
export default defineComponent({
async run({ steps, $ }) {
// Return data to use it in future steps
return steps.trigger.event
},
})