Item Mapping with an Image Column

Hi,

I am trying to use item mapping for a column that contains images. I have tried different things but it doesn’t work, its also not specified in the documentation. Does anybody have any experience with this or can suggest a workaround? Thanks in advanced.

EDIT: Added more detail

Essentially I am trying to send to an external API a text column and an image column when a particular date/time in another column in the same row expires.

I created a recipe but found here a way to map the data far calls from monday.com to external apis. I mapped the first text field as described in the docs but I am having trouble mapping the image.

1 Like

@iperez

When you say Item Mapping, are you referring to mapping within Integromat, Zapier or the Monday API?

Or are you just looking for the column ID of a File Column?

This is possibly an easy question to answer but you need to provide more details. What do you need the mapping for? What are you trying to achieve?

Thanks for responding, essentially I am trying to send to an external API a text column and an image column when a particular date in another column in the same row expires.

I created a recipe but found here a way to map the data far calls from monday.com to external apis. I mapped the first text field as described in the docs but I am having trouble mapping the image.

@iperez

Thanks for the clarification! I’ve moved this to the API section so the right people can help. Also tagging in @Helen who is better equipped to answer.

Hi @iperez, and thank you for looping me in @andrewalmand :smiley:!

Ahh yes, so the documentation you found is regarding item mapping if you were to build your own custom integration recipe.

Do you mind including some screenshots of your setup? You mentioned that you were able to map a text field. Is this in your own backend code? Or was this in a different software?

Thanks for walking me through it~

Hi thanks for responding, As the docs suggested I created a post route in my NodeJS Express server that returns the field definitions. Currently i have [{id: 'sampleText', title: 'Sample Title', outboundType: 'text', inboundTypes: ['text']}]. And that works fine, the issue is that I also need to send an image or its url not just the text column. Is there a way to map an image and get its url.

Also on another note, I noticed the ‘date has passed’ trigger does not take into account the time in the column just the date. So, if I want it to run at a specific time I have to create a custom trigger, is that correct?

Hi @iperez,

Ahh yes, so currently our API does not support importing files via URL. This is something our devs are aware of and are working towards!

If you wanted to upload a file into a files column (or even an item’s update), you would need to have the file stored locally. Here is an update that you should check out about how to upload files using variables in NodeJS. Maybe this will help?

Regarding your question about the time trigger, confirming that this trigger will not register time but only the date. In this case, a custom trigger would be the best way to go.

Hi,

Thanks for responding.

Actually I was talking about reading the file value (url) through item mapping but I found decided on specifying the columnId in the recipe and using the GraphQL API to find it.

As for the time trigger please let me know about that to be sure Im not doing something wrong.
And just to clarify, I know that in Scheduled Trigger you can select a date and time but its the same time for all the rows, I want it to change per row with the date time specified in a column which is why I tried ‘Date has passed’ but that didn’t seem to work either.

I had this issue, where we needed to upload a file uploaded on Typeform to be imported into Monday. And Typeform gives the file url.

The below code in python downloads the file(not locally) and imports to Monday. Need to get the file name and content type from the url download response.

url = “image_url”
response = requests.get(url=url, headers=headers)
if (response.status_code == 200):
resp_headers = response.headers
file_name = resp_headers[‘content-disposition’].strip(“‘attachment; filename=’”)
url = “https://api.monday.com/v2/file
payload = {
‘query’: ‘mutation ($file: File!) { add_file_to_column (file: $file, item_id: XXXX, column_id: “files”) {id }}’}
files = [
(‘variables[file]’, (file_name, response.content, resp_headers[‘Content-Type’]))
]
headers = {
‘Authorization’: ‘Bearer API’,
}
response = requests.request(“POST”, url, headers=headers, data=payload, files=files)
print(response.text)

1 Like

@iperez confirming that the “When date has passed” built-in trigger will not register the time.

Maybe a custom trigger is the way to go?

Perfect, thanks for confirming.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

Hi @iperez!

Just wanted to provide you with an update that our devs recently put in a fix for this.

Now, the “When date has passed” trigger will indeed register the Hours field for a Date column. Check out my newest announcement here for more information: [RELEASED] Hours field supported for Date columns changes.

Hope this helps!