Hi,
i’m brand new to Pipedream and am looking to sync my Readwise highlights to a Coda Table. Everything is working seamlessly and i’m so excited except…
The metadata that gets pulled in from Readwise lists the highlight text, the location in the kindle book, etc… but not the author or title unless i’m somehow being ridiculous!!!
i see the “book id” but that’s it… is there a way to translate that if the author and title aren’t directly pullable? Or have i just missed something?
Please help, i’m so excited for this integration! Thank you so much!!
1 Like
Hello @danieljself,
First off, welcome to Pipedream Community, happy to have you!
I’m sorry for you inconvenience, currently, Pipedream List Highlights action doesn’t return the Book information as it is not included in the Readwise API response. For now as a workaround, I would recommend you to add an additional Readwise Node.js action to call Readwise books API and add Book information as follow:
Step 1, below your Readwise List Highlights action, add a new Readwise Node.js action:
Step 2: on new action, in the code section, paste the following content:
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
readwise: {
type: "app",
app: "readwise",
}
},
async run({steps, $}) {
const {results: books} = await axios($, {
url: `https://readwise.io/api/v2/books/`,
headers: {
"Authorization": `Token ${this.readwise.$auth.accesss_token}`,
},
})
const highlightsWithBooks = steps.list_highlights.$return_value.map(highlight => {
const book = books.find(book => book.id === highlight.book_id)
return {
...highlight,
book
}
})
return highlightsWithBooks
},
})
Example:
Step 3: Try to run the workflow, observe that the new action result contains additional book
field that include the book information.
My full workflow