actualNoteContentPart: ## Example 2 - Adding something to the daily jots using custom Javascript code
  Very often users want to create automations that save some kind of data from outside Amplenote into Amplenote. The specific "destination note" of that data is not always obvious/we don't want any manual input to specify it. So the most common solution that people adopt is to send that data to the Daily Jot, because in Amplenote Daily Jots are the default "landing pad" and it's very easy to go back and review the captured data later on.
  For this example, you can use any trigger that you may want, but the main change will be on the step, as we will want to add a task to today's daily jot. The make this possible, the use of [code steps](https://pipedream.com/docs/code/)   will be necessary. To create a code step, click on the plus icon under the trigger, type "Amplenote" on the search bar, select Amplenote and [select the option "Use any Amplenote API in Node.js"](https://images.amplenote.com/e9aed28c-a6d6-11ed-a711-3ac2ea44f0fb/99833986-5f1b-4975-8670-263bb6d31ca5.png) .
  Here is the rough list of steps that we will need to implement in order to add something to the current Daily Jot:
  Get today's date in Amplenote's daily jot format (IE - May 24th, 2023);
  Get the list of notes that have been edited in the last 24 hours;
  Find if the notes match today's jot date and get it's UUID;
  	The note also needs to be tagged as daily-jots;
  	If none match, create a new note titled for today's date and get it's UUID;
  Add a task to today's jot
  To get today's date on Amplenote's format and a valid time for the last 24 hours, create a Node.js step and add the following code inside it:
  ```
  import { DateTime } from "luxon"; export default defineComponent({   async run({ steps, $ }) {    //Generate the current day's date and format it the same as Amplenote's default jot structure    //Calculates the last 24 hours in seconds    const last24Hours = Math.floor((Date.now() - 24 * 60 * 60 * 1000) / 1000);    const dt = DateTime.local();     //Creating today's suffix    let suffix;    let j = dt.day % 10, k = dt.day % 100;     if (j == 1 && k != 11) suffix = 'st';    if (j == 2 && k != 12) suffix = 'nd';    if (j == 3 && k != 13) suffix = 'rd';    else suffix = 'th';     let today = dt.setLocale('en-US').toLocaleString({month: 'long', day: 'numeric'});    today = today + suffix + ', ' + dt.year;     //Exports the last 24 hours and the properly formatted date    $.export('today', today);    $.export('last24Hours', last24Hours);  },})
  ```
  In this code block, we're using the [Luxon library](https://moment.github.io/luxon/#/)  to facilitate the date calculations and transformations. We get the local date time day and calculate it's module by both 10 and 100 to know which suffix to add, transform the date format into a long form string, append it with the suffix and the year. We later export the calculated date and the last 24 hours in seconds to be able to use it in other steps.
  For the second step, we will get daily jots created in the last 24 hours that match today's date or create a new jot, based on the results of the previous steps. For this, create a new step, type and select "Amplenote" and
processedNoteContent: ---
  title: Connect Amplenote to other apps using Siri Shor...
  headers: ## Example 2 - Adding something to the daily jots using custo...
  ---
  Example 2 - Adding something to the daily jots using custom Javascript code
  Very often users want to create automations that save some kind of data from outside Amplenote into Amplenote. The specific "destination note" of that data is not always obvious/we don't want any manual input to specify it. So the most common solution that people adopt is to send that data to the Daily Jot, because in Amplenote Daily Jots are the default "landing pad" and it's very easy to go back and review the captured data later on.
  For this example, you can use any trigger that you may want, but the main change will be on the step, as we will want to add a task to today's daily jot. The make this possible, the use of [code steps](https://pipedream.com)`
     will be necessary. To create a code step, click on the plus icon under the trigger, type "Amplenote" on the search bar, select Amplenote and [select the option "Use any Amplenote API in Node.js"](https://images.amplenote.com)`
   .
  Here is the rough list of steps that we will need to implement in order to add something to the current Daily Jot:
  Get today's date in Amplenote's daily jot format (IE - May 24th, 2023);
  Get the list of notes that have been edited in the last 24 hours;
  Find if the notes match today's jot date and get it's UUID;
  The note also needs to be tagged as daily-jots;
  If none match, create a new note titled for today's date and get it's UUID;
  Add a task to today's jot
  To get today's date on Amplenote's format and a valid time for the last 24 hours, create a Node.js step and add the following code inside it: import { DateTime } from "luxon"; export default defineComponent({   async run({ steps, $ }) {    //Generate the current day's date and format it the same as Amplenote's default jot structure    //Calculates the last 24 hours in seconds    const last24Hours = Math.floor((Date.now() - 24 * 60 * 60 * 1000) / 1000);    const dt = DateTime.local();     //Creating today's suffix    let suffix;    let j = dt.day % 10, k = dt.day % 100;     if (j == 1 && k != 11) suffix = 'st';    if (j == 2 && k != 12) suffix = 'nd';    if (j == 3 && k != 13) suffix = 'rd';    else suffix = 'th';     let today = dt.setLocale('en-US').toLocaleString({month: 'long', day: 'numeric'});    today = today + suffix + ', ' + dt.year;     //Exports the last 24 hours and the properly formatted date    $.export('today', today);    $.export('last24Hours', last24Hours);  },})
  In this code block, we're using the [Luxon library](https://moment.github.io)`
    to facilitate the date calculations and transformations. We get the local date time day and calculate it's module by both 10 and 100 to know which suffix to add, transform the date format into a long form string, append it with the suffix and the year. We later export the calculated date and the last 24 hours in seconds to be able to use it in other steps.
  For the second step, we will get daily jots created in the last 24
noteTitle: Connect Amplenote to other apps using Siri Shortcuts, IFTTT or Pipedream (custom API integrations & automations)