-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Producer sales total after the Order Cycle closes #10
Comments
Hi @lauriewayne , We can do this in n8n using polling, which means the workflow will trigger when order cycle closes. To do this, I would need to know the name and enterprise id of the hub, email address for sending the email to, and content for the email (optional). I don't think there is an existing gmail connection in OFN USA's n8n account, so I would need to set this up first. For this, I would need access to OFN USA gmail account or any other email account you want to send the email from. To do this (development, testing, and documentation), I would need 5-7 hours. Once finished, you can easily replicate the workflow for other hubs (steps will be in the documentation). |
Thank you! I'll get the hub id (there might be a few who want it right now) and Gmail setup. Should be able to get back to you by this time tomorrow. |
@lauriewayne @lin-d-hop can you have a look at the implementation proposal and let me know if its okay, so that I move forward on this issue. |
Thank you @div-yansh-1 ! The fields in the csv that are wanted from the hub manager are:
There are two new fields in the list above that will increase the time estimate, and I think this is a complete list. Sorry for the scope creep! If these are not yet supported by the API, we can let the user know and proceed with just the first three items. The emails should come from [email protected]. The hub that is wanting this is OFN UID 1342 (South Cumberland Farmer’s Market) but for testing/signoff purposes please use OFN UID 2 (OFN USA Demo Hub). |
@lauriewayne Yep, it will increase the time estimate by few hours. Overall it should be around 10 - 12 hrs. |
Thank you @div-yansh-1!
Thank you for your patience! It is so appreciated as we figure out this process! |
Hi @div-yansh-1 just checking in to see the status on this one. Are you waiting on me at all? |
@lauriewayne |
@lauriewayne can you check the updated implementation proposal and let me know if its okay. Then I can start working on this. |
I think it is okay but need to get the sanity check on the implications of price*qty. I believe we would want the notifications email (in many cases this is the same as the public email from a practical standpoint, but it seems like a good practice to use the notifications email, since I think that's what it was set up for). I will follow up with the user and get back to you ASAP - thank you!! |
Hi @div-yansh-1, I checked with the user, and sadly, they have figured out some other way to get what they need and this project is no longer a priority for them. 😭, so we would not have an actual "customer" for this one and it makes sense to wait . Very happy to contribute to development funds to compensate for the hard work you have already done figuring it out! |
Hi @lauriewayne |
Delivery Stage
1. What is the need / problem?
At the end of every order cycle, Hub manager wants an email with a list of producer who had sales in a given order cycle (preferably in form of CSV).
2. Which type of users does this problem affect (and how many, if known)?
Hub Managers
3. What tools does this involve?
Email, CSV
4. Links to connected discussions
https://openfoodnetwork.slack.com/archives/C04U02X3806/p1679964247999209
5. Implementation Proposal
To use a n8n workflow which automatically triggers when an order cycle closes for the hub (using polling with Postgres and function nodes). Then using a SQL query (via the Postgres node in n8n), we will get the list of producers sales and info for that order cycle. After which, the data will be converted into CSV file and will be emailed to the hub manager.
Fields in CSV:
Enterprise Id and OC id are very easy to add in the workflow. So, no extra time is needed for that.
Whats Polling (in context of this issue): Basically, n8n will keep on checking at fixed intervals (every hour - can be reduced if needed), if a new order cycle has closed for the specified enterprise. It's similar to Zapier trigger.
Notes:
- Need to connect a Gmail account in USA's n8n account to send emails. To do this, I would need access to the email account which would be sending the email.
6. Estimates and funding partners
10-12 hrs
7. Link to Workflows, User Guide etc
The text was updated successfully, but these errors were encountered: